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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Dec 2014 15:55:23 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	linaro-acpi@...ts.linaro.org
Cc:	Bjorn Helgaas <bhelgaas@...gle.com>,
	Tomasz Nowicki <tomasz.nowicki@...aro.org>, rjw@...ysocki.net,
	linux-pci@...r.kernel.org, catalin.marinas@....com, x86@...nel.org,
	will.deacon@....com, linux-kernel@...r.kernel.org,
	linux-acpi@...r.kernel.org, mingo@...hat.com, hpa@...or.com,
	wangyijing@...wei.com, Liviu.Dudau@....com, tglx@...utronix.de,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [Linaro-acpi] [PATCH 2/6] x86, acpi, pci: Move arch-agnostic MMCFG code out of arch/x86/ directory

On Wednesday 10 December 2014 16:55:00 Bjorn Helgaas wrote:
> On Wed, Nov 19, 2014 at 05:04:47PM +0100, Tomasz Nowicki wrote:
> > MMCFG table seems to be architecture independent and it makes sense
> > to share common code across all architectures. The ones that may need
> > architectural specific actions have default prototype (__weak).
> > 
> > Signed-off-by: Tomasz Nowicki <tomasz.nowicki@...aro.org>
> > Tested-by: Hanjun Guo <hanjun.guo@...aro.org>
> > ---
> >  arch/x86/include/asm/pci_x86.h |  29 -----
> >  arch/x86/pci/acpi.c            |   1 +
> >  arch/x86/pci/init.c            |   1 +
> >  arch/x86/pci/mmconfig-shared.c | 200 +---------------------------------
> >  arch/x86/pci/mmconfig_32.c     |   1 +
> >  arch/x86/pci/mmconfig_64.c     |   1 +
> >  drivers/acpi/Makefile          |   1 +
> >  drivers/acpi/bus.c             |   1 +
> >  drivers/acpi/mmconfig.c        | 242 +++++++++++++++++++++++++++++++++++++++++
> >  include/linux/mmconfig.h       |  58 ++++++++++
> >  include/linux/pci.h            |   8 --
> >  11 files changed, 308 insertions(+), 235 deletions(-)
> >  create mode 100644 drivers/acpi/mmconfig.c
> >  create mode 100644 include/linux/mmconfig.h
> > ... 
> 
> Much of the code you're moving to drivers/acpi/mmconfig.c is not actually
> ACPI-specific and would have to be duplicated for a non-ACPI architecture
> that supports ECAM.  Could that code be moved somewhere like
> drivers/pci/ecam.c, where it could be shared?

We have an implementation of ECAM in drivers/pci/host/pci-host-generic.c,
which today is ARM32 specific but should be migrated to the new generic
infrastructure we are adding for ARM64, after which that driver becomes
very simple.

I suppose we could either make it use drivers/pci/ecam.c then, or have
the config space code from pci-host-generic be shared between ACPI and
DT based platforms. The former approach is probably nicer in the long
run, and it allows sharing with other drivers that use ECAM but are not
completely generic otherwise.

	Arnd
--
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