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:	Mon, 26 Nov 2012 11:20:54 -0700
From:	Jason Gunthorpe <jgunthorpe@...idianresearch.com>
To:	Grant Likely <grant.likely@...retlab.ca>
Cc:	linux-kernel@...r.kernel.org, devicetree-discuss@...ts.ozlabs.org,
	Rob Herring <rob.herring@...xeda.com>
Subject: Re: [PATCH] of: When constructing the bus id consider
 assigned-addresses as well

On Mon, Nov 26, 2012 at 02:03:16PM +0000, Grant Likely wrote:
> On Wed, 21 Nov 2012 14:02:40 -0700, Jason Gunthorpe <jgunthorpe@...idianresearch.com> wrote:
> > 'assigned-addresses' is used for certain PCI device type nodes in
> > lieu of 'reg',  since this is enforced by of/address.c, have
> > of_device_make_bus_id look there as well.
> > 
> > Signed-off-by: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
> 
> If it is a PCI device, then of_device_make_bus_id() shouldn't come into
> play. PCI devices already have their own naming scheme. Only
> platform_bus device creation uses of_device_make_bus_id(). What am I
> missing?

In my embedded case I have a complex PCI-E connected SOC device.

This is modeled in OF by having a PCI-E bus, a PCI-E device node, and
then all of the SOC devices (I2C, GPIO, drivers, etc) placed under the
PCI-E device node.

The PCI driver that matches the device just turns it on and calls
of_platform_populate(..) with its own node as an argument.

So of_device_make_bus_id isn't called on a PCI-E device node, it is
called on the platform_device children of that node, and due to the
way the other code works, and what the OF rules seem to be, those
childen all use assigned-addresses. Without this patch the code just
assigns monotonic ids to those nodes.

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