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]
Message-ID: <20150216174628.GA13861@red-moon>
Date:	Mon, 16 Feb 2015 17:46:29 +0000
From:	Lorenzo Pieralisi <lorenzo.pieralisi@....com>
To:	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Cc:	Yijing Wang <wangyijing@...wei.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Jiang Liu <jiang.liu@...ux.intel.com>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	Yinghai Lu <yinghai@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Marc Zyngier <Marc.Zyngier@....com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Russell King <linux@....linux.org.uk>,
	"x86@...nel.org" <x86@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Tony Luck <tony.luck@...el.com>,
	"linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Guan Xuetao <gxt@...c.pku.edu.cn>,
	"linux-alpha@...r.kernel.org" <linux-alpha@...r.kernel.org>,
	"linux-m68k@...r.kernel.org" <linux-m68k@...r.kernel.org>,
	Liviu Dudau <liviu@...au.co.uk>, Arnd Bergmann <arnd@...db.de>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Jason Cooper <jason@...edaemon.net>,
	Gregory Clément 
	<gregory.clement@...e-electrons.com>,
	Lior Amsalem <alior@...vell.com>,
	Nadav Haklai <nadavh@...vell.com>
Subject: Re: [PATCH v2 23/30] PCI/mvebu: Use pci_common_init_dev() to
 simplify code

Hi Thomas,

On Thu, Jan 22, 2015 at 05:40:00PM +0000, Thomas Petazzoni wrote:
> Dear Yijing Wang,
> 
> On Wed, 21 Jan 2015 08:30:18 +0800, Yijing Wang wrote:
> > Mvebu_pcie_scan_bus() is not necessary, we could use
> > pci_common_init_dev() instead of pci_common_init(),
> > and pass the device pointer as the parent. Then
> > pci_scan_root_bus() will be called to scan the pci busses.
> > 
> > Signed-off-by: Yijing Wang <wangyijing@...wei.com>
> > CC: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
> > CC: Jason Cooper <jason@...edaemon.net>
> 
> While I'm fine with the change to pci_common_init_dev(), I am not so
> sure about the removal of mvebu_pcie_scan_bus(). I vaguely remember
> that we intentionally did not use the default function for a specific
> reason. Of course, this was a long time ago, and I don't remember the
> reason. I would have to take a bit of time to 1/ review the archives of
> the discussion surrounding the pcie-mvebu driver, and 2/ test your
> patch to validate it works fine on HW.

I guess the reason: by providing the scan pointer to pcibios through
the hw_pci struct you were preventing calling pci_scan_root_bus() in
bios32.c that in turn can add devices before the resources are assigned.

Basically mvebu_pci_scan_bus() was doing what pci_scan_root_bus() does
except for calling pci_bus_add_devices().

Yijing patches remove pci_bus_add_devices() from pci_scan_root_bus() so
his change should be fine and it actually improves the current behaviour
which is quite hard to untangle, and not just on mvebu (I suspect
drivers/pci/host/pcie-xilinx.c can suffer from the same problem).

Lorenzo

> 
> Thanks!
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
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