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: <CAErSpo7qi8pE-tiXriMcF5LLY6c=BWnVy-G3MYmjh=1XrqypGA@mail.gmail.com>
Date:	Thu, 15 Mar 2012 11:47:18 -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,
	Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org
Subject: Re: [PATCH v2 23/37] PCI, ACPI: Add pci_root_hp hot add hotplug notification

On Tue, Mar 13, 2012 at 12:03 AM, Yinghai Lu <yinghai@...nel.org> wrote:
> On Mon, Mar 12, 2012 at 8:22 PM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
>> On Sat, Mar 10, 2012 at 12:00 AM, Yinghai Lu <yinghai@...nel.org> wrote:
>>> It is from acpiphp_glue.c
>>>
>>> How to use it?
>>> Find out root bus number to acpi root name mapping from dmesg or /sys
>>>
>>>  echo "\_SB.PCIB 0" > /proc/acpi/sci/notify
>>> to add it back
>>
>> Nope.  That might be a way to exercise this for debug purposes (and it
>> only works when /proc/acpi/sci/notify is compiled in), but we
>> definitely don't want normal users to deal with ACPI pathnames like
>> this.
>
> before this patch set, only way is: Users really put one root bus in
> and press buton etc to trigger notification
> to get it work.
>
>>
>> Most of this functionality belongs in the ACPI core, not here.  The
>> core should be handling these notify events and turning them into
>> .add() and .remove() calls to the driver.
>>
>> But since the ACPI core doesn't do that yet, we have to do it in the
>> driver, like we do for CPU, memory, etc.  That part is fine.  But I
>> think it at least belongs *in* the driver, i.e., in pci_root.c, not in
>> a new pci_root_hp.c file.
>
> don't want to pollute pci_root.c.
>
> in separated file, we can use CONFIG_HOTPLUG in Makefile instead of pci_root.c

I don't buy this argument.  Most of this functionality should someday
be in the ACPI core.  Until then, it is intimately connected to the
stuff in pci_root.c.  It is not "pollution."

>> There definitely should not be another acpi_walk_namespace() and
>> another list of ACPI host bridges.  The core *does* already walk the
>> namespace and call acpi_pci_root_add() for us.  And the driver already
>> has a list of host bridges (acpi_pci_roots).
>
> no, we may not have acpi_pci_root there.

I don't understand what you're saying here.  I think you should be
basically implementing the "turn notify events into add/remove calls"
functionality.  This is what *should* be in the ACPI core, but isn't
yet.  If you put this in the driver, and hopefully follow the style
already used by the processor/memory/etc. drivers, it will be easier
to someday move it into the ACPI core.

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