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]
Message-ID: <20140818215225.GI24600@localhost>
Date:	Mon, 18 Aug 2014 22:52:25 +0100
From:	Catalin Marinas <catalin.marinas@....com>
To:	Liviu Dudau <liviu@...au.co.uk>
Cc:	Liviu Dudau <Liviu.Dudau@....com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Will Deacon <Will.Deacon@....com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Arnd Bergmann <arnd@...db.de>,
	Russell King <linux@....linux.org.uk>,
	Tanmay Inamdar <tinamdar@....com>,
	Grant Likely <grant.likely@...retlab.ca>,
	Sinan Kaya <okaya@...eaurora.org>,
	Jingoo Han <jg1.han@...sung.com>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Suravee Suthikulanit <suravee.suthikulpanit@....com>,
	linux-pci <linux-pci@...r.kernel.org>,
	linux-arch <linux-arch@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Device Tree ML <devicetree@...r.kernel.org>,
	LAKML <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v9 03/12] PCI: Introduce helper functions to deal with
 PCI I/O ranges.

On Mon, Aug 18, 2014 at 10:34:46PM +0100, Liviu Dudau wrote:
> On Mon, Aug 18, 2014 at 03:26:04PM +0100, Catalin Marinas wrote:
> > On Tue, Aug 12, 2014 at 05:25:16PM +0100, Liviu Dudau wrote:
> > > Some architectures do not have a simple view of the PCI I/O space
> > > and instead use a range of CPU addresses that map to bus addresses.
> > > For some architectures these ranges will be expressed by OF bindings
> > > in a device tree file.
> > > 
> > > This patch introduces a pci_register_io_range() helper function with
> > > a generic implementation that can be used by such architectures to
> > > keep track of the I/O ranges described by the PCI bindings. If the
> > > PCI_IOBASE macro is not defined that signals lack of support for PCI
> > > and we return an error.
> > > 
> > > In order to retrieve the CPU address associated with an I/O port, a
> > > new helper function pci_pio_to_address() is introduced. This will
> > > search in the list of ranges registered with pci_register_io_range()
> > > and return the CPU address that corresponds to the given port.
> > > 
> > > Cc: Grant Likely <grant.likely@...aro.org>
> > > Cc: Rob Herring <robh+dt@...nel.org>
> > > Cc: Arnd Bergmann <arnd@...db.de>
> > > Signed-off-by: Liviu Dudau <Liviu.Dudau@....com>
> > > ---
> > >  drivers/of/address.c       | 95 ++++++++++++++++++++++++++++++++++++++++++++++
> > >  include/linux/of_address.h |  2 +
> > >  2 files changed, 97 insertions(+)
> > 
> > Actually, I think we moved too much code into drivers/of/. Is there
> > anything OF specific about this code to live here (apart from
> > OF_BAD_ADDR)? I think driver/pci/ more appropriate?
> 
> I have no strong preference for one place vs the other. While this does
> not use any OF specific code, it should be called only from OF enabled
> code. So the relationship is not one of depending on of_* but on being
> dependent on.

In this case it's probably ok to keep them here for the time being.

I wonder whether it would also be useful for ACPI. But I have no idea
how ACPI would fit with the ACPI patches.

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