lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Mar 2014 13:56:19 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	Liviu Dudau <Liviu.Dudau@....com>
Cc:	Arnd Bergmann <arnd@...db.de>,
	linux-pci <linux-pci@...r.kernel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Will Deacon <Will.Deacon@....com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	linaro-kernel <linaro-kernel@...ts.linaro.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	LAKML <linux-arm-kernel@...ts.infradead.org>,
	Tanmay Inamdar <tinamdar@....com>,
	Grant Likely <grant.likely@...retlab.ca>
Subject: Re: [PATCH v7 3/3] arm64: Add architecture support for PCI

On Mon, Mar 17, 2014 at 06:05:25PM +0000, Liviu Dudau wrote:
> On Mon, Mar 17, 2014 at 05:38:21PM +0000, Catalin Marinas wrote:
> > On Fri, Mar 14, 2014 at 06:05:27PM +0000, Liviu Dudau wrote:
> > > On Fri, Mar 14, 2014 at 05:38:08PM +0000, Arnd Bergmann wrote:
> > > > On Friday 14 March 2014, Catalin Marinas wrote:
> > > > > On Fri, Mar 14, 2014 at 03:34:18PM +0000, Liviu Dudau wrote:
> > > > > > --- /dev/null
> > > > > > +++ b/arch/arm64/kernel/pci.c
> > > > > [...]
> > > > > > +int pci_register_io_range(phys_addr_t address, resource_size_t size)
> > > > > [...]
> > > > > > +unsigned long pci_address_to_pio(phys_addr_t address)
> > > > > [...]
> > > > > > +void pcibios_fixup_bus(struct pci_bus *bus)
> > > > > [ actually most of this file ]
> > > > > 
> > > > > Maybe it was raised before already but can we have __weak generic
> > > > > definitions of these functions? They don't seem to be arm64 specific in
> > > > > any way.
> > [...]
> > > Catalin, if you are happy to ask for ACKs from all arch maintainers that might get
> > > affected by our custom version of pci_address_to_pio() before you can pull PCI support
> > > for arm64 then I can propose a new patchset.
> > 
> > You don't need to change the other architectures, that's the point of a
> > __weak definition, it will be automatically overridden. If you want, you
> > can even place a GENERIC_PCI or whatever config option that is only
> > selected by arm64 for the time being.
> 
> pci_address_to_pio() is alread __weak. My patch was adding the arm64 version of it. Adding
> an #ifdef GENERIC_PCI to the __weak implementation is not just a temporary solution.

Ah, I start to understand what you mean, pci_address_to_pio() is already
defined as __weak in drivers/of/address.c. So the reason we redefine it
on arm64 is that it uses the io_list resources which are populated by
pci_register_io_range(). Do you see any other architecture using a
similar logic (that could be shared)?

Any other functions in this file that could be shared (and are not
__weak already)?

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ