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:	Thu, 07 Apr 2011 15:27:07 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	benh@...nel.crashing.org
Cc:	linux-pci@...r.kernel.org, linux-arch@...r.kernel.org,
	linux-kernel@...r.kernel.org, bheglaas@...gle.com,
	monstr@...str.eu, tglx@...uxtronix.de, bigeasy@...uxtronix.de
Subject: Re: [PATCH 1/5] pci/of: Match PCI devices to OF nodes dynamically

From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Date: Thu,  7 Apr 2011 13:26:32 +1000

> powerpc has two different ways of matching PCI devices to their
> corresponding OF node (if any) for historical reasons. The ppc64 one
> does a scan looking for matching bus/dev/fn, while the ppc32 one does a
> scan looking only for matching dev/fn on each level in order to be
> agnostic to busses being renumbered (which Linux does on some
> platforms).
> 
> This removes both and instead moves the matching code to the PCI core
> itself. It's the most logical place to do it: when a pci_dev is created,
> we know the parent and thus can do a single level scan for the matching
> device_node (if any).
> 
> The benefit is that all archs now get the matching for free. There's one
> hook the arch might want to provide to match a PHB bus to its device
> node. A default weak implementation is provided that looks for the
> parent device device node, but it's not entirely reliable on powerpc for
> various reasons so powerpc provides its own.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@...nel.crashing.org>

This patch breaks the build on sparc:

> diff --git a/drivers/pci/of.c b/drivers/pci/of.c
> new file mode 100644
> index 0000000..c94d37e
> --- /dev/null
> +++ b/drivers/pci/of.c

This gets compiled in on all CONFIG_OF platforms, and:

> +void pci_set_of_node(struct pci_dev *dev)
> +{
> +	if (!dev->bus->dev.of_node)
> +		return;
> +	dev->dev.of_node = of_pci_find_child_device(dev->bus->dev.of_node,
> +						    dev->devfn);
> +}

it references of_pci_find_child_device().

However, of_pci_find_child_device() lives in drivers/of/of_pci.c which is not
built into the tree because you haven't provided the necessary changes to
drivers/of/Makefile in this patch.
--
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