* [PATCH] PCI / hotplug / ACPI: Get rid of check_sub_bridges()
@ 2013-07-13 17:09 Mika Westerberg
2013-07-13 21:47 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Mika Westerberg @ 2013-07-13 17:09 UTC (permalink / raw)
To: linux-acpi
Cc: Bjorn Helgaas, linux-kernel, linux-pci, Yinghai Lu, Jiang Liu,
Rafael J. Wysocki, Mika Westerberg
Now that acpiphp_check_bridge() always enumerates devices behind the
bridge, there is no need to do that for each sub-bridge anymore like it is
done in the current ACPI-based PCI hotplug code. Given this we don't need
check_sub_bridges() anymore and can drop the function completely.
This also simplifies the ACPIPHP code a bit.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
This applies on top of v3.10 with Rafael's ACPIPHP + Thunderbolt series
applied:
http://www.spinics.net/lists/linux-acpi/msg44480.html
drivers/pci/hotplug/acpiphp_glue.c | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 62e09af..741504a 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -760,25 +760,6 @@ static void acpiphp_sanitize_bus(struct pci_bus *bus)
* ACPI event handlers
*/
-static acpi_status
-check_sub_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
-{
- struct acpiphp_bridge *bridge;
- char objname[64];
- struct acpi_buffer buffer = { .length = sizeof(objname),
- .pointer = objname };
-
- bridge = acpiphp_handle_to_bridge(handle);
- if (bridge) {
- acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
- dbg("%s: re-enumerating slots under %s\n",
- __func__, objname);
- acpiphp_check_bridge(bridge);
- put_bridge(bridge);
- }
- return AE_OK ;
-}
-
void acpiphp_check_host_bridge(acpi_handle handle)
{
struct acpiphp_bridge *bridge;
@@ -788,9 +769,6 @@ void acpiphp_check_host_bridge(acpi_handle handle)
acpiphp_check_bridge(bridge);
put_bridge(bridge);
}
-
- acpi_walk_namespace(ACPI_TYPE_DEVICE, handle,
- ACPI_UINT32_MAX, check_sub_bridges, NULL, NULL, NULL);
}
static void hotplug_event(acpi_handle handle, u32 type, void *data)
@@ -818,9 +796,6 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
dbg("%s: re-enumerating slots under %s\n", __func__, objname);
if (bridge) {
acpiphp_check_bridge(bridge);
- acpi_walk_namespace(ACPI_TYPE_DEVICE, handle,
- ACPI_UINT32_MAX, check_sub_bridges,
- NULL, NULL, NULL);
} else {
struct acpiphp_slot *slot = func->slot;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI / hotplug / ACPI: Get rid of check_sub_bridges()
2013-07-13 17:09 [PATCH] PCI / hotplug / ACPI: Get rid of check_sub_bridges() Mika Westerberg
@ 2013-07-13 21:47 ` Rafael J. Wysocki
2013-07-14 7:08 ` Mika Westerberg
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2013-07-13 21:47 UTC (permalink / raw)
To: Mika Westerberg
Cc: linux-acpi, Bjorn Helgaas, linux-kernel, linux-pci, Yinghai Lu,
Jiang Liu, Rafael J. Wysocki
On Saturday, July 13, 2013 08:09:59 PM Mika Westerberg wrote:
> Now that acpiphp_check_bridge() always enumerates devices behind the
> bridge, there is no need to do that for each sub-bridge anymore like it is
> done in the current ACPI-based PCI hotplug code. Given this we don't need
> check_sub_bridges() anymore and can drop the function completely.
>
> This also simplifies the ACPIPHP code a bit.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
> This applies on top of v3.10 with Rafael's ACPIPHP + Thunderbolt series
> applied:
>
OK, I added it to my bleeding-edge branch along with this series:
> http://www.spinics.net/lists/linux-acpi/msg44480.html
rebased on top of some previous ACPI cleanup commits. I needed to make some
changes in the process (and fixed up some breakage reported by the auto build
testing), hopefully I didn't break anything. If you're in an adventurous mood,
testing would be welcome. ;-) [That already includes the majority of 3.11
material from Linus, though, so unexpected breakage elsewhere may happen.]
Thanks,
Rafael
> drivers/pci/hotplug/acpiphp_glue.c | 25 -------------------------
> 1 file changed, 25 deletions(-)
>
> diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
> index 62e09af..741504a 100644
> --- a/drivers/pci/hotplug/acpiphp_glue.c
> +++ b/drivers/pci/hotplug/acpiphp_glue.c
> @@ -760,25 +760,6 @@ static void acpiphp_sanitize_bus(struct pci_bus *bus)
> * ACPI event handlers
> */
>
> -static acpi_status
> -check_sub_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
> -{
> - struct acpiphp_bridge *bridge;
> - char objname[64];
> - struct acpi_buffer buffer = { .length = sizeof(objname),
> - .pointer = objname };
> -
> - bridge = acpiphp_handle_to_bridge(handle);
> - if (bridge) {
> - acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
> - dbg("%s: re-enumerating slots under %s\n",
> - __func__, objname);
> - acpiphp_check_bridge(bridge);
> - put_bridge(bridge);
> - }
> - return AE_OK ;
> -}
> -
> void acpiphp_check_host_bridge(acpi_handle handle)
> {
> struct acpiphp_bridge *bridge;
> @@ -788,9 +769,6 @@ void acpiphp_check_host_bridge(acpi_handle handle)
> acpiphp_check_bridge(bridge);
> put_bridge(bridge);
> }
> -
> - acpi_walk_namespace(ACPI_TYPE_DEVICE, handle,
> - ACPI_UINT32_MAX, check_sub_bridges, NULL, NULL, NULL);
> }
>
> static void hotplug_event(acpi_handle handle, u32 type, void *data)
> @@ -818,9 +796,6 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
> dbg("%s: re-enumerating slots under %s\n", __func__, objname);
> if (bridge) {
> acpiphp_check_bridge(bridge);
> - acpi_walk_namespace(ACPI_TYPE_DEVICE, handle,
> - ACPI_UINT32_MAX, check_sub_bridges,
> - NULL, NULL, NULL);
> } else {
> struct acpiphp_slot *slot = func->slot;
>
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI / hotplug / ACPI: Get rid of check_sub_bridges()
2013-07-13 21:47 ` Rafael J. Wysocki
@ 2013-07-14 7:08 ` Mika Westerberg
2013-07-14 15:12 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Mika Westerberg @ 2013-07-14 7:08 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: linux-acpi, Bjorn Helgaas, linux-kernel, linux-pci, Yinghai Lu,
Jiang Liu, Rafael J. Wysocki
On Sat, Jul 13, 2013 at 11:47:26PM +0200, Rafael J. Wysocki wrote:
> On Saturday, July 13, 2013 08:09:59 PM Mika Westerberg wrote:
> > Now that acpiphp_check_bridge() always enumerates devices behind the
> > bridge, there is no need to do that for each sub-bridge anymore like it is
> > done in the current ACPI-based PCI hotplug code. Given this we don't need
> > check_sub_bridges() anymore and can drop the function completely.
> >
> > This also simplifies the ACPIPHP code a bit.
> >
> > Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> > ---
> > This applies on top of v3.10 with Rafael's ACPIPHP + Thunderbolt series
> > applied:
> >
>
> OK, I added it to my bleeding-edge branch along with this series:
>
> > http://www.spinics.net/lists/linux-acpi/msg44480.html
>
> rebased on top of some previous ACPI cleanup commits. I needed to make some
> changes in the process (and fixed up some breakage reported by the auto build
> testing), hopefully I didn't break anything. If you're in an adventurous mood,
> testing would be welcome. ;-) [That already includes the majority of 3.11
> material from Linus, though, so unexpected breakage elsewhere may happen.]
Tried the bleeding-edge branch on both of our test machines and Thunderbolt
still works fine.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI / hotplug / ACPI: Get rid of check_sub_bridges()
2013-07-14 7:08 ` Mika Westerberg
@ 2013-07-14 15:12 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2013-07-14 15:12 UTC (permalink / raw)
To: Mika Westerberg
Cc: linux-acpi, Bjorn Helgaas, linux-kernel, linux-pci, Yinghai Lu,
Jiang Liu, Rafael J. Wysocki
On Sunday, July 14, 2013 10:08:28 AM Mika Westerberg wrote:
> On Sat, Jul 13, 2013 at 11:47:26PM +0200, Rafael J. Wysocki wrote:
> > On Saturday, July 13, 2013 08:09:59 PM Mika Westerberg wrote:
> > > Now that acpiphp_check_bridge() always enumerates devices behind the
> > > bridge, there is no need to do that for each sub-bridge anymore like it is
> > > done in the current ACPI-based PCI hotplug code. Given this we don't need
> > > check_sub_bridges() anymore and can drop the function completely.
> > >
> > > This also simplifies the ACPIPHP code a bit.
> > >
> > > Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> > > ---
> > > This applies on top of v3.10 with Rafael's ACPIPHP + Thunderbolt series
> > > applied:
> > >
> >
> > OK, I added it to my bleeding-edge branch along with this series:
> >
> > > http://www.spinics.net/lists/linux-acpi/msg44480.html
> >
> > rebased on top of some previous ACPI cleanup commits. I needed to make some
> > changes in the process (and fixed up some breakage reported by the auto build
> > testing), hopefully I didn't break anything. If you're in an adventurous mood,
> > testing would be welcome. ;-) [That already includes the majority of 3.11
> > material from Linus, though, so unexpected breakage elsewhere may happen.]
>
> Tried the bleeding-edge branch on both of our test machines and Thunderbolt
> still works fine.
Awesome! :-)
Thanks a lot for testing. If Bjorn doesn't hate it, I'll put the series into
linux-next after 3.11-rc1 is released.
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-14 15:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-13 17:09 [PATCH] PCI / hotplug / ACPI: Get rid of check_sub_bridges() Mika Westerberg
2013-07-13 21:47 ` Rafael J. Wysocki
2013-07-14 7:08 ` Mika Westerberg
2013-07-14 15:12 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox