mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Liviu Dudau <Liviu.Dudau@arm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-pci <linux-pci@vger.kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Will Deacon <Will.Deacon@arm.com>,
	linaro-kernel <linaro-kernel@lists.linaro.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	LAKML <linux-arm-kernel@lists.infradead.org>,
	Tanmay Inamdar <tinamdar@apm.com>
Subject: Re: [PATCH v5 3/3] arm64: Add architecture support for PCI
Date: Thu, 6 Mar 2014 16:17:13 +0000	[thread overview]
Message-ID: <20140306161713.GH6457@e106497-lin.cambridge.arm.com> (raw)
In-Reply-To: <201403042328.51361.arnd@arndb.de>

On Tue, Mar 04, 2014 at 10:28:51PM +0000, Arnd Bergmann wrote:
> On Tuesday 04 March 2014, Liviu Dudau wrote:
> 
> > +extern int isa_dma_bridge_buggy;
> 
> As commented before, I still think we can hardcode this to off

Unfortunately that doesn't work when you have CONFIG_PCI=y. drivers/pci/pci.c has:

drivers/pci/pci.c:int isa_dma_bridge_buggy;
drivers/pci/pci.c:EXPORT_SYMBOL(isa_dma_bridge_buggy);

and drivers/pci/quirks.c does:

drivers/pci/quirks.c:   if (!isa_dma_bridge_buggy) {
drivers/pci/quirks.c:           isa_dma_bridge_buggy=1;
drivers/pci/quirks.c-           dev_info(&dev->dev, "Activating ISA DMA hang workarounds\n");
drivers/pci/quirks.c-   }


> 
> > +unsigned long pci_address_to_pio(phys_addr_t address)
> > +{
> > +	struct ioresource *res;
> > +
> > +	list_for_each_entry(res, &io_list, list) {
> > +		if (address >= res->start &&
> > +			address < res->start + res->size) {
> > +			return res->start - address;
> > +		}
> > +	}
> > +
> > +	return (unsigned long)-1;
> > +}
> > +EXPORT_SYMBOL_GPL(pci_address_to_pio);
> 
> This has two problems:
> 
> - You return the address in bus space not the logical Linux
>   port number as powerpc and microblaze do.
> - You imply that the window starts at bus address zero, which
>   might not be the case.

That's definitely not the intention here. I want to return the
logical port number and I want that port number to start from
zero for every registered IO range. 

> 
> > +EXPORT_SYMBOL(pcibios_fixup_bus);
> 
> no need for this export.

OK.

> 
> > +/*
> > + * We don't have to worry about legacy ISA devices, so nothing to do here
> > + */
> > +resource_size_t pcibios_align_resource(void *data, const struct resource *res,
> > +				resource_size_t size, resource_size_t align)
> > +{
> > +	return ALIGN(res->start, align);
> > +}
> > +EXPORT_SYMBOL(pcibios_align_resource);
> 
> or this one. Also, the ALIGN() is already done by the PCI core.

This has been fix in v6 already.

Thanks for reviewing this!

Liviu

> 
> 	Arnd
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯


  reply	other threads:[~2014-03-06 16:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 15:50 [PATCH v5 0/3] [RFC] Add support for PCI in AArch64 Liviu Dudau
2014-03-04 15:50 ` [PATCH v5 1/3] Fix ioport_map() for !CONFIG_GENERIC_IOMAP cases Liviu Dudau
2014-03-04 15:50 ` [PATCH v5 2/3] arm64: Extend the PCI I/O space to 16MB Liviu Dudau
2014-03-04 15:50 ` [PATCH v5 3/3] arm64: Add architecture support for PCI Liviu Dudau
2014-03-04 22:28   ` Arnd Bergmann
2014-03-06 16:17     ` Liviu Dudau [this message]
2014-03-07  0:17       ` Arnd Bergmann
2014-03-07  1:01         ` Liviu Dudau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140306161713.GH6457@e106497-lin.cambridge.arm.com \
    --to=liviu.dudau@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tinamdar@apm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®