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: <CAErSpo4YqzGsD1Purrke7n+YfPQxFV0aHgjkiWAjdR_43FBzrA@mail.gmail.com>
Date:	Thu, 15 Mar 2012 11:55:37 -0600
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Jesse Barnes <jbarnes@...tuousgeek.org>, x86 <x86@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 35/37] PCI: Make /sys/bus/pci/rescan rescan root

On Tue, Mar 13, 2012 at 12:26 AM, Yinghai Lu <yinghai@...nel.org> wrote:
> On Mon, Mar 12, 2012 at 8:44 PM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
>> On Sat, Mar 10, 2012 at 12:00 AM, Yinghai Lu <yinghai@...nel.org> wrote:
>>> It will rediscover removed pci root buses.
>>>
>>> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>>> ---
>>>  drivers/pci/pci-sysfs.c |    2 ++
>>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
>>> index 4d122cb..fc0a7de 100644
>>> --- a/drivers/pci/pci-sysfs.c
>>> +++ b/drivers/pci/pci-sysfs.c
>>> @@ -284,6 +284,7 @@ msi_bus_store(struct device *dev, struct device_attribute *attr,
>>>
>>>  #ifdef CONFIG_HOTPLUG
>>>  static DEFINE_MUTEX(pci_remove_rescan_mutex);
>>> +void __weak arch_pci_root_rescan(void) { }
>>>  static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
>>>                                size_t count)
>>>  {
>>> @@ -295,6 +296,7 @@ static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
>>>
>>>        if (val) {
>>>                mutex_lock(&pci_remove_rescan_mutex);
>>> +               arch_pci_root_rescan();
>>>                while ((b = pci_find_next_bus(b)) != NULL)
>>>                        pci_rescan_bus(b);
>>>                mutex_unlock(&pci_remove_rescan_mutex);
>>
>> This is gross.  We used to rescan every previously-discovered PCI root bus.
>>
>> Now, we do the same, plus:
>> 1) Scan the ACPI namespace for PCI host bridges, adding and scanning
>> any we haven't seen before, and
>> 2) scan domain 0, buses 0 - pcibios_last_bus, looking for any we
>> haven't seen before.
>
> to have /sys/bus/pci/scan_root again?

Host bridges are not PCI devices, so scanning for them is not a PCI
operation.  It should not be in the /sys/bus/pci hierarchy.
--
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