From: Jiang Liu <jiang.liu@huawei.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Jiang Liu <liuj97@gmail.com>, Len Brown <lenb@kernel.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Ashok Raj <ashok.raj@intel.com>,
linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org,
chenkeping@huawei.com
Subject: Re: [PATCH 2/3] ACPI,PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
Date: Thu, 22 Mar 2012 11:01:21 +0800 [thread overview]
Message-ID: <4F6A9601.5000505@huawei.com> (raw)
In-Reply-To: <CAE9FiQXRg=pBpAJ=+wfqRZysTBLPtATmAsHfdfswyhx1OKW2Yg@mail.gmail.com>
On 2012-3-22 1:04, Yinghai Lu wrote:
> On Wed, Mar 21, 2012 at 9:22 AM, Jiang Liu<liuj97@gmail.com> wrote:
>> From: Jiang Liu<liuj97@gmail.com>
>>
>> When hot-plugging PCI root bridge, acpi_pci_drivers' add()/remove()
>> methods should be invoked to notify registered drivers.
>>
>> Signed-off-by: Jiang Liu<jiang.liu@huawei.com>
>> ---
>> drivers/acpi/pci_root.c | 10 ++++++++++
>> 1 files changed, 10 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
>> index c2d2b7b..ff73357 100644
>> --- a/drivers/acpi/pci_root.c
>> +++ b/drivers/acpi/pci_root.c
>> @@ -445,6 +445,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
>> acpi_status status;
>> int result;
>> struct acpi_pci_root *root;
>> + struct acpi_pci_driver *driver;
>> acpi_handle handle;
>> struct acpi_device *child;
>> u32 flags, base_flags;
>> @@ -612,6 +613,10 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
>> if (device->wakeup.flags.run_wake)
>> device_set_run_wake(root->bus->bridge, true);
>>
>> + list_for_each_entry(driver,&acpi_pci_drivers, node)
>> + if (driver->add)
>> + driver->add(device->handle);
>> +
>> return 0;
>
> if those calling is with acpi_pci_root_start() instead of acpi_pci_root_add()
>
> Do you still need patches 3?
I think it's still needed. If driver->add is called by
acpi_pci_root_add(), then acpi_pci_root_add() needs to
acquire the lock too.
>
> Yinghai
>
> .
>
next prev parent reply other threads:[~2012-03-22 3:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 16:22 [PATCH 0/3] Enhance pci_root.c to better support PCI root bus hotplug Jiang Liu
2012-03-21 16:22 ` [PATCH 1/3] ACPI,PCI: Use normal list for struct acpi_pci_driver Jiang Liu
2012-03-21 16:22 ` [PATCH 2/3] ACPI,PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges Jiang Liu
2012-03-21 17:04 ` Yinghai Lu
2012-03-21 17:04 ` Yinghai Lu
2012-03-22 1:12 ` Yinghai Lu
2012-03-22 1:12 ` Yinghai Lu
2012-03-22 3:01 ` Jiang Liu [this message]
2012-03-21 16:22 ` [PATCH 3/3] ACPI,PCI: protect global lists in drivers/acpi/pci_root.c Jiang Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F6A9601.5000505@huawei.com \
--to=jiang.liu@huawei.com \
--cc=ashok.raj@intel.com \
--cc=bhelgaas@google.com \
--cc=chenkeping@huawei.com \
--cc=jbarnes@virtuousgeek.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.