* [PATCH v3 0/6] acpi,pci: hostbridge hotplug support
@ 2012-09-18 6:12 Taku Izumi
2012-09-18 6:19 ` [PATCH v3 1/8] ACPI, PCI: Use normal list for struct acpi_pci_driver Taku Izumi
` (8 more replies)
0 siblings, 9 replies; 95+ messages in thread
From: Taku Izumi @ 2012-09-18 6:12 UTC (permalink / raw)
To: linux-pci, bhelgaas, linux-acpi; +Cc: kaneshige.kenji, yinghai, jiang.liu
Hi all,
This patchset is 3rd version of the following:
http://marc.info/?l=linux-pci&m=134457928913775&w=2
http://marc.info/?l=linux-pci&m=134665909321684&w=2
v2 -> v3:
- change acpi_pci_drivers' add/remove interface according to Bjorn's suggestion
- abandon RCU for protecting acpi_pci_roots list according to Bjorn's suggestion
- change acpi_pci_find_root implementation to avoid potential deadlock
* [PATCH v3 1/8] ACPI, PCI: Use normal list for struct acpi_pci_driver
* [PATCH v3 2/8] ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
* [PATCH v3 3/8] ACPI, PCI: add acpi_pci_drivers protection
* [PATCH v3 4/8] ACPI, PCI: change acpi_pci_drivers' add/remove interface
* [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation
* [PATCH v3 6/8] ACPI, PCI: add acpi_pci_roots protection
* [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
* [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge
--
Best regards,
Taku Izumi <izumi.taku@jp.fujitsu.com>
^ permalink raw reply [flat|nested] 95+ messages in thread* [PATCH v3 1/8] ACPI, PCI: Use normal list for struct acpi_pci_driver
2012-09-18 6:12 [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Taku Izumi
@ 2012-09-18 6:19 ` Taku Izumi
2012-09-18 6:20 ` [PATCH v3 2/8] ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges Taku Izumi
` (7 subsequent siblings)
8 siblings, 0 replies; 95+ messages in thread
From: Taku Izumi @ 2012-09-18 6:19 UTC (permalink / raw)
To: linux-pci, bhelgaas; +Cc: linux-acpi, kaneshige.kenji, yinghai, jiang.liu
From: Jiang Liu <jiang.liu@huawei.com>
ACPI, PCI: Use normal list for struct acpi_pci_driver
Use normal list for struct acpi_pci_driver to simplify code.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
drivers/acpi/pci_root.c | 16 +++-------------
include/linux/acpi.h | 2 +-
2 files changed, 4 insertions(+), 14 deletions(-)
Index: Bjorn-next-0903/drivers/acpi/pci_root.c
===================================================================
--- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
+++ Bjorn-next-0903/drivers/acpi/pci_root.c
@@ -72,8 +72,8 @@ static struct acpi_driver acpi_pci_root_
};
static LIST_HEAD(acpi_pci_roots);
+static LIST_HEAD(acpi_pci_drivers);
-static struct acpi_pci_driver *sub_driver;
static DEFINE_MUTEX(osc_lock);
int acpi_pci_register_driver(struct acpi_pci_driver *driver)
@@ -81,10 +81,7 @@ int acpi_pci_register_driver(struct acpi
int n = 0;
struct acpi_pci_root *root;
- struct acpi_pci_driver **pptr = &sub_driver;
- while (*pptr)
- pptr = &(*pptr)->next;
- *pptr = driver;
+ list_add_tail(&driver->node, &acpi_pci_drivers);
if (!driver->add)
return 0;
@@ -103,14 +100,7 @@ void acpi_pci_unregister_driver(struct a
{
struct acpi_pci_root *root;
- struct acpi_pci_driver **pptr = &sub_driver;
- while (*pptr) {
- if (*pptr == driver)
- break;
- pptr = &(*pptr)->next;
- }
- BUG_ON(!*pptr);
- *pptr = (*pptr)->next;
+ list_del(&driver->node);
if (!driver->remove)
return;
Index: Bjorn-next-0903/include/linux/acpi.h
===================================================================
--- Bjorn-next-0903.orig/include/linux/acpi.h
+++ Bjorn-next-0903/include/linux/acpi.h
@@ -138,7 +138,7 @@ void acpi_penalize_isa_irq(int irq, int
void acpi_pci_irq_disable (struct pci_dev *dev);
struct acpi_pci_driver {
- struct acpi_pci_driver *next;
+ struct list_head node;
int (*add)(acpi_handle handle);
void (*remove)(acpi_handle handle);
};
^ permalink raw reply [flat|nested] 95+ messages in thread* [PATCH v3 2/8] ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
2012-09-18 6:12 [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Taku Izumi
2012-09-18 6:19 ` [PATCH v3 1/8] ACPI, PCI: Use normal list for struct acpi_pci_driver Taku Izumi
@ 2012-09-18 6:20 ` Taku Izumi
2012-09-18 6:21 ` [PATCH v3 3/8] ACPI, PCI: add acpi_pci_drivers protection Taku Izumi
` (6 subsequent siblings)
8 siblings, 0 replies; 95+ messages in thread
From: Taku Izumi @ 2012-09-18 6:20 UTC (permalink / raw)
To: linux-pci, bhelgaas; +Cc: linux-acpi, kaneshige.kenji, yinghai, jiang.liu
From: Jiang Liu <jiang.liu@huawei.com>
ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
When hot-plugging PCI root bridge, acpi_pci_drivers' add()/remove()
methods should be invoked to notify registered drivers.
-v2: Move add calling to acpi_pci_root_start by Yinghai
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
drivers/acpi/pci_root.c | 11 +++++++++++
1 file changed, 11 insertions(+)
Index: Bjorn-next-0808/drivers/acpi/pci_root.c
===================================================================
--- Bjorn-next-0808.orig/drivers/acpi/pci_root.c
+++ Bjorn-next-0808/drivers/acpi/pci_root.c
@@ -626,14 +626,25 @@ end:
static int acpi_pci_root_start(struct acpi_device *device)
{
struct acpi_pci_root *root = acpi_driver_data(device);
+ struct acpi_pci_driver *driver;
+
+ list_for_each_entry(driver, &acpi_pci_drivers, node)
+ if (driver->add)
+ driver->add(device->handle);
pci_bus_add_devices(root->bus);
+
return 0;
}
static int acpi_pci_root_remove(struct acpi_device *device, int type)
{
struct acpi_pci_root *root = acpi_driver_data(device);
+ struct acpi_pci_driver *driver;
+
+ list_for_each_entry(driver, &acpi_pci_drivers, node)
+ if (driver->remove)
+ driver->remove(root->device->handle);
device_set_run_wake(root->bus->bridge, false);
pci_acpi_remove_bus_pm_notifier(device);
^ permalink raw reply [flat|nested] 95+ messages in thread* [PATCH v3 3/8] ACPI, PCI: add acpi_pci_drivers protection
2012-09-18 6:12 [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Taku Izumi
2012-09-18 6:19 ` [PATCH v3 1/8] ACPI, PCI: Use normal list for struct acpi_pci_driver Taku Izumi
2012-09-18 6:20 ` [PATCH v3 2/8] ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges Taku Izumi
@ 2012-09-18 6:21 ` Taku Izumi
2012-09-18 6:22 ` [PATCH v3 4/8] ACPI, PCI: change acpi_pci_drivers' add/remove interface Taku Izumi
` (5 subsequent siblings)
8 siblings, 0 replies; 95+ messages in thread
From: Taku Izumi @ 2012-09-18 6:21 UTC (permalink / raw)
To: linux-pci, bhelgaas; +Cc: linux-acpi, kaneshige.kenji, yinghai, jiang.liu
Use mutex to protect global acpi_pci_drivers list against PCI
host bridge hotplug operations.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
drivers/acpi/pci_root.c | 36 +++++++++++++++++++-----------------
1 file changed, 19 insertions(+), 17 deletions(-)
Index: Bjorn-next-0903/drivers/acpi/pci_root.c
===================================================================
--- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
+++ Bjorn-next-0903/drivers/acpi/pci_root.c
@@ -27,7 +27,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
-#include <linux/spinlock.h>
+#include <linux/mutex.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/pci.h>
@@ -71,6 +71,8 @@ static struct acpi_driver acpi_pci_root_
},
};
+/* Lock to protect both acpi_pci_roots and acpi_pci_drivers lists */
+static DEFINE_MUTEX(acpi_pci_root_lock);
static LIST_HEAD(acpi_pci_roots);
static LIST_HEAD(acpi_pci_drivers);
@@ -81,34 +83,30 @@ int acpi_pci_register_driver(struct acpi
int n = 0;
struct acpi_pci_root *root;
+ mutex_lock(&acpi_pci_root_lock);
list_add_tail(&driver->node, &acpi_pci_drivers);
-
- if (!driver->add)
- return 0;
-
- list_for_each_entry(root, &acpi_pci_roots, node) {
- driver->add(root->device->handle);
- n++;
- }
+ if (driver->add)
+ list_for_each_entry(root, &acpi_pci_roots, node) {
+ driver->add(root->device->handle);
+ n++;
+ }
+ mutex_unlock(&acpi_pci_root_lock);
return n;
}
-
EXPORT_SYMBOL(acpi_pci_register_driver);
void acpi_pci_unregister_driver(struct acpi_pci_driver *driver)
{
struct acpi_pci_root *root;
+ mutex_lock(&acpi_pci_root_lock);
list_del(&driver->node);
-
- if (!driver->remove)
- return;
-
- list_for_each_entry(root, &acpi_pci_roots, node)
- driver->remove(root->device->handle);
+ if (driver->remove)
+ list_for_each_entry(root, &acpi_pci_roots, node)
+ driver->remove(root->device->handle);
+ mutex_unlock(&acpi_pci_root_lock);
}
-
EXPORT_SYMBOL(acpi_pci_unregister_driver);
acpi_handle acpi_get_pci_rootbridge_handle(unsigned int seg, unsigned int bus)
@@ -628,9 +626,11 @@ static int acpi_pci_root_start(struct ac
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;
+ mutex_lock(&acpi_pci_root_lock);
list_for_each_entry(driver, &acpi_pci_drivers, node)
if (driver->add)
driver->add(device->handle);
+ mutex_unlock(&acpi_pci_root_lock);
pci_bus_add_devices(root->bus);
@@ -642,9 +642,11 @@ static int acpi_pci_root_remove(struct a
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;
+ mutex_lock(&acpi_pci_root_lock);
list_for_each_entry(driver, &acpi_pci_drivers, node)
if (driver->remove)
driver->remove(root->device->handle);
+ mutex_unlock(&acpi_pci_root_lock);
device_set_run_wake(root->bus->bridge, false);
pci_acpi_remove_bus_pm_notifier(device);
^ permalink raw reply [flat|nested] 95+ messages in thread* [PATCH v3 4/8] ACPI, PCI: change acpi_pci_drivers' add/remove interface
2012-09-18 6:12 [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Taku Izumi
` (2 preceding siblings ...)
2012-09-18 6:21 ` [PATCH v3 3/8] ACPI, PCI: add acpi_pci_drivers protection Taku Izumi
@ 2012-09-18 6:22 ` Taku Izumi
2012-09-19 22:46 ` Bjorn Helgaas
2012-09-18 6:23 ` [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation Taku Izumi
` (4 subsequent siblings)
8 siblings, 1 reply; 95+ messages in thread
From: Taku Izumi @ 2012-09-18 6:22 UTC (permalink / raw)
To: linux-pci, bhelgaas; +Cc: linux-acpi, kaneshige.kenji, yinghai, jiang.liu
This patch changes .add/.remove interfaces of acpi_pci_driver.
In the current implementation acpi_handle is passed as a parameter
of .add/.remove interface. However acpi_pci_root structure other
than acpi_handle is more usefull. This enables us to avoid useless
procedure in each acpi_pci_driver.
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
drivers/acpi/pci_root.c | 8 ++++----
drivers/acpi/pci_slot.c | 11 ++++++-----
drivers/pci/hotplug/acpiphp_glue.c | 12 +++++++-----
include/linux/acpi.h | 4 ++--
4 files changed, 19 insertions(+), 16 deletions(-)
Index: Bjorn-next-0903/include/linux/acpi.h
===================================================================
--- Bjorn-next-0903.orig/include/linux/acpi.h
+++ Bjorn-next-0903/include/linux/acpi.h
@@ -139,8 +139,8 @@ void acpi_pci_irq_disable (struct pci_de
struct acpi_pci_driver {
struct list_head node;
- int (*add)(acpi_handle handle);
- void (*remove)(acpi_handle handle);
+ int (*add)(struct acpi_pci_root *root);
+ void (*remove)(struct acpi_pci_root *root);
};
int acpi_pci_register_driver(struct acpi_pci_driver *driver);
Index: Bjorn-next-0903/drivers/pci/hotplug/acpiphp_glue.c
===================================================================
--- Bjorn-next-0903.orig/drivers/pci/hotplug/acpiphp_glue.c
+++ Bjorn-next-0903/drivers/pci/hotplug/acpiphp_glue.c
@@ -382,10 +382,10 @@ static inline void config_p2p_bridge_fla
/* allocate and initialize host bridge data structure */
-static void add_host_bridge(acpi_handle *handle)
+static void add_host_bridge(struct acpi_pci_root *root)
{
struct acpiphp_bridge *bridge;
- struct acpi_pci_root *root = acpi_pci_find_root(handle);
+ acpi_handle handle = root->device->handle;
bridge = kzalloc(sizeof(struct acpiphp_bridge), GFP_KERNEL);
if (bridge == NULL)
@@ -468,11 +468,12 @@ find_p2p_bridge(acpi_handle handle, u32
/* find hot-pluggable slots, and then find P2P bridge */
-static int add_bridge(acpi_handle handle)
+static int add_bridge(struct acpi_pci_root *root)
{
acpi_status status;
unsigned long long tmp;
acpi_handle dummy_handle;
+ acpi_handle handle = root->device->handle;
/* if the bridge doesn't have _STA, we assume it is always there */
status = acpi_get_handle(handle, "_STA", &dummy_handle);
@@ -490,7 +491,7 @@ static int add_bridge(acpi_handle handle
/* check if this bridge has ejectable slots */
if (detect_ejectable_slots(handle) > 0) {
dbg("found PCI host-bus bridge with hot-pluggable slots\n");
- add_host_bridge(handle);
+ add_host_bridge(root);
}
/* search P2P bridges under this host bridge */
@@ -588,9 +589,10 @@ cleanup_p2p_bridge(acpi_handle handle, u
return AE_OK;
}
-static void remove_bridge(acpi_handle handle)
+static void remove_bridge(struct acpi_pci_root *root)
{
struct acpiphp_bridge *bridge;
+ acpi_handle handle = root->device->handle;
/* cleanup p2p bridges under this host bridge
in a depth-first manner */
Index: Bjorn-next-0903/drivers/acpi/pci_slot.c
===================================================================
--- Bjorn-next-0903.orig/drivers/acpi/pci_slot.c
+++ Bjorn-next-0903/drivers/acpi/pci_slot.c
@@ -67,8 +67,8 @@ struct acpi_pci_slot {
struct list_head list; /* node in the list of slots */
};
-static int acpi_pci_slot_add(acpi_handle handle);
-static void acpi_pci_slot_remove(acpi_handle handle);
+static int acpi_pci_slot_add(struct acpi_pci_root *root);
+static void acpi_pci_slot_remove(struct acpi_pci_root *root);
static LIST_HEAD(slot_list);
static DEFINE_MUTEX(slot_list_lock);
@@ -295,11 +295,11 @@ walk_root_bridge(acpi_handle handle, acp
* @handle: points to an acpi_pci_root
*/
static int
-acpi_pci_slot_add(acpi_handle handle)
+acpi_pci_slot_add(struct acpi_pci_root *root)
{
acpi_status status;
- status = walk_root_bridge(handle, register_slot);
+ status = walk_root_bridge(root->device->handle, register_slot);
if (ACPI_FAILURE(status))
err("%s: register_slot failure - %d\n", __func__, status);
@@ -311,10 +311,11 @@ acpi_pci_slot_add(acpi_handle handle)
* @handle: points to an acpi_pci_root
*/
static void
-acpi_pci_slot_remove(acpi_handle handle)
+acpi_pci_slot_remove(struct acpi_pci_root *root)
{
struct acpi_pci_slot *slot, *tmp;
struct pci_bus *pbus;
+ acpi_handle handle = root->device->handle;
mutex_lock(&slot_list_lock);
list_for_each_entry_safe(slot, tmp, &slot_list, list) {
Index: Bjorn-next-0903/drivers/acpi/pci_root.c
===================================================================
--- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
+++ Bjorn-next-0903/drivers/acpi/pci_root.c
@@ -87,7 +87,7 @@ int acpi_pci_register_driver(struct acpi
list_add_tail(&driver->node, &acpi_pci_drivers);
if (driver->add)
list_for_each_entry(root, &acpi_pci_roots, node) {
- driver->add(root->device->handle);
+ driver->add(root);
n++;
}
mutex_unlock(&acpi_pci_root_lock);
@@ -104,7 +104,7 @@ void acpi_pci_unregister_driver(struct a
list_del(&driver->node);
if (driver->remove)
list_for_each_entry(root, &acpi_pci_roots, node)
- driver->remove(root->device->handle);
+ driver->remove(root);
mutex_unlock(&acpi_pci_root_lock);
}
EXPORT_SYMBOL(acpi_pci_unregister_driver);
@@ -629,7 +629,7 @@ static int acpi_pci_root_start(struct ac
mutex_lock(&acpi_pci_root_lock);
list_for_each_entry(driver, &acpi_pci_drivers, node)
if (driver->add)
- driver->add(device->handle);
+ driver->add(root);
mutex_unlock(&acpi_pci_root_lock);
pci_bus_add_devices(root->bus);
@@ -645,7 +645,7 @@ static int acpi_pci_root_remove(struct a
mutex_lock(&acpi_pci_root_lock);
list_for_each_entry(driver, &acpi_pci_drivers, node)
if (driver->remove)
- driver->remove(root->device->handle);
+ driver->remove(root);
mutex_unlock(&acpi_pci_root_lock);
device_set_run_wake(root->bus->bridge, false);
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 4/8] ACPI, PCI: change acpi_pci_drivers' add/remove interface
2012-09-18 6:22 ` [PATCH v3 4/8] ACPI, PCI: change acpi_pci_drivers' add/remove interface Taku Izumi
@ 2012-09-19 22:46 ` Bjorn Helgaas
2012-09-20 10:15 ` Taku Izumi
0 siblings, 1 reply; 95+ messages in thread
From: Bjorn Helgaas @ 2012-09-19 22:46 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
On Tue, Sep 18, 2012 at 12:22 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>
> This patch changes .add/.remove interfaces of acpi_pci_driver.
> In the current implementation acpi_handle is passed as a parameter
> of .add/.remove interface. However acpi_pci_root structure other
> than acpi_handle is more usefull. This enables us to avoid useless
> procedure in each acpi_pci_driver.
Now that .add() gets the struct acpi_pci_root, would you like to clean
up walk_root_bridge()? I think we could remove the _SEG and _BBN
evaluations as well as the pci_find_bus(), since that information is
all in the struct acpi_pci_root.
This should be a separate patch, if you choose to do it :)
> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
> ---
> drivers/acpi/pci_root.c | 8 ++++----
> drivers/acpi/pci_slot.c | 11 ++++++-----
> drivers/pci/hotplug/acpiphp_glue.c | 12 +++++++-----
> include/linux/acpi.h | 4 ++--
> 4 files changed, 19 insertions(+), 16 deletions(-)
>
> Index: Bjorn-next-0903/include/linux/acpi.h
> ===================================================================
> --- Bjorn-next-0903.orig/include/linux/acpi.h
> +++ Bjorn-next-0903/include/linux/acpi.h
> @@ -139,8 +139,8 @@ void acpi_pci_irq_disable (struct pci_de
>
> struct acpi_pci_driver {
> struct list_head node;
> - int (*add)(acpi_handle handle);
> - void (*remove)(acpi_handle handle);
> + int (*add)(struct acpi_pci_root *root);
> + void (*remove)(struct acpi_pci_root *root);
> };
>
> int acpi_pci_register_driver(struct acpi_pci_driver *driver);
> Index: Bjorn-next-0903/drivers/pci/hotplug/acpiphp_glue.c
> ===================================================================
> --- Bjorn-next-0903.orig/drivers/pci/hotplug/acpiphp_glue.c
> +++ Bjorn-next-0903/drivers/pci/hotplug/acpiphp_glue.c
> @@ -382,10 +382,10 @@ static inline void config_p2p_bridge_fla
>
>
> /* allocate and initialize host bridge data structure */
> -static void add_host_bridge(acpi_handle *handle)
> +static void add_host_bridge(struct acpi_pci_root *root)
> {
> struct acpiphp_bridge *bridge;
> - struct acpi_pci_root *root = acpi_pci_find_root(handle);
> + acpi_handle handle = root->device->handle;
>
> bridge = kzalloc(sizeof(struct acpiphp_bridge), GFP_KERNEL);
> if (bridge == NULL)
> @@ -468,11 +468,12 @@ find_p2p_bridge(acpi_handle handle, u32
>
>
> /* find hot-pluggable slots, and then find P2P bridge */
> -static int add_bridge(acpi_handle handle)
> +static int add_bridge(struct acpi_pci_root *root)
> {
> acpi_status status;
> unsigned long long tmp;
> acpi_handle dummy_handle;
> + acpi_handle handle = root->device->handle;
>
> /* if the bridge doesn't have _STA, we assume it is always there */
> status = acpi_get_handle(handle, "_STA", &dummy_handle);
> @@ -490,7 +491,7 @@ static int add_bridge(acpi_handle handle
> /* check if this bridge has ejectable slots */
> if (detect_ejectable_slots(handle) > 0) {
> dbg("found PCI host-bus bridge with hot-pluggable slots\n");
> - add_host_bridge(handle);
> + add_host_bridge(root);
> }
>
> /* search P2P bridges under this host bridge */
> @@ -588,9 +589,10 @@ cleanup_p2p_bridge(acpi_handle handle, u
> return AE_OK;
> }
>
> -static void remove_bridge(acpi_handle handle)
> +static void remove_bridge(struct acpi_pci_root *root)
> {
> struct acpiphp_bridge *bridge;
> + acpi_handle handle = root->device->handle;
>
> /* cleanup p2p bridges under this host bridge
> in a depth-first manner */
> Index: Bjorn-next-0903/drivers/acpi/pci_slot.c
> ===================================================================
> --- Bjorn-next-0903.orig/drivers/acpi/pci_slot.c
> +++ Bjorn-next-0903/drivers/acpi/pci_slot.c
> @@ -67,8 +67,8 @@ struct acpi_pci_slot {
> struct list_head list; /* node in the list of slots */
> };
>
> -static int acpi_pci_slot_add(acpi_handle handle);
> -static void acpi_pci_slot_remove(acpi_handle handle);
> +static int acpi_pci_slot_add(struct acpi_pci_root *root);
> +static void acpi_pci_slot_remove(struct acpi_pci_root *root);
>
> static LIST_HEAD(slot_list);
> static DEFINE_MUTEX(slot_list_lock);
> @@ -295,11 +295,11 @@ walk_root_bridge(acpi_handle handle, acp
> * @handle: points to an acpi_pci_root
> */
> static int
> -acpi_pci_slot_add(acpi_handle handle)
> +acpi_pci_slot_add(struct acpi_pci_root *root)
> {
> acpi_status status;
>
> - status = walk_root_bridge(handle, register_slot);
> + status = walk_root_bridge(root->device->handle, register_slot);
> if (ACPI_FAILURE(status))
> err("%s: register_slot failure - %d\n", __func__, status);
>
> @@ -311,10 +311,11 @@ acpi_pci_slot_add(acpi_handle handle)
> * @handle: points to an acpi_pci_root
> */
> static void
> -acpi_pci_slot_remove(acpi_handle handle)
> +acpi_pci_slot_remove(struct acpi_pci_root *root)
> {
> struct acpi_pci_slot *slot, *tmp;
> struct pci_bus *pbus;
> + acpi_handle handle = root->device->handle;
>
> mutex_lock(&slot_list_lock);
> list_for_each_entry_safe(slot, tmp, &slot_list, list) {
> Index: Bjorn-next-0903/drivers/acpi/pci_root.c
> ===================================================================
> --- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
> +++ Bjorn-next-0903/drivers/acpi/pci_root.c
> @@ -87,7 +87,7 @@ int acpi_pci_register_driver(struct acpi
> list_add_tail(&driver->node, &acpi_pci_drivers);
> if (driver->add)
> list_for_each_entry(root, &acpi_pci_roots, node) {
> - driver->add(root->device->handle);
> + driver->add(root);
> n++;
> }
> mutex_unlock(&acpi_pci_root_lock);
> @@ -104,7 +104,7 @@ void acpi_pci_unregister_driver(struct a
> list_del(&driver->node);
> if (driver->remove)
> list_for_each_entry(root, &acpi_pci_roots, node)
> - driver->remove(root->device->handle);
> + driver->remove(root);
> mutex_unlock(&acpi_pci_root_lock);
> }
> EXPORT_SYMBOL(acpi_pci_unregister_driver);
> @@ -629,7 +629,7 @@ static int acpi_pci_root_start(struct ac
> mutex_lock(&acpi_pci_root_lock);
> list_for_each_entry(driver, &acpi_pci_drivers, node)
> if (driver->add)
> - driver->add(device->handle);
> + driver->add(root);
> mutex_unlock(&acpi_pci_root_lock);
>
> pci_bus_add_devices(root->bus);
> @@ -645,7 +645,7 @@ static int acpi_pci_root_remove(struct a
> mutex_lock(&acpi_pci_root_lock);
> list_for_each_entry(driver, &acpi_pci_drivers, node)
> if (driver->remove)
> - driver->remove(root->device->handle);
> + driver->remove(root);
> mutex_unlock(&acpi_pci_root_lock);
>
> device_set_run_wake(root->bus->bridge, false);
>
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 4/8] ACPI, PCI: change acpi_pci_drivers' add/remove interface
2012-09-19 22:46 ` Bjorn Helgaas
@ 2012-09-20 10:15 ` Taku Izumi
2012-09-21 7:03 ` [PATCH] change signature of walk_root_bridge() function Taku Izumi
0 siblings, 1 reply; 95+ messages in thread
From: Taku Izumi @ 2012-09-20 10:15 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
On Wed, 19 Sep 2012 16:46:57 -0600
Bjorn Helgaas <bhelgaas@google.com> wrote:
> This should be a separate patch, if you choose to do it :)
OK. I'll do this later.
--
Taku Izumi <izumi.taku@jp.fujitsu.com>
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH] change signature of walk_root_bridge() function
2012-09-20 10:15 ` Taku Izumi
@ 2012-09-21 7:03 ` Taku Izumi
2012-09-21 13:24 ` Bjorn Helgaas
0 siblings, 1 reply; 95+ messages in thread
From: Taku Izumi @ 2012-09-21 7:03 UTC (permalink / raw)
To: Taku Izumi
Cc: Bjorn Helgaas, linux-pci, linux-acpi, kaneshige.kenji, yinghai,
jiang.liu
This patch changes the function signature of walk_root_bridge().
We can omit _STA, _SEG, and _BBN evaluation by passing not acpi_handle
but acpi_pci_root. Now that acpi_pci_slot_add() which is the only
caller of walk_root_bridge() gets acpi_pci_root structure, changing
signature of walk_root_bridge() is reasonable.
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
drivers/acpi/pci_slot.c | 35 +++++------------------------------
1 file changed, 5 insertions(+), 30 deletions(-)
Index: Bjorn-next-0903/drivers/acpi/pci_slot.c
===================================================================
--- Bjorn-next-0903.orig/drivers/acpi/pci_slot.c
+++ Bjorn-next-0903/drivers/acpi/pci_slot.c
@@ -233,45 +233,20 @@ out:
/*
* walk_root_bridge - generic root bridge walker
- * @handle: points to an acpi_pci_root
+ * @root: poiner of an acpi_pci_root
* @user_function: user callback for slot objects
*
* Call user_function for all objects underneath this root bridge.
* Walk p2p bridges underneath us and call user_function on those too.
*/
static int
-walk_root_bridge(acpi_handle handle, acpi_walk_callback user_function)
+walk_root_bridge(struct acpi_pci_root *root, acpi_walk_callback user_function)
{
- int seg, bus;
- unsigned long long tmp;
acpi_status status;
- acpi_handle dummy_handle;
- struct pci_bus *pci_bus;
+ acpi_handle handle = root->device->handle;
+ struct pci_bus *pci_bus = root->bus;
struct callback_args context;
- /* If the bridge doesn't have _STA, we assume it is always there */
- status = acpi_get_handle(handle, "_STA", &dummy_handle);
- if (ACPI_SUCCESS(status)) {
- status = acpi_evaluate_integer(handle, "_STA", NULL, &tmp);
- if (ACPI_FAILURE(status)) {
- info("%s: _STA evaluation failure\n", __func__);
- return 0;
- }
- if ((tmp & ACPI_STA_DEVICE_FUNCTIONING) == 0)
- /* don't register this object */
- return 0;
- }
-
- status = acpi_evaluate_integer(handle, "_SEG", NULL, &tmp);
- seg = ACPI_SUCCESS(status) ? tmp : 0;
-
- status = acpi_evaluate_integer(handle, "_BBN", NULL, &tmp);
- bus = ACPI_SUCCESS(status) ? tmp : 0;
-
- pci_bus = pci_find_bus(seg, bus);
- if (!pci_bus)
- return 0;
-
context.pci_bus = pci_bus;
context.user_function = user_function;
context.root_handle = handle;
@@ -299,7 +274,7 @@ acpi_pci_slot_add(struct acpi_pci_root *
{
acpi_status status;
- status = walk_root_bridge(root->device->handle, register_slot);
+ status = walk_root_bridge(root, register_slot);
if (ACPI_FAILURE(status))
err("%s: register_slot failure - %d\n", __func__, status);
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH] change signature of walk_root_bridge() function
2012-09-21 7:03 ` [PATCH] change signature of walk_root_bridge() function Taku Izumi
@ 2012-09-21 13:24 ` Bjorn Helgaas
0 siblings, 0 replies; 95+ messages in thread
From: Bjorn Helgaas @ 2012-09-21 13:24 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
On Fri, Sep 21, 2012 at 1:03 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>
> This patch changes the function signature of walk_root_bridge().
>
> We can omit _STA, _SEG, and _BBN evaluation by passing not acpi_handle
> but acpi_pci_root. Now that acpi_pci_slot_add() which is the only
> caller of walk_root_bridge() gets acpi_pci_root structure, changing
> signature of walk_root_bridge() is reasonable.
>
>
> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
> ---
> drivers/acpi/pci_slot.c | 35 +++++------------------------------
> 1 file changed, 5 insertions(+), 30 deletions(-)
This is beautiful!
> Index: Bjorn-next-0903/drivers/acpi/pci_slot.c
> ===================================================================
> --- Bjorn-next-0903.orig/drivers/acpi/pci_slot.c
> +++ Bjorn-next-0903/drivers/acpi/pci_slot.c
> @@ -233,45 +233,20 @@ out:
>
> /*
> * walk_root_bridge - generic root bridge walker
> - * @handle: points to an acpi_pci_root
> + * @root: poiner of an acpi_pci_root
> * @user_function: user callback for slot objects
> *
> * Call user_function for all objects underneath this root bridge.
> * Walk p2p bridges underneath us and call user_function on those too.
> */
> static int
> -walk_root_bridge(acpi_handle handle, acpi_walk_callback user_function)
> +walk_root_bridge(struct acpi_pci_root *root, acpi_walk_callback user_function)
> {
> - int seg, bus;
> - unsigned long long tmp;
> acpi_status status;
> - acpi_handle dummy_handle;
> - struct pci_bus *pci_bus;
> + acpi_handle handle = root->device->handle;
> + struct pci_bus *pci_bus = root->bus;
> struct callback_args context;
>
> - /* If the bridge doesn't have _STA, we assume it is always there */
> - status = acpi_get_handle(handle, "_STA", &dummy_handle);
> - if (ACPI_SUCCESS(status)) {
> - status = acpi_evaluate_integer(handle, "_STA", NULL, &tmp);
> - if (ACPI_FAILURE(status)) {
> - info("%s: _STA evaluation failure\n", __func__);
> - return 0;
> - }
> - if ((tmp & ACPI_STA_DEVICE_FUNCTIONING) == 0)
> - /* don't register this object */
> - return 0;
> - }
> -
> - status = acpi_evaluate_integer(handle, "_SEG", NULL, &tmp);
> - seg = ACPI_SUCCESS(status) ? tmp : 0;
> -
> - status = acpi_evaluate_integer(handle, "_BBN", NULL, &tmp);
> - bus = ACPI_SUCCESS(status) ? tmp : 0;
> -
> - pci_bus = pci_find_bus(seg, bus);
> - if (!pci_bus)
> - return 0;
> -
> context.pci_bus = pci_bus;
> context.user_function = user_function;
> context.root_handle = handle;
> @@ -299,7 +274,7 @@ acpi_pci_slot_add(struct acpi_pci_root *
> {
> acpi_status status;
>
> - status = walk_root_bridge(root->device->handle, register_slot);
> + status = walk_root_bridge(root, register_slot);
> if (ACPI_FAILURE(status))
> err("%s: register_slot failure - %d\n", __func__, status);
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation
2012-09-18 6:12 [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Taku Izumi
` (3 preceding siblings ...)
2012-09-18 6:22 ` [PATCH v3 4/8] ACPI, PCI: change acpi_pci_drivers' add/remove interface Taku Izumi
@ 2012-09-18 6:23 ` Taku Izumi
2012-09-19 22:03 ` Bjorn Helgaas
2012-09-18 6:24 ` [PATCH v3 6/8] ACPI, PCI: add acpi_pci_roots protection Taku Izumi
` (3 subsequent siblings)
8 siblings, 1 reply; 95+ messages in thread
From: Taku Izumi @ 2012-09-18 6:23 UTC (permalink / raw)
To: linux-pci, bhelgaas; +Cc: linux-acpi, kaneshige.kenji, yinghai, jiang.liu
This patch changes the implementation of acpi_pci_find_root().
We can access acpi_pci_root without scanning acpi_pci_roots list.
If hostbridge hotplug is supported, acpi_pci_roots list will be
protected by mutex. We should not access acpi_pci_roots list
if preventable to lessen deadlock risk.
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
drivers/acpi/pci_root.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
Index: Bjorn-next-0903/drivers/acpi/pci_root.c
===================================================================
--- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
+++ Bjorn-next-0903/drivers/acpi/pci_root.c
@@ -265,12 +265,15 @@ static acpi_status acpi_pci_osc_support(
struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle)
{
struct acpi_pci_root *root;
+ struct acpi_device *device;
- list_for_each_entry(root, &acpi_pci_roots, node) {
- if (root->device->handle == handle)
- return root;
- }
- return NULL;
+ if (acpi_bus_get_device(handle, &device) ||
+ acpi_match_device_ids(device, root_device_ids))
+ return NULL;
+
+ root = acpi_driver_data(device);
+
+ return root;
}
EXPORT_SYMBOL_GPL(acpi_pci_find_root);
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation
2012-09-18 6:23 ` [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation Taku Izumi
@ 2012-09-19 22:03 ` Bjorn Helgaas
2012-09-21 7:14 ` Taku Izumi
0 siblings, 1 reply; 95+ messages in thread
From: Bjorn Helgaas @ 2012-09-19 22:03 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
On Tue, Sep 18, 2012 at 12:23 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>
> This patch changes the implementation of acpi_pci_find_root().
>
> We can access acpi_pci_root without scanning acpi_pci_roots list.
> If hostbridge hotplug is supported, acpi_pci_roots list will be
> protected by mutex. We should not access acpi_pci_roots list
> if preventable to lessen deadlock risk.
>
> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
> ---
> drivers/acpi/pci_root.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> Index: Bjorn-next-0903/drivers/acpi/pci_root.c
> ===================================================================
> --- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
> +++ Bjorn-next-0903/drivers/acpi/pci_root.c
> @@ -265,12 +265,15 @@ static acpi_status acpi_pci_osc_support(
> struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle)
> {
> struct acpi_pci_root *root;
> + struct acpi_device *device;
>
> - list_for_each_entry(root, &acpi_pci_roots, node) {
> - if (root->device->handle == handle)
> - return root;
> - }
> - return NULL;
> + if (acpi_bus_get_device(handle, &device) ||
> + acpi_match_device_ids(device, root_device_ids))
What's the purpose of the acpi_match_device_ids() check? It's not
obvious, so worth calling it out in the changelog, and maybe even a
comment in the code.
Nice to get rid of the list traversal.
> + return NULL;
> +
> + root = acpi_driver_data(device);
> +
> + return root;
> }
> EXPORT_SYMBOL_GPL(acpi_pci_find_root);
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation
2012-09-19 22:03 ` Bjorn Helgaas
@ 2012-09-21 7:14 ` Taku Izumi
2012-09-21 17:57 ` Bjorn Helgaas
0 siblings, 1 reply; 95+ messages in thread
From: Taku Izumi @ 2012-09-21 7:14 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
On Wed, 19 Sep 2012 16:03:27 -0600
Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Tue, Sep 18, 2012 at 12:23 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
> >
> > This patch changes the implementation of acpi_pci_find_root().
> >
> > We can access acpi_pci_root without scanning acpi_pci_roots list.
> > If hostbridge hotplug is supported, acpi_pci_roots list will be
> > protected by mutex. We should not access acpi_pci_roots list
> > if preventable to lessen deadlock risk.
> >
> > Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
> > ---
> > drivers/acpi/pci_root.c | 13 ++++++++-----
> > 1 file changed, 8 insertions(+), 5 deletions(-)
> >
> > Index: Bjorn-next-0903/drivers/acpi/pci_root.c
> > ===================================================================
> > --- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
> > +++ Bjorn-next-0903/drivers/acpi/pci_root.c
> > @@ -265,12 +265,15 @@ static acpi_status acpi_pci_osc_support(
> > struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle)
> > {
> > struct acpi_pci_root *root;
> > + struct acpi_device *device;
> >
> > - list_for_each_entry(root, &acpi_pci_roots, node) {
> > - if (root->device->handle == handle)
> > - return root;
> > - }
> > - return NULL;
> > + if (acpi_bus_get_device(handle, &device) ||
> > + acpi_match_device_ids(device, root_device_ids))
>
> What's the purpose of the acpi_match_device_ids() check? It's not
> obvious, so worth calling it out in the changelog, and maybe even a
> comment in the code.
My intention is to reject acpi_handle which doesn't represent
hostbrige. I think this is reasonable...
Best regards,
Taku Izumi
>
> Nice to get rid of the list traversal.
>
> > + return NULL;
> > +
> > + root = acpi_driver_data(device);
> > +
> > + return root;
> > }
> > EXPORT_SYMBOL_GPL(acpi_pci_find_root);
> >
> >
>
--
Taku Izumi <izumi.taku@jp.fujitsu.com>
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation
2012-09-21 7:14 ` Taku Izumi
@ 2012-09-21 17:57 ` Bjorn Helgaas
0 siblings, 0 replies; 95+ messages in thread
From: Bjorn Helgaas @ 2012-09-21 17:57 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
On Fri, Sep 21, 2012 at 1:14 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
> On Wed, 19 Sep 2012 16:03:27 -0600
> Bjorn Helgaas <bhelgaas@google.com> wrote:
>
>> On Tue, Sep 18, 2012 at 12:23 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>> >
>> > This patch changes the implementation of acpi_pci_find_root().
>> >
>> > We can access acpi_pci_root without scanning acpi_pci_roots list.
>> > If hostbridge hotplug is supported, acpi_pci_roots list will be
>> > protected by mutex. We should not access acpi_pci_roots list
>> > if preventable to lessen deadlock risk.
>> >
>> > Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
>> > ---
>> > drivers/acpi/pci_root.c | 13 ++++++++-----
>> > 1 file changed, 8 insertions(+), 5 deletions(-)
>> >
>> > Index: Bjorn-next-0903/drivers/acpi/pci_root.c
>> > ===================================================================
>> > --- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
>> > +++ Bjorn-next-0903/drivers/acpi/pci_root.c
>> > @@ -265,12 +265,15 @@ static acpi_status acpi_pci_osc_support(
>> > struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle)
>> > {
>> > struct acpi_pci_root *root;
>> > + struct acpi_device *device;
>> >
>> > - list_for_each_entry(root, &acpi_pci_roots, node) {
>> > - if (root->device->handle == handle)
>> > - return root;
>> > - }
>> > - return NULL;
>> > + if (acpi_bus_get_device(handle, &device) ||
>> > + acpi_match_device_ids(device, root_device_ids))
>>
>> What's the purpose of the acpi_match_device_ids() check? It's not
>> obvious, so worth calling it out in the changelog, and maybe even a
>> comment in the code.
>
> My intention is to reject acpi_handle which doesn't represent
> hostbrige. I think this is reasonable...
Yes, I understand that part. I was just trying to figure out why that
check is needed. Is there a path where we can call
acpi_pci_find_root() with a handle that is *not* a PNP0A03 device? I
looked at all the callers, and as far as I can tell, the supplied
handle is always for a host bridge device.
But I guess I don't object to the check. This is just another case of
a lookup that in many cases is unnecessary because we should have the
struct acpi_pci_root * available already.
>> Nice to get rid of the list traversal.
>>
>> > + return NULL;
>> > +
>> > + root = acpi_driver_data(device);
>> > +
>> > + return root;
>> > }
>> > EXPORT_SYMBOL_GPL(acpi_pci_find_root);
>> >
>> >
>>
>
>
> --
> Taku Izumi <izumi.taku@jp.fujitsu.com>
>
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH v3 6/8] ACPI, PCI: add acpi_pci_roots protection
2012-09-18 6:12 [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Taku Izumi
` (4 preceding siblings ...)
2012-09-18 6:23 ` [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation Taku Izumi
@ 2012-09-18 6:24 ` Taku Izumi
2012-09-20 19:32 ` Bjorn Helgaas
2012-09-18 6:25 ` [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function Taku Izumi
` (2 subsequent siblings)
8 siblings, 1 reply; 95+ messages in thread
From: Taku Izumi @ 2012-09-18 6:24 UTC (permalink / raw)
To: linux-pci, bhelgaas; +Cc: linux-acpi, kaneshige.kenji, yinghai, jiang.liu
Use mutex to protect acpi_pci_roots list against PCI host bridge
hotplug operations.
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
drivers/acpi/pci_root.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
Index: Bjorn-next-0903/drivers/acpi/pci_root.c
===================================================================
--- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
+++ Bjorn-next-0903/drivers/acpi/pci_root.c
@@ -112,12 +112,17 @@ EXPORT_SYMBOL(acpi_pci_unregister_driver
acpi_handle acpi_get_pci_rootbridge_handle(unsigned int seg, unsigned int bus)
{
struct acpi_pci_root *root;
+ struct acpi_handle *handle = NULL;
+ mutex_lock(&acpi_pci_root_lock);
list_for_each_entry(root, &acpi_pci_roots, node)
if ((root->segment == (u16) seg) &&
- (root->secondary.start == (u16) bus))
- return root->device->handle;
- return NULL;
+ (root->secondary.start == (u16) bus)) {
+ handle = root->device->handle;
+ break;
+ }
+ mutex_unlock(&acpi_pci_root_lock);
+ return handle;
}
EXPORT_SYMBOL_GPL(acpi_get_pci_rootbridge_handle);
@@ -509,8 +514,9 @@ static int __devinit acpi_pci_root_add(s
* TBD: Need PCI interface for enumeration/configuration of roots.
*/
- /* TBD: Locking */
+ mutex_lock(&acpi_pci_root_lock);
list_add_tail(&root->node, &acpi_pci_roots);
+ mutex_unlock(&acpi_pci_root_lock);
printk(KERN_INFO PREFIX "%s [%s] (domain %04x %pR)\n",
acpi_device_name(device), acpi_device_bid(device),
@@ -529,7 +535,7 @@ static int __devinit acpi_pci_root_add(s
"Bus %04x:%02x not present in PCI namespace\n",
root->segment, (unsigned int)root->secondary.start);
result = -ENODEV;
- goto end;
+ goto out_del_root;
}
/*
@@ -539,7 +545,7 @@ static int __devinit acpi_pci_root_add(s
*/
result = acpi_pci_bind_root(device);
if (result)
- goto end;
+ goto out_del_root;
/*
* PCI Routing Table
@@ -617,9 +623,11 @@ static int __devinit acpi_pci_root_add(s
return 0;
+out_del_root:
+ mutex_lock(&acpi_pci_root_lock);
+ list_del(&root->node);
+ mutex_unlock(&acpi_pci_root_lock);
end:
- if (!list_empty(&root->node))
- list_del(&root->node);
kfree(root);
return result;
}
@@ -649,11 +657,12 @@ static int acpi_pci_root_remove(struct a
list_for_each_entry(driver, &acpi_pci_drivers, node)
if (driver->remove)
driver->remove(root);
- mutex_unlock(&acpi_pci_root_lock);
device_set_run_wake(root->bus->bridge, false);
pci_acpi_remove_bus_pm_notifier(device);
+ list_del(&root->node);
+ mutex_unlock(&acpi_pci_root_lock);
kfree(root);
return 0;
}
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 6/8] ACPI, PCI: add acpi_pci_roots protection
2012-09-18 6:24 ` [PATCH v3 6/8] ACPI, PCI: add acpi_pci_roots protection Taku Izumi
@ 2012-09-20 19:32 ` Bjorn Helgaas
0 siblings, 0 replies; 95+ messages in thread
From: Bjorn Helgaas @ 2012-09-20 19:32 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
On Tue, Sep 18, 2012 at 12:24 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>
> Use mutex to protect acpi_pci_roots list against PCI host bridge
> hotplug operations.
>
> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
> ---
> drivers/acpi/pci_root.c | 27 ++++++++++++++++++---------
> 1 file changed, 18 insertions(+), 9 deletions(-)
>
> Index: Bjorn-next-0903/drivers/acpi/pci_root.c
> ===================================================================
> --- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
> +++ Bjorn-next-0903/drivers/acpi/pci_root.c
> @@ -112,12 +112,17 @@ EXPORT_SYMBOL(acpi_pci_unregister_driver
> acpi_handle acpi_get_pci_rootbridge_handle(unsigned int seg, unsigned int bus)
> {
> struct acpi_pci_root *root;
> + struct acpi_handle *handle = NULL;
This should be "acpi_handle handle", not "struct acpi_handle *handle".
> + mutex_lock(&acpi_pci_root_lock);
> list_for_each_entry(root, &acpi_pci_roots, node)
> if ((root->segment == (u16) seg) &&
> - (root->secondary.start == (u16) bus))
> - return root->device->handle;
> - return NULL;
> + (root->secondary.start == (u16) bus)) {
> + handle = root->device->handle;
> + break;
> + }
> + mutex_unlock(&acpi_pci_root_lock);
> + return handle;
> }
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-18 6:12 [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Taku Izumi
` (5 preceding siblings ...)
2012-09-18 6:24 ` [PATCH v3 6/8] ACPI, PCI: add acpi_pci_roots protection Taku Izumi
@ 2012-09-18 6:25 ` Taku Izumi
2012-09-21 20:09 ` Bjorn Helgaas
2012-09-18 6:26 ` [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge Taku Izumi
2012-09-18 18:41 ` [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Yinghai Lu
8 siblings, 1 reply; 95+ messages in thread
From: Taku Izumi @ 2012-09-18 6:25 UTC (permalink / raw)
To: linux-pci, bhelgaas; +Cc: linux-acpi, kaneshige.kenji, yinghai, jiang.liu
Currently there's no PCI-related clean-up code
in acpi_pci_root_remove() function.
This patch introduces function for hostbridge removal,
and brings back pci_stop_bus_devices() function.
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
drivers/acpi/pci_bind.c | 7 +++++++
drivers/acpi/pci_root.c | 7 +++++++
drivers/pci/remove.c | 27 +++++++++++++++++++++++++++
include/acpi/acpi_drivers.h | 1 +
include/linux/pci.h | 2 ++
5 files changed, 44 insertions(+)
Index: Bjorn-next-0903/drivers/pci/remove.c
===================================================================
--- Bjorn-next-0903.orig/drivers/pci/remove.c
+++ Bjorn-next-0903/drivers/pci/remove.c
@@ -92,3 +92,30 @@ void pci_stop_and_remove_bus_device(stru
pci_destroy_dev(dev);
}
EXPORT_SYMBOL(pci_stop_and_remove_bus_device);
+
+void pci_stop_bus_devices(struct pci_bus *bus)
+{
+ struct pci_dev *dev, *tmp;
+
+ list_for_each_entry_safe_reverse(dev, tmp, &bus->devices, bus_list) {
+ if (dev->subordinate)
+ pci_stop_bus_devices(dev->subordinate);
+ pci_stop_dev(dev);
+ }
+
+}
+EXPORT_SYMBOL(pci_stop_bus_devices);
+
+void pci_remove_host_bridge(struct pci_host_bridge *bridge)
+{
+ struct pci_bus *root = bridge->bus;
+ struct pci_dev *dev, *tmp;
+
+ list_for_each_entry_safe_reverse(dev, tmp, &root->devices, bus_list)
+ pci_stop_and_remove_bus_device(dev);
+
+ pci_remove_bus(root);
+
+ device_unregister(&bridge->dev);
+}
+EXPORT_SYMBOL(pci_remove_host_bridge);
Index: Bjorn-next-0903/drivers/acpi/pci_root.c
===================================================================
--- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
+++ Bjorn-next-0903/drivers/acpi/pci_root.c
@@ -652,8 +652,10 @@ static int acpi_pci_root_remove(struct a
{
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;
+ struct pci_host_bridge *bridge = to_pci_host_bridge(root->bus->bridge);
mutex_lock(&acpi_pci_root_lock);
+ pci_stop_bus_devices(root->bus);
list_for_each_entry(driver, &acpi_pci_drivers, node)
if (driver->remove)
driver->remove(root);
@@ -661,6 +663,11 @@ static int acpi_pci_root_remove(struct a
device_set_run_wake(root->bus->bridge, false);
pci_acpi_remove_bus_pm_notifier(device);
+ acpi_pci_irq_del_prt(root->bus);
+ acpi_pci_unbind_root(device);
+
+ pci_remove_host_bridge(bridge);
+
list_del(&root->node);
mutex_unlock(&acpi_pci_root_lock);
kfree(root);
Index: Bjorn-next-0903/include/linux/pci.h
===================================================================
--- Bjorn-next-0903.orig/include/linux/pci.h
+++ Bjorn-next-0903/include/linux/pci.h
@@ -734,6 +734,8 @@ extern struct pci_dev *pci_dev_get(struc
extern void pci_dev_put(struct pci_dev *dev);
extern void pci_remove_bus(struct pci_bus *b);
extern void pci_stop_and_remove_bus_device(struct pci_dev *dev);
+extern void pci_stop_bus_devices(struct pci_bus *bus);
+extern void pci_remove_host_bridge(struct pci_host_bridge *bridge);
void pci_setup_cardbus(struct pci_bus *bus);
extern void pci_sort_breadthfirst(void);
#define dev_is_pci(d) ((d)->bus == &pci_bus_type)
Index: Bjorn-next-0903/drivers/acpi/pci_bind.c
===================================================================
--- Bjorn-next-0903.orig/drivers/acpi/pci_bind.c
+++ Bjorn-next-0903/drivers/acpi/pci_bind.c
@@ -118,3 +118,10 @@ int acpi_pci_bind_root(struct acpi_devic
return 0;
}
+
+void acpi_pci_unbind_root(struct acpi_device *device)
+{
+ device->ops.bind = NULL;
+ device->ops.unbind = NULL;
+}
+
Index: Bjorn-next-0903/include/acpi/acpi_drivers.h
===================================================================
--- Bjorn-next-0903.orig/include/acpi/acpi_drivers.h
+++ Bjorn-next-0903/include/acpi/acpi_drivers.h
@@ -101,6 +101,7 @@ struct pci_bus;
struct pci_dev *acpi_get_pci_dev(acpi_handle);
int acpi_pci_bind_root(struct acpi_device *device);
+void acpi_pci_unbind_root(struct acpi_device *device);
/* Arch-defined function to add a bus to the system */
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-18 6:25 ` [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function Taku Izumi
@ 2012-09-21 20:09 ` Bjorn Helgaas
2012-09-27 16:48 ` Bjorn Helgaas
2012-09-28 9:46 ` Taku Izumi
0 siblings, 2 replies; 95+ messages in thread
From: Bjorn Helgaas @ 2012-09-21 20:09 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
On Tue, Sep 18, 2012 at 12:25 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>
> Currently there's no PCI-related clean-up code
> in acpi_pci_root_remove() function.
> This patch introduces function for hostbridge removal,
> and brings back pci_stop_bus_devices() function.
>
> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
> ---
> drivers/acpi/pci_bind.c | 7 +++++++
> drivers/acpi/pci_root.c | 7 +++++++
> drivers/pci/remove.c | 27 +++++++++++++++++++++++++++
> include/acpi/acpi_drivers.h | 1 +
> include/linux/pci.h | 2 ++
> 5 files changed, 44 insertions(+)
>
> Index: Bjorn-next-0903/drivers/pci/remove.c
> ===================================================================
> --- Bjorn-next-0903.orig/drivers/pci/remove.c
> +++ Bjorn-next-0903/drivers/pci/remove.c
> @@ -92,3 +92,30 @@ void pci_stop_and_remove_bus_device(stru
> pci_destroy_dev(dev);
> }
> EXPORT_SYMBOL(pci_stop_and_remove_bus_device);
> +
> +void pci_stop_bus_devices(struct pci_bus *bus)
> +{
> + struct pci_dev *dev, *tmp;
> +
> + list_for_each_entry_safe_reverse(dev, tmp, &bus->devices, bus_list) {
> + if (dev->subordinate)
> + pci_stop_bus_devices(dev->subordinate);
> + pci_stop_dev(dev);
> + }
> +
> +}
> +EXPORT_SYMBOL(pci_stop_bus_devices);
> +
> +void pci_remove_host_bridge(struct pci_host_bridge *bridge)
> +{
> + struct pci_bus *root = bridge->bus;
> + struct pci_dev *dev, *tmp;
> +
> + list_for_each_entry_safe_reverse(dev, tmp, &root->devices, bus_list)
> + pci_stop_and_remove_bus_device(dev);
> +
> + pci_remove_bus(root);
> +
> + device_unregister(&bridge->dev);
> +}
> +EXPORT_SYMBOL(pci_remove_host_bridge);
> Index: Bjorn-next-0903/drivers/acpi/pci_root.c
> ===================================================================
> --- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
> +++ Bjorn-next-0903/drivers/acpi/pci_root.c
> @@ -652,8 +652,10 @@ static int acpi_pci_root_remove(struct a
> {
> struct acpi_pci_root *root = acpi_driver_data(device);
> struct acpi_pci_driver *driver;
> + struct pci_host_bridge *bridge = to_pci_host_bridge(root->bus->bridge);
>
> mutex_lock(&acpi_pci_root_lock);
> + pci_stop_bus_devices(root->bus);
> list_for_each_entry(driver, &acpi_pci_drivers, node)
> if (driver->remove)
> driver->remove(root);
> @@ -661,6 +663,11 @@ static int acpi_pci_root_remove(struct a
> device_set_run_wake(root->bus->bridge, false);
> pci_acpi_remove_bus_pm_notifier(device);
>
> + acpi_pci_irq_del_prt(root->bus);
acpi_pci_irq_del_prt() does not actually have a dependency on the
struct pci_bus, so I think its interface should be changed so it takes
a segment number and a bus number instead of the "struct pci_bus *".
The same applies to acpi_pci_irq_add_prt().
This basically boils down to reverting 859a3f86ca8 and d9efae3688a. I
acked those changes at the time, but I think they were a mistake. The
reason is that passing in the struct pci_bus * ties them into the host
bridge add/remove flow in a way that's not necessary.
If we get rid of the struct pci_bus * dependency, then we can easily
add the _PRT before doing PCI enumeration behind the bridge, and we
can remove the _PRT after removing the PCI devices. I think this is
one small step toward getting rid of the add/start and stop/remove
split.
> + acpi_pci_unbind_root(device);
> +
> + pci_remove_host_bridge(bridge);
> +
> list_del(&root->node);
> mutex_unlock(&acpi_pci_root_lock);
> kfree(root);
> Index: Bjorn-next-0903/include/linux/pci.h
> ===================================================================
> --- Bjorn-next-0903.orig/include/linux/pci.h
> +++ Bjorn-next-0903/include/linux/pci.h
> @@ -734,6 +734,8 @@ extern struct pci_dev *pci_dev_get(struc
> extern void pci_dev_put(struct pci_dev *dev);
> extern void pci_remove_bus(struct pci_bus *b);
> extern void pci_stop_and_remove_bus_device(struct pci_dev *dev);
> +extern void pci_stop_bus_devices(struct pci_bus *bus);
> +extern void pci_remove_host_bridge(struct pci_host_bridge *bridge);
> void pci_setup_cardbus(struct pci_bus *bus);
> extern void pci_sort_breadthfirst(void);
> #define dev_is_pci(d) ((d)->bus == &pci_bus_type)
> Index: Bjorn-next-0903/drivers/acpi/pci_bind.c
> ===================================================================
> --- Bjorn-next-0903.orig/drivers/acpi/pci_bind.c
> +++ Bjorn-next-0903/drivers/acpi/pci_bind.c
> @@ -118,3 +118,10 @@ int acpi_pci_bind_root(struct acpi_devic
>
> return 0;
> }
> +
> +void acpi_pci_unbind_root(struct acpi_device *device)
> +{
> + device->ops.bind = NULL;
> + device->ops.unbind = NULL;
> +}
> +
> Index: Bjorn-next-0903/include/acpi/acpi_drivers.h
> ===================================================================
> --- Bjorn-next-0903.orig/include/acpi/acpi_drivers.h
> +++ Bjorn-next-0903/include/acpi/acpi_drivers.h
> @@ -101,6 +101,7 @@ struct pci_bus;
>
> struct pci_dev *acpi_get_pci_dev(acpi_handle);
> int acpi_pci_bind_root(struct acpi_device *device);
> +void acpi_pci_unbind_root(struct acpi_device *device);
>
> /* Arch-defined function to add a bus to the system */
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-21 20:09 ` Bjorn Helgaas
@ 2012-09-27 16:48 ` Bjorn Helgaas
2012-09-27 17:23 ` Yinghai Lu
2012-09-28 0:15 ` Taku Izumi
2012-09-28 9:46 ` Taku Izumi
1 sibling, 2 replies; 95+ messages in thread
From: Bjorn Helgaas @ 2012-09-27 16:48 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
On Fri, Sep 21, 2012 at 2:09 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Tue, Sep 18, 2012 at 12:25 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>>
>> Currently there's no PCI-related clean-up code
>> in acpi_pci_root_remove() function.
>> This patch introduces function for hostbridge removal,
>> and brings back pci_stop_bus_devices() function.
>>
>> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
>> ---
>> drivers/acpi/pci_bind.c | 7 +++++++
>> drivers/acpi/pci_root.c | 7 +++++++
>> drivers/pci/remove.c | 27 +++++++++++++++++++++++++++
>> include/acpi/acpi_drivers.h | 1 +
>> include/linux/pci.h | 2 ++
>> 5 files changed, 44 insertions(+)
>>
>> Index: Bjorn-next-0903/drivers/pci/remove.c
>> ===================================================================
>> --- Bjorn-next-0903.orig/drivers/pci/remove.c
>> +++ Bjorn-next-0903/drivers/pci/remove.c
>> @@ -92,3 +92,30 @@ void pci_stop_and_remove_bus_device(stru
>> pci_destroy_dev(dev);
>> }
>> EXPORT_SYMBOL(pci_stop_and_remove_bus_device);
>> +
>> +void pci_stop_bus_devices(struct pci_bus *bus)
>> +{
>> + struct pci_dev *dev, *tmp;
>> +
>> + list_for_each_entry_safe_reverse(dev, tmp, &bus->devices, bus_list) {
>> + if (dev->subordinate)
>> + pci_stop_bus_devices(dev->subordinate);
>> + pci_stop_dev(dev);
>> + }
>> +
>> +}
>> +EXPORT_SYMBOL(pci_stop_bus_devices);
>> +
>> +void pci_remove_host_bridge(struct pci_host_bridge *bridge)
>> +{
>> + struct pci_bus *root = bridge->bus;
>> + struct pci_dev *dev, *tmp;
>> +
>> + list_for_each_entry_safe_reverse(dev, tmp, &root->devices, bus_list)
>> + pci_stop_and_remove_bus_device(dev);
>> +
>> + pci_remove_bus(root);
>> +
>> + device_unregister(&bridge->dev);
>> +}
>> +EXPORT_SYMBOL(pci_remove_host_bridge);
>> Index: Bjorn-next-0903/drivers/acpi/pci_root.c
>> ===================================================================
>> --- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
>> +++ Bjorn-next-0903/drivers/acpi/pci_root.c
>> @@ -652,8 +652,10 @@ static int acpi_pci_root_remove(struct a
>> {
>> struct acpi_pci_root *root = acpi_driver_data(device);
>> struct acpi_pci_driver *driver;
>> + struct pci_host_bridge *bridge = to_pci_host_bridge(root->bus->bridge);
>>
>> mutex_lock(&acpi_pci_root_lock);
>> + pci_stop_bus_devices(root->bus);
>> list_for_each_entry(driver, &acpi_pci_drivers, node)
>> if (driver->remove)
>> driver->remove(root);
>> @@ -661,6 +663,11 @@ static int acpi_pci_root_remove(struct a
>> device_set_run_wake(root->bus->bridge, false);
>> pci_acpi_remove_bus_pm_notifier(device);
>>
>> + acpi_pci_irq_del_prt(root->bus);
>
> acpi_pci_irq_del_prt() does not actually have a dependency on the
> struct pci_bus, so I think its interface should be changed so it takes
> a segment number and a bus number instead of the "struct pci_bus *".
> The same applies to acpi_pci_irq_add_prt().
>
> This basically boils down to reverting 859a3f86ca8 and d9efae3688a. I
> acked those changes at the time, but I think they were a mistake. The
> reason is that passing in the struct pci_bus * ties them into the host
> bridge add/remove flow in a way that's not necessary.
>
> If we get rid of the struct pci_bus * dependency, then we can easily
> add the _PRT before doing PCI enumeration behind the bridge, and we
> can remove the _PRT after removing the PCI devices. I think this is
> one small step toward getting rid of the add/start and stop/remove
> split.
I'm going to work on doing this if nobody else is interested.
>> + acpi_pci_unbind_root(device);
>> +
>> + pci_remove_host_bridge(bridge);
>> +
>> list_del(&root->node);
>> mutex_unlock(&acpi_pci_root_lock);
>> kfree(root);
>> Index: Bjorn-next-0903/include/linux/pci.h
>> ===================================================================
>> --- Bjorn-next-0903.orig/include/linux/pci.h
>> +++ Bjorn-next-0903/include/linux/pci.h
>> @@ -734,6 +734,8 @@ extern struct pci_dev *pci_dev_get(struc
>> extern void pci_dev_put(struct pci_dev *dev);
>> extern void pci_remove_bus(struct pci_bus *b);
>> extern void pci_stop_and_remove_bus_device(struct pci_dev *dev);
>> +extern void pci_stop_bus_devices(struct pci_bus *bus);
>> +extern void pci_remove_host_bridge(struct pci_host_bridge *bridge);
>> void pci_setup_cardbus(struct pci_bus *bus);
>> extern void pci_sort_breadthfirst(void);
>> #define dev_is_pci(d) ((d)->bus == &pci_bus_type)
>> Index: Bjorn-next-0903/drivers/acpi/pci_bind.c
>> ===================================================================
>> --- Bjorn-next-0903.orig/drivers/acpi/pci_bind.c
>> +++ Bjorn-next-0903/drivers/acpi/pci_bind.c
>> @@ -118,3 +118,10 @@ int acpi_pci_bind_root(struct acpi_devic
>>
>> return 0;
>> }
>> +
>> +void acpi_pci_unbind_root(struct acpi_device *device)
>> +{
>> + device->ops.bind = NULL;
>> + device->ops.unbind = NULL;
>> +}
>> +
>> Index: Bjorn-next-0903/include/acpi/acpi_drivers.h
>> ===================================================================
>> --- Bjorn-next-0903.orig/include/acpi/acpi_drivers.h
>> +++ Bjorn-next-0903/include/acpi/acpi_drivers.h
>> @@ -101,6 +101,7 @@ struct pci_bus;
>>
>> struct pci_dev *acpi_get_pci_dev(acpi_handle);
>> int acpi_pci_bind_root(struct acpi_device *device);
>> +void acpi_pci_unbind_root(struct acpi_device *device);
>>
>> /* Arch-defined function to add a bus to the system */
>>
>>
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-27 16:48 ` Bjorn Helgaas
@ 2012-09-27 17:23 ` Yinghai Lu
2012-09-27 17:59 ` Yinghai Lu
2012-09-27 18:44 ` Bjorn Helgaas
2012-09-28 0:15 ` Taku Izumi
1 sibling, 2 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-09-27 17:23 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Taku Izumi, linux-pci, linux-acpi, kaneshige.kenji, jiang.liu
On Thu, Sep 27, 2012 at 9:48 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Fri, Sep 21, 2012 at 2:09 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> If we get rid of the struct pci_bus * dependency, then we can easily
>> add the _PRT before doing PCI enumeration behind the bridge, and we
>> can remove the _PRT after removing the PCI devices. I think this is
>> one small step toward getting rid of the add/start and stop/remove
>> split.
>
> I'm going to work on doing this if nobody else is interested.
I'm not sure if that is needed.
-Yinghai
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-27 17:23 ` Yinghai Lu
@ 2012-09-27 17:59 ` Yinghai Lu
2012-09-27 18:44 ` Bjorn Helgaas
1 sibling, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-09-27 17:59 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Taku Izumi, linux-pci, linux-acpi, kaneshige.kenji, jiang.liu
On Thu, Sep 27, 2012 at 10:23 AM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Thu, Sep 27, 2012 at 9:48 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Fri, Sep 21, 2012 at 2:09 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>>> If we get rid of the struct pci_bus * dependency, then we can easily
>>> add the _PRT before doing PCI enumeration behind the bridge, and we
>>> can remove the _PRT after removing the PCI devices. I think this is
>>> one small step toward getting rid of the add/start and stop/remove
>>> split.
>>
>> I'm going to work on doing this if nobody else is interested.
>
> I'm not sure if that is needed.
After patches that is using pci_host_bridge_bus_type and pci_bus_type
notification, we can remove
acpi_pci_root_start.
please check patches in my for-pci-next branch: it include jiang's 7
patches about notifier, and my kill pci_root_buses and etc.
git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git
for-pci-next
-Yinghai
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-27 17:23 ` Yinghai Lu
2012-09-27 17:59 ` Yinghai Lu
@ 2012-09-27 18:44 ` Bjorn Helgaas
2012-09-27 20:17 ` Yinghai Lu
1 sibling, 1 reply; 95+ messages in thread
From: Bjorn Helgaas @ 2012-09-27 18:44 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Taku Izumi, linux-pci, linux-acpi, kaneshige.kenji, jiang.liu
On Thu, Sep 27, 2012 at 11:23 AM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Thu, Sep 27, 2012 at 9:48 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Fri, Sep 21, 2012 at 2:09 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>>> If we get rid of the struct pci_bus * dependency, then we can easily
>>> add the _PRT before doing PCI enumeration behind the bridge, and we
>>> can remove the _PRT after removing the PCI devices. I think this is
>>> one small step toward getting rid of the add/start and stop/remove
>>> split.
>>
>> I'm going to work on doing this if nobody else is interested.
>
> I'm not sure if that is needed.
That's a useless response. Do you want to elaborate on *why* you
think this is a bad idea?
I explained the reasons why I think it's a good idea above, but just
to expand on it, we currently have to create the struct pci_bus before
we can add _PRT information. But adding the _PRT info doesn't
actually depend on the struct pci_bus; it only requires the segment
number and the bus number. We have that information before we scan
the bus .
I think it's useful to disentangle _PRT interface from the specifics
of PCI (in this case, the struct pci_bus). We're currently using the
struct pci_bus here just as a convenient way to pass around the
segment/bus number, but I don't think it's the appropriate abstraction
for that.
Do you see a technical problem with it? Even if it's not *necessary*
in order to make host bridge hotplug work, I think it's worth doing to
make the code more understandable.
Do you see a problem with adding the _PRT info before scanning the bus
or with removing it after deleting the bus? I'd like the bus scan
code to be able to scan/add/bind drivers all at once in the PCI core.
Today I think we have scan/add _PRT/device_add, where we have to do
this _PRT stuff in the middle, so we have to use two PCI interfaces
rather than one.
It's great if you see a way to remove acpi_pci_root_start() -- that
will be tremendous. I think the current PCI stop/remove split is a
similar issue, and I hope you can dream up a way to consolidate those,
too.
Bjorn
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-27 18:44 ` Bjorn Helgaas
@ 2012-09-27 20:17 ` Yinghai Lu
2012-09-28 16:07 ` Bjorn Helgaas
0 siblings, 1 reply; 95+ messages in thread
From: Yinghai Lu @ 2012-09-27 20:17 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Taku Izumi, linux-pci, linux-acpi, kaneshige.kenji, jiang.liu
On Thu, Sep 27, 2012 at 11:44 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>>
>> I'm not sure if that is needed.
>
> That's a useless response. Do you want to elaborate on *why* you
> think this is a bad idea?
I did not say that is bad idea.
it is just not needed to waste your time.
>
> I explained the reasons why I think it's a good idea above, but just
> to expand on it, we currently have to create the struct pci_bus before
> we can add _PRT information. But adding the _PRT info doesn't
> actually depend on the struct pci_bus; it only requires the segment
> number and the bus number. We have that information before we scan
> the bus .
>
> I think it's useful to disentangle _PRT interface from the specifics
> of PCI (in this case, the struct pci_bus). We're currently using the
> struct pci_bus here just as a convenient way to pass around the
> segment/bus number, but I don't think it's the appropriate abstraction
> for that.
>
> Do you see a technical problem with it? Even if it's not *necessary*
> in order to make host bridge hotplug work, I think it's worth doing to
> make the code more understandable.
>
> Do you see a problem with adding the _PRT info before scanning the bus
> or with removing it after deleting the bus?
If the bus is not there, do not need that prt.
So if you find the prt and add it to the list before, later if
scanning fail etc failing path
you will need to clean that prt in the list.
> I'd like the bus scan
> code to be able to scan/add/bind drivers all at once in the PCI core.
> Today I think we have scan/add _PRT/device_add, where we have to do
> this _PRT stuff in the middle, so we have to use two PCI interfaces
> rather than one.
looks like we handle _PRT in pci_host_bridge add/remove notification,
just like Jiang's put that for pci device bus notifier.
>
> It's great if you see a way to remove acpi_pci_root_start() -- that
> will be tremendous.
that will need to more test.
> I think the current PCI stop/remove split is a
> similar issue, and I hope you can dream up a way to consolidate those,
> too.
that is SRIOV handling resign.
I would suggest following way:
use pf as parent for one new domain. and put all VFs on that domain.
and the domain could have 256 buses for those VFs.
and we have 16 bits domain number that could be used.
current got too many patches in my quilt... hate to keep rebasing again.
after pci root bus hotplug and for_each_res topic, will work on that SRIOV one.
-Yinghai
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-27 20:17 ` Yinghai Lu
@ 2012-09-28 16:07 ` Bjorn Helgaas
2012-09-28 16:19 ` Yinghai Lu
0 siblings, 1 reply; 95+ messages in thread
From: Bjorn Helgaas @ 2012-09-28 16:07 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Taku Izumi, linux-pci, linux-acpi, kaneshige.kenji, jiang.liu
On Thu, Sep 27, 2012 at 2:17 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Thu, Sep 27, 2012 at 11:44 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> I explained the reasons why I think it's a good idea above, but just
>> to expand on it, we currently have to create the struct pci_bus before
>> we can add _PRT information. But adding the _PRT info doesn't
>> actually depend on the struct pci_bus; it only requires the segment
>> number and the bus number. We have that information before we scan
>> the bus .
>>
>> I think it's useful to disentangle _PRT interface from the specifics
>> of PCI (in this case, the struct pci_bus). We're currently using the
>> struct pci_bus here just as a convenient way to pass around the
>> segment/bus number, but I don't think it's the appropriate abstraction
>> for that.
>>
>> Do you see a technical problem with it? Even if it's not *necessary*
>> in order to make host bridge hotplug work, I think it's worth doing to
>> make the code more understandable.
>>
>> Do you see a problem with adding the _PRT info before scanning the bus
>> or with removing it after deleting the bus?
>
> If the bus is not there, do not need that prt.
>
> So if you find the prt and add it to the list before, later if
> scanning fail etc failing path
> you will need to clean that prt in the list.
That's true. It will add a little bit to the failure paths in
acpi_pci_root_add(), but I don't think that's much of an issue.
>> I'd like the bus scan
>> code to be able to scan/add/bind drivers all at once in the PCI core.
>> Today I think we have scan/add _PRT/device_add, where we have to do
>> this _PRT stuff in the middle, so we have to use two PCI interfaces
>> rather than one.
This is the more important bit. My longer-term goal is to separate
out the ACPI parts from the PCI parts. Then we can use more generic
code for the PCI part, which will help unify the architectures.
Today we have this, which is more complicated than it should be. Note
how we do some ACPI stuff, some PCI stuff, some more ACPI stuff, then
more PCI stuff:
acpi_pci_root_add
pci_acpi_scan_root
pci_scan_child_bus
acpi_pci_irq_add_prt
acpi_pci_osc_control_set
acpi_pci_root_start
pci_bus_add_devices
I don't think the ACPI/PCI mixture is anything essential dictated by
the way the hardware or firmware works. I think it's just an artifact
of the current design, and it could be changed. It would be better to
have this:
acpi_pci_root_add
acpi_pci_irq_add_prt
acpi_pci_osc_control_set
pci_acpi_scan_root
pci_scan_root_bus
pci_scan_child_bus
pci_bus_add_devices
We can't get to this latter strategy as long as the ACPI interfaces
depend on the struct pci_bus. So the _PRT change is a small thing in
itself, but I do think it helps enable significant improvements in the
future.
Bjorn
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-28 16:07 ` Bjorn Helgaas
@ 2012-09-28 16:19 ` Yinghai Lu
2012-09-28 19:44 ` Bjorn Helgaas
0 siblings, 1 reply; 95+ messages in thread
From: Yinghai Lu @ 2012-09-28 16:19 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Taku Izumi, linux-pci, linux-acpi, kaneshige.kenji, jiang.liu
On Fri, Sep 28, 2012 at 9:07 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Thu, Sep 27, 2012 at 2:17 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> Today we have this, which is more complicated than it should be. Note
> how we do some ACPI stuff, some PCI stuff, some more ACPI stuff, then
> more PCI stuff:
>
> acpi_pci_root_add
> pci_acpi_scan_root
> pci_scan_child_bus
> acpi_pci_irq_add_prt
> acpi_pci_osc_control_set
> acpi_pci_root_start
> pci_bus_add_devices
>
> I don't think the ACPI/PCI mixture is anything essential dictated by
> the way the hardware or firmware works. I think it's just an artifact
> of the current design, and it could be changed. It would be better to
> have this:
>
> acpi_pci_root_add
> acpi_pci_irq_add_prt
> acpi_pci_osc_control_set
> pci_acpi_scan_root
> pci_scan_root_bus
> pci_scan_child_bus
> pci_bus_add_devices
>
> We can't get to this latter strategy as long as the ACPI interfaces
> depend on the struct pci_bus. So the _PRT change is a small thing in
> itself, but I do think it helps enable significant improvements in the
> future.
still to handle to those fallback path like create_bus and scan bus failure.
in my for-pci-next branch, with Jiang's patches and mine, now we achieved at
acpi_pci_root_add
pci_acpi_scan_root
pci_scan_root_bus
pci_scan_child_bus
acpi_pci_osc_control_set
pci_bus_add_devices
acpi_pci_irq_add_prt is called later during acpi binding that is
triggered by adding to device tree.
thought os_control set via pci_host_bridge add interface..
with those BUS ADD notification, we can pass bus safely, and without
considering about cleanup PRT and OSC setting.
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-28 16:19 ` Yinghai Lu
@ 2012-09-28 19:44 ` Bjorn Helgaas
0 siblings, 0 replies; 95+ messages in thread
From: Bjorn Helgaas @ 2012-09-28 19:44 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Taku Izumi, linux-pci, linux-acpi, kaneshige.kenji, jiang.liu
On Fri, Sep 28, 2012 at 10:19 AM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Fri, Sep 28, 2012 at 9:07 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Thu, Sep 27, 2012 at 2:17 PM, Yinghai Lu <yinghai@kernel.org> wrote:
>> Today we have this, which is more complicated than it should be. Note
>> how we do some ACPI stuff, some PCI stuff, some more ACPI stuff, then
>> more PCI stuff:
>>
>> acpi_pci_root_add
>> pci_acpi_scan_root
>> pci_scan_child_bus
>> acpi_pci_irq_add_prt
>> acpi_pci_osc_control_set
>> acpi_pci_root_start
>> pci_bus_add_devices
>>
>> I don't think the ACPI/PCI mixture is anything essential dictated by
>> the way the hardware or firmware works. I think it's just an artifact
>> of the current design, and it could be changed. It would be better to
>> have this:
>>
>> acpi_pci_root_add
>> acpi_pci_irq_add_prt
>> acpi_pci_osc_control_set
>> pci_acpi_scan_root
>> pci_scan_root_bus
>> pci_scan_child_bus
>> pci_bus_add_devices
>>
>> We can't get to this latter strategy as long as the ACPI interfaces
>> depend on the struct pci_bus. So the _PRT change is a small thing in
>> itself, but I do think it helps enable significant improvements in the
>> future.
>
> still to handle to those fallback path like create_bus and scan bus failure.
>
> in my for-pci-next branch, with Jiang's patches and mine, now we achieved at
>
> acpi_pci_root_add
> pci_acpi_scan_root
> pci_scan_root_bus
> pci_scan_child_bus
> acpi_pci_osc_control_set
> pci_bus_add_devices
>
> acpi_pci_irq_add_prt is called later during acpi binding that is
> triggered by adding to device tree.
> thought os_control set via pci_host_bridge add interface..
>
> with those BUS ADD notification, we can pass bus safely, and without
> considering about cleanup PRT and OSC setting.
I haven't looked at those patches yet.
Is there a reason why acpi_pci_osc_control_set() needs to be done
after pci_scan_child_bus()? The argument that it might make the error
path somewhat simpler is not very convincing to me. Having the arch
code call both pci_scan_child_bus() and pci_bus_add_devices() is a
much more fundamental complexity -- it makes x86 and ia64 different
from many architectures, and it exposes the intermediate state where
"devices have been enumerated but not added" to a lot more code.
It doesn't sound like an improvement to call acpi_pci_irq_add_prt()
using a bus add notifier. At least for the host bridge case, it's
clear, simple, and straightforward to call it in acpi_pci_root_add().
Notifiers are useful in some cases, but they definitely make the code
harder to follow.
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-27 16:48 ` Bjorn Helgaas
2012-09-27 17:23 ` Yinghai Lu
@ 2012-09-28 0:15 ` Taku Izumi
2012-09-28 0:23 ` Bjorn Helgaas
1 sibling, 1 reply; 95+ messages in thread
From: Taku Izumi @ 2012-09-28 0:15 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
On Thu, 27 Sep 2012 10:48:09 -0600
Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Fri, Sep 21, 2012 at 2:09 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> > On Tue, Sep 18, 2012 at 12:25 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
> >>
> >> Currently there's no PCI-related clean-up code
> >> in acpi_pci_root_remove() function.
> >> This patch introduces function for hostbridge removal,
> >> and brings back pci_stop_bus_devices() function.
> >>
> >> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
> >> ---
> >> drivers/acpi/pci_bind.c | 7 +++++++
> >> drivers/acpi/pci_root.c | 7 +++++++
> >> drivers/pci/remove.c | 27 +++++++++++++++++++++++++++
> >> include/acpi/acpi_drivers.h | 1 +
> >> include/linux/pci.h | 2 ++
> >> 5 files changed, 44 insertions(+)
> >>
> >> Index: Bjorn-next-0903/drivers/pci/remove.c
> >> ===================================================================
> >> --- Bjorn-next-0903.orig/drivers/pci/remove.c
> >> +++ Bjorn-next-0903/drivers/pci/remove.c
> >> @@ -92,3 +92,30 @@ void pci_stop_and_remove_bus_device(stru
> >> pci_destroy_dev(dev);
> >> }
> >> EXPORT_SYMBOL(pci_stop_and_remove_bus_device);
> >> +
> >> +void pci_stop_bus_devices(struct pci_bus *bus)
> >> +{
> >> + struct pci_dev *dev, *tmp;
> >> +
> >> + list_for_each_entry_safe_reverse(dev, tmp, &bus->devices, bus_list) {
> >> + if (dev->subordinate)
> >> + pci_stop_bus_devices(dev->subordinate);
> >> + pci_stop_dev(dev);
> >> + }
> >> +
> >> +}
> >> +EXPORT_SYMBOL(pci_stop_bus_devices);
> >> +
> >> +void pci_remove_host_bridge(struct pci_host_bridge *bridge)
> >> +{
> >> + struct pci_bus *root = bridge->bus;
> >> + struct pci_dev *dev, *tmp;
> >> +
> >> + list_for_each_entry_safe_reverse(dev, tmp, &root->devices, bus_list)
> >> + pci_stop_and_remove_bus_device(dev);
> >> +
> >> + pci_remove_bus(root);
> >> +
> >> + device_unregister(&bridge->dev);
> >> +}
> >> +EXPORT_SYMBOL(pci_remove_host_bridge);
> >> Index: Bjorn-next-0903/drivers/acpi/pci_root.c
> >> ===================================================================
> >> --- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
> >> +++ Bjorn-next-0903/drivers/acpi/pci_root.c
> >> @@ -652,8 +652,10 @@ static int acpi_pci_root_remove(struct a
> >> {
> >> struct acpi_pci_root *root = acpi_driver_data(device);
> >> struct acpi_pci_driver *driver;
> >> + struct pci_host_bridge *bridge = to_pci_host_bridge(root->bus->bridge);
> >>
> >> mutex_lock(&acpi_pci_root_lock);
> >> + pci_stop_bus_devices(root->bus);
> >> list_for_each_entry(driver, &acpi_pci_drivers, node)
> >> if (driver->remove)
> >> driver->remove(root);
> >> @@ -661,6 +663,11 @@ static int acpi_pci_root_remove(struct a
> >> device_set_run_wake(root->bus->bridge, false);
> >> pci_acpi_remove_bus_pm_notifier(device);
> >>
> >> + acpi_pci_irq_del_prt(root->bus);
> >
> > acpi_pci_irq_del_prt() does not actually have a dependency on the
> > struct pci_bus, so I think its interface should be changed so it takes
> > a segment number and a bus number instead of the "struct pci_bus *".
> > The same applies to acpi_pci_irq_add_prt().
> >
> > This basically boils down to reverting 859a3f86ca8 and d9efae3688a. I
> > acked those changes at the time, but I think they were a mistake. The
> > reason is that passing in the struct pci_bus * ties them into the host
> > bridge add/remove flow in a way that's not necessary.
> >
> > If we get rid of the struct pci_bus * dependency, then we can easily
> > add the _PRT before doing PCI enumeration behind the bridge, and we
> > can remove the _PRT after removing the PCI devices. I think this is
> > one small step toward getting rid of the add/start and stop/remove
> > split.
>
> I'm going to work on doing this if nobody else is interested.
I'll do that. Maybee that is separeted from this patchset.
Best regards,
Taku Izumi
>
> >> + acpi_pci_unbind_root(device);
> >> +
> >> + pci_remove_host_bridge(bridge);
> >> +
> >> list_del(&root->node);
> >> mutex_unlock(&acpi_pci_root_lock);
> >> kfree(root);
> >> Index: Bjorn-next-0903/include/linux/pci.h
> >> ===================================================================
> >> --- Bjorn-next-0903.orig/include/linux/pci.h
> >> +++ Bjorn-next-0903/include/linux/pci.h
> >> @@ -734,6 +734,8 @@ extern struct pci_dev *pci_dev_get(struc
> >> extern void pci_dev_put(struct pci_dev *dev);
> >> extern void pci_remove_bus(struct pci_bus *b);
> >> extern void pci_stop_and_remove_bus_device(struct pci_dev *dev);
> >> +extern void pci_stop_bus_devices(struct pci_bus *bus);
> >> +extern void pci_remove_host_bridge(struct pci_host_bridge *bridge);
> >> void pci_setup_cardbus(struct pci_bus *bus);
> >> extern void pci_sort_breadthfirst(void);
> >> #define dev_is_pci(d) ((d)->bus == &pci_bus_type)
> >> Index: Bjorn-next-0903/drivers/acpi/pci_bind.c
> >> ===================================================================
> >> --- Bjorn-next-0903.orig/drivers/acpi/pci_bind.c
> >> +++ Bjorn-next-0903/drivers/acpi/pci_bind.c
> >> @@ -118,3 +118,10 @@ int acpi_pci_bind_root(struct acpi_devic
> >>
> >> return 0;
> >> }
> >> +
> >> +void acpi_pci_unbind_root(struct acpi_device *device)
> >> +{
> >> + device->ops.bind = NULL;
> >> + device->ops.unbind = NULL;
> >> +}
> >> +
> >> Index: Bjorn-next-0903/include/acpi/acpi_drivers.h
> >> ===================================================================
> >> --- Bjorn-next-0903.orig/include/acpi/acpi_drivers.h
> >> +++ Bjorn-next-0903/include/acpi/acpi_drivers.h
> >> @@ -101,6 +101,7 @@ struct pci_bus;
> >>
> >> struct pci_dev *acpi_get_pci_dev(acpi_handle);
> >> int acpi_pci_bind_root(struct acpi_device *device);
> >> +void acpi_pci_unbind_root(struct acpi_device *device);
> >>
> >> /* Arch-defined function to add a bus to the system */
> >>
> >>
>
--
Taku Izumi <izumi.taku@jp.fujitsu.com>
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-28 0:15 ` Taku Izumi
@ 2012-09-28 0:23 ` Bjorn Helgaas
2012-09-28 14:16 ` Bjorn Helgaas
0 siblings, 1 reply; 95+ messages in thread
From: Bjorn Helgaas @ 2012-09-28 0:23 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
On Thu, Sep 27, 2012 at 6:15 PM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
> On Thu, 27 Sep 2012 10:48:09 -0600
> Bjorn Helgaas <bhelgaas@google.com> wrote:
>
>> On Fri, Sep 21, 2012 at 2:09 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> > On Tue, Sep 18, 2012 at 12:25 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>> >>
>> >> Currently there's no PCI-related clean-up code
>> >> in acpi_pci_root_remove() function.
>> >> This patch introduces function for hostbridge removal,
>> >> and brings back pci_stop_bus_devices() function.
>> >>
>> >> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
>> >> ---
>> >> drivers/acpi/pci_bind.c | 7 +++++++
>> >> drivers/acpi/pci_root.c | 7 +++++++
>> >> drivers/pci/remove.c | 27 +++++++++++++++++++++++++++
>> >> include/acpi/acpi_drivers.h | 1 +
>> >> include/linux/pci.h | 2 ++
>> >> 5 files changed, 44 insertions(+)
>> >>
>> >> Index: Bjorn-next-0903/drivers/pci/remove.c
>> >> ===================================================================
>> >> --- Bjorn-next-0903.orig/drivers/pci/remove.c
>> >> +++ Bjorn-next-0903/drivers/pci/remove.c
>> >> @@ -92,3 +92,30 @@ void pci_stop_and_remove_bus_device(stru
>> >> pci_destroy_dev(dev);
>> >> }
>> >> EXPORT_SYMBOL(pci_stop_and_remove_bus_device);
>> >> +
>> >> +void pci_stop_bus_devices(struct pci_bus *bus)
>> >> +{
>> >> + struct pci_dev *dev, *tmp;
>> >> +
>> >> + list_for_each_entry_safe_reverse(dev, tmp, &bus->devices, bus_list) {
>> >> + if (dev->subordinate)
>> >> + pci_stop_bus_devices(dev->subordinate);
>> >> + pci_stop_dev(dev);
>> >> + }
>> >> +
>> >> +}
>> >> +EXPORT_SYMBOL(pci_stop_bus_devices);
>> >> +
>> >> +void pci_remove_host_bridge(struct pci_host_bridge *bridge)
>> >> +{
>> >> + struct pci_bus *root = bridge->bus;
>> >> + struct pci_dev *dev, *tmp;
>> >> +
>> >> + list_for_each_entry_safe_reverse(dev, tmp, &root->devices, bus_list)
>> >> + pci_stop_and_remove_bus_device(dev);
>> >> +
>> >> + pci_remove_bus(root);
>> >> +
>> >> + device_unregister(&bridge->dev);
>> >> +}
>> >> +EXPORT_SYMBOL(pci_remove_host_bridge);
>> >> Index: Bjorn-next-0903/drivers/acpi/pci_root.c
>> >> ===================================================================
>> >> --- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
>> >> +++ Bjorn-next-0903/drivers/acpi/pci_root.c
>> >> @@ -652,8 +652,10 @@ static int acpi_pci_root_remove(struct a
>> >> {
>> >> struct acpi_pci_root *root = acpi_driver_data(device);
>> >> struct acpi_pci_driver *driver;
>> >> + struct pci_host_bridge *bridge = to_pci_host_bridge(root->bus->bridge);
>> >>
>> >> mutex_lock(&acpi_pci_root_lock);
>> >> + pci_stop_bus_devices(root->bus);
>> >> list_for_each_entry(driver, &acpi_pci_drivers, node)
>> >> if (driver->remove)
>> >> driver->remove(root);
>> >> @@ -661,6 +663,11 @@ static int acpi_pci_root_remove(struct a
>> >> device_set_run_wake(root->bus->bridge, false);
>> >> pci_acpi_remove_bus_pm_notifier(device);
>> >>
>> >> + acpi_pci_irq_del_prt(root->bus);
>> >
>> > acpi_pci_irq_del_prt() does not actually have a dependency on the
>> > struct pci_bus, so I think its interface should be changed so it takes
>> > a segment number and a bus number instead of the "struct pci_bus *".
>> > The same applies to acpi_pci_irq_add_prt().
>> >
>> > This basically boils down to reverting 859a3f86ca8 and d9efae3688a. I
>> > acked those changes at the time, but I think they were a mistake. The
>> > reason is that passing in the struct pci_bus * ties them into the host
>> > bridge add/remove flow in a way that's not necessary.
>> >
>> > If we get rid of the struct pci_bus * dependency, then we can easily
>> > add the _PRT before doing PCI enumeration behind the bridge, and we
>> > can remove the _PRT after removing the PCI devices. I think this is
>> > one small step toward getting rid of the add/start and stop/remove
>> > split.
>>
>> I'm going to work on doing this if nobody else is interested.
>
> I'll do that. Maybee that is separeted from this patchset.
Great, thanks! A separate patchset is definitely fine.
>> >> + acpi_pci_unbind_root(device);
>> >> +
>> >> + pci_remove_host_bridge(bridge);
>> >> +
>> >> list_del(&root->node);
>> >> mutex_unlock(&acpi_pci_root_lock);
>> >> kfree(root);
>> >> Index: Bjorn-next-0903/include/linux/pci.h
>> >> ===================================================================
>> >> --- Bjorn-next-0903.orig/include/linux/pci.h
>> >> +++ Bjorn-next-0903/include/linux/pci.h
>> >> @@ -734,6 +734,8 @@ extern struct pci_dev *pci_dev_get(struc
>> >> extern void pci_dev_put(struct pci_dev *dev);
>> >> extern void pci_remove_bus(struct pci_bus *b);
>> >> extern void pci_stop_and_remove_bus_device(struct pci_dev *dev);
>> >> +extern void pci_stop_bus_devices(struct pci_bus *bus);
>> >> +extern void pci_remove_host_bridge(struct pci_host_bridge *bridge);
>> >> void pci_setup_cardbus(struct pci_bus *bus);
>> >> extern void pci_sort_breadthfirst(void);
>> >> #define dev_is_pci(d) ((d)->bus == &pci_bus_type)
>> >> Index: Bjorn-next-0903/drivers/acpi/pci_bind.c
>> >> ===================================================================
>> >> --- Bjorn-next-0903.orig/drivers/acpi/pci_bind.c
>> >> +++ Bjorn-next-0903/drivers/acpi/pci_bind.c
>> >> @@ -118,3 +118,10 @@ int acpi_pci_bind_root(struct acpi_devic
>> >>
>> >> return 0;
>> >> }
>> >> +
>> >> +void acpi_pci_unbind_root(struct acpi_device *device)
>> >> +{
>> >> + device->ops.bind = NULL;
>> >> + device->ops.unbind = NULL;
>> >> +}
>> >> +
>> >> Index: Bjorn-next-0903/include/acpi/acpi_drivers.h
>> >> ===================================================================
>> >> --- Bjorn-next-0903.orig/include/acpi/acpi_drivers.h
>> >> +++ Bjorn-next-0903/include/acpi/acpi_drivers.h
>> >> @@ -101,6 +101,7 @@ struct pci_bus;
>> >>
>> >> struct pci_dev *acpi_get_pci_dev(acpi_handle);
>> >> int acpi_pci_bind_root(struct acpi_device *device);
>> >> +void acpi_pci_unbind_root(struct acpi_device *device);
>> >>
>> >> /* Arch-defined function to add a bus to the system */
>> >>
>> >>
>>
>
>
> --
> Taku Izumi <izumi.taku@jp.fujitsu.com>
>
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-28 0:23 ` Bjorn Helgaas
@ 2012-09-28 14:16 ` Bjorn Helgaas
0 siblings, 0 replies; 95+ messages in thread
From: Bjorn Helgaas @ 2012-09-28 14:16 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
On Thu, Sep 27, 2012 at 6:23 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Thu, Sep 27, 2012 at 6:15 PM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>> On Thu, 27 Sep 2012 10:48:09 -0600
>> Bjorn Helgaas <bhelgaas@google.com> wrote:
>>
>>> On Fri, Sep 21, 2012 at 2:09 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>>> > On Tue, Sep 18, 2012 at 12:25 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>>> >> @@ -661,6 +663,11 @@ static int acpi_pci_root_remove(struct a
>>> >> device_set_run_wake(root->bus->bridge, false);
>>> >> pci_acpi_remove_bus_pm_notifier(device);
>>> >>
>>> >> + acpi_pci_irq_del_prt(root->bus);
>>> >
>>> > acpi_pci_irq_del_prt() does not actually have a dependency on the
>>> > struct pci_bus, so I think its interface should be changed so it takes
>>> > a segment number and a bus number instead of the "struct pci_bus *".
>>> > The same applies to acpi_pci_irq_add_prt().
>>> >
>>> > This basically boils down to reverting 859a3f86ca8 and d9efae3688a. I
>>> > acked those changes at the time, but I think they were a mistake. The
>>> > reason is that passing in the struct pci_bus * ties them into the host
>>> > bridge add/remove flow in a way that's not necessary.
>>> >
>>> > If we get rid of the struct pci_bus * dependency, then we can easily
>>> > add the _PRT before doing PCI enumeration behind the bridge, and we
>>> > can remove the _PRT after removing the PCI devices. I think this is
>>> > one small step toward getting rid of the add/start and stop/remove
>>> > split.
>>>
>>> I'm going to work on doing this if nobody else is interested.
>>
>> I'll do that. Maybee that is separeted from this patchset.
>
> Great, thanks! A separate patchset is definitely fine.
Whether this is a waste of time or not, I don't know. But I did a
little bit of work on this before you volunteered, Taku. Sorry, I
should have pointed you at the work-in-progress patches; maybe they
could have saved you a bit of time. Anyway, here they are:
http://git.kernel.org/?p=linux/kernel/git/helgaas/pci.git;a=shortlog;h=refs/heads/pci/bjorn-misc
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-21 20:09 ` Bjorn Helgaas
2012-09-27 16:48 ` Bjorn Helgaas
@ 2012-09-28 9:46 ` Taku Izumi
2012-10-30 4:02 ` Bjorn Helgaas
1 sibling, 1 reply; 95+ messages in thread
From: Taku Izumi @ 2012-09-28 9:46 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
Currently there's no PCI-related clean-up code
in acpi_pci_root_remove() function.
This patch introduces function for hostbridge removal,
and brings back pci_stop_bus_devices() function.
diff: rebased against current next
updated according to Bjorn's comment
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
drivers/acpi/pci_bind.c | 7 +++++++
drivers/acpi/pci_root.c | 6 ++++++
drivers/pci/remove.c | 28 ++++++++++++++++++++++++++++
include/acpi/acpi_drivers.h | 1 +
include/linux/pci.h | 2 ++
5 files changed, 44 insertions(+)
Index: Bjorn-next-0925-configchange/drivers/pci/remove.c
===================================================================
--- Bjorn-next-0925-configchange.orig/drivers/pci/remove.c
+++ Bjorn-next-0925-configchange/drivers/pci/remove.c
@@ -111,3 +111,31 @@ void pci_stop_and_remove_bus_device(stru
pci_remove_bus_device(dev);
}
EXPORT_SYMBOL(pci_stop_and_remove_bus_device);
+
+void pci_stop_bus_devices(struct pci_bus *bus)
+{
+ struct pci_dev *dev, *tmp;
+
+ list_for_each_entry_safe_reverse(dev, tmp,
+ &bus->devices, bus_list) {
+ pci_stop_bus_device(dev);
+ }
+
+}
+EXPORT_SYMBOL(pci_stop_bus_devices);
+
+void pci_remove_host_bridge(struct pci_host_bridge *bridge)
+{
+ struct pci_bus *root = bridge->bus;
+ struct pci_dev *dev, *tmp;
+
+ list_for_each_entry_safe_reverse(dev, tmp,
+ &root->devices, bus_list) {
+ pci_remove_bus_device(dev);
+ }
+
+ pci_remove_bus(root);
+
+ device_unregister(&bridge->dev);
+}
+EXPORT_SYMBOL(pci_remove_host_bridge);
Index: Bjorn-next-0925-configchange/drivers/acpi/pci_root.c
===================================================================
--- Bjorn-next-0925-configchange.orig/drivers/acpi/pci_root.c
+++ Bjorn-next-0925-configchange/drivers/acpi/pci_root.c
@@ -659,8 +659,10 @@ static int acpi_pci_root_remove(struct a
{
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;
+ struct pci_host_bridge *bridge = to_pci_host_bridge(root->bus->bridge);
mutex_lock(&acpi_pci_root_lock);
+ pci_stop_bus_devices(root->bus);
list_for_each_entry(driver, &acpi_pci_drivers, node)
if (driver->remove)
driver->remove(root);
@@ -668,6 +670,10 @@ static int acpi_pci_root_remove(struct a
device_set_run_wake(root->bus->bridge, false);
pci_acpi_remove_bus_pm_notifier(device);
+ acpi_pci_unbind_root(device);
+
+ pci_remove_host_bridge(bridge);
+
list_del(&root->node);
mutex_unlock(&acpi_pci_root_lock);
kfree(root);
Index: Bjorn-next-0925-configchange/include/linux/pci.h
===================================================================
--- Bjorn-next-0925-configchange.orig/include/linux/pci.h
+++ Bjorn-next-0925-configchange/include/linux/pci.h
@@ -734,6 +734,8 @@ extern struct pci_dev *pci_dev_get(struc
extern void pci_dev_put(struct pci_dev *dev);
extern void pci_remove_bus(struct pci_bus *b);
extern void pci_stop_and_remove_bus_device(struct pci_dev *dev);
+extern void pci_stop_bus_devices(struct pci_bus *bus);
+extern void pci_remove_host_bridge(struct pci_host_bridge *bridge);
void pci_setup_cardbus(struct pci_bus *bus);
extern void pci_sort_breadthfirst(void);
#define dev_is_pci(d) ((d)->bus == &pci_bus_type)
Index: Bjorn-next-0925-configchange/drivers/acpi/pci_bind.c
===================================================================
--- Bjorn-next-0925-configchange.orig/drivers/acpi/pci_bind.c
+++ Bjorn-next-0925-configchange/drivers/acpi/pci_bind.c
@@ -118,3 +118,10 @@ int acpi_pci_bind_root(struct acpi_devic
return 0;
}
+
+void acpi_pci_unbind_root(struct acpi_device *device)
+{
+ device->ops.bind = NULL;
+ device->ops.unbind = NULL;
+}
+
Index: Bjorn-next-0925-configchange/include/acpi/acpi_drivers.h
===================================================================
--- Bjorn-next-0925-configchange.orig/include/acpi/acpi_drivers.h
+++ Bjorn-next-0925-configchange/include/acpi/acpi_drivers.h
@@ -101,6 +101,7 @@ struct pci_bus;
struct pci_dev *acpi_get_pci_dev(acpi_handle);
int acpi_pci_bind_root(struct acpi_device *device);
+void acpi_pci_unbind_root(struct acpi_device *device);
/* Arch-defined function to add a bus to the system */
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
2012-09-28 9:46 ` Taku Izumi
@ 2012-10-30 4:02 ` Bjorn Helgaas
2012-10-30 17:42 ` (unknown), Yinghai Lu
2012-11-04 4:39 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus Yinghai Lu
0 siblings, 2 replies; 95+ messages in thread
From: Bjorn Helgaas @ 2012-10-30 4:02 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, linux-acpi, kaneshige.kenji, yinghai, jiang.liu
I think I'm missing patches 7/8 and 8/8 from this series. Can
you repost them to make sure I have the latest versions?
Note the comments below:
On Fri, Sep 28, 2012 at 06:46:27PM +0900, Taku Izumi wrote:
>
> Currently there's no PCI-related clean-up code
> in acpi_pci_root_remove() function.
> This patch introduces function for hostbridge removal,
> and brings back pci_stop_bus_devices() function.
>
> diff: rebased against current next
> updated according to Bjorn's comment
>
> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
> ---
> drivers/acpi/pci_bind.c | 7 +++++++
> drivers/acpi/pci_root.c | 6 ++++++
> drivers/pci/remove.c | 28 ++++++++++++++++++++++++++++
> include/acpi/acpi_drivers.h | 1 +
> include/linux/pci.h | 2 ++
> 5 files changed, 44 insertions(+)
>
> Index: Bjorn-next-0925-configchange/drivers/pci/remove.c
> ===================================================================
> --- Bjorn-next-0925-configchange.orig/drivers/pci/remove.c
> +++ Bjorn-next-0925-configchange/drivers/pci/remove.c
> @@ -111,3 +111,31 @@ void pci_stop_and_remove_bus_device(stru
> pci_remove_bus_device(dev);
> }
> EXPORT_SYMBOL(pci_stop_and_remove_bus_device);
> +
> +void pci_stop_bus_devices(struct pci_bus *bus)
> +{
> + struct pci_dev *dev, *tmp;
> +
> + list_for_each_entry_safe_reverse(dev, tmp,
> + &bus->devices, bus_list) {
> + pci_stop_bus_device(dev);
> + }
> +
> +}
> +EXPORT_SYMBOL(pci_stop_bus_devices);
I'm hesitant to introduce pci_stop_bus_devices() again, particularly
when it is exported. The stop/remove split introduces the state where
devices are "stopped" but haven't been "removed" yet.
In this state, the driver .remove() method has been called, sysfs has
been cleaned up, and the struct device has been unregistered, but the
struct pci_dev itself still exists. Obviously, this state *must*
exist internally in the PCI core as we remove the PCI device.
The problem is that we have non-core code that *depends* on being
run while in this transitory state. I think this is a design mistake.
The code that depends on this state is basically just the stuff in the
acpi_pci_drivers list, namely, acpi_pci_hp_driver and acpi_pci_slot_driver.
I suspect that the main reason we have the acpi_pci_drivers list and the
whole acpi_pci_register_driver() infrastructure is so that these PCI
host bridge "sub-drivers" can be built as modules.
I don't think there's really any value in having these sub-drivers as
modules, and it leads to a lot of complication in the code. I'm pretty
sure that forcing them to be selected at build-time will let us make
things much simpler.
If we have to have pci_stop_bus_devices() as an interim measure, I can
live with it, but it doesn't need to be exported, does it?
> +void pci_remove_host_bridge(struct pci_host_bridge *bridge)
> +{
> + struct pci_bus *root = bridge->bus;
> + struct pci_dev *dev, *tmp;
> +
> + list_for_each_entry_safe_reverse(dev, tmp,
> + &root->devices, bus_list) {
> + pci_remove_bus_device(dev);
> + }
> +
> + pci_remove_bus(root);
> +
> + device_unregister(&bridge->dev);
> +}
> +EXPORT_SYMBOL(pci_remove_host_bridge);
> Index: Bjorn-next-0925-configchange/drivers/acpi/pci_root.c
> ===================================================================
> --- Bjorn-next-0925-configchange.orig/drivers/acpi/pci_root.c
> +++ Bjorn-next-0925-configchange/drivers/acpi/pci_root.c
> @@ -659,8 +659,10 @@ static int acpi_pci_root_remove(struct a
> {
> struct acpi_pci_root *root = acpi_driver_data(device);
> struct acpi_pci_driver *driver;
> + struct pci_host_bridge *bridge = to_pci_host_bridge(root->bus->bridge);
>
> mutex_lock(&acpi_pci_root_lock);
> + pci_stop_bus_devices(root->bus);
> list_for_each_entry(driver, &acpi_pci_drivers, node)
> if (driver->remove)
> driver->remove(root);
> @@ -668,6 +670,10 @@ static int acpi_pci_root_remove(struct a
> device_set_run_wake(root->bus->bridge, false);
> pci_acpi_remove_bus_pm_notifier(device);
>
> + acpi_pci_unbind_root(device);
> +
> + pci_remove_host_bridge(bridge);
> +
> list_del(&root->node);
> mutex_unlock(&acpi_pci_root_lock);
> kfree(root);
> Index: Bjorn-next-0925-configchange/include/linux/pci.h
> ===================================================================
> --- Bjorn-next-0925-configchange.orig/include/linux/pci.h
> +++ Bjorn-next-0925-configchange/include/linux/pci.h
> @@ -734,6 +734,8 @@ extern struct pci_dev *pci_dev_get(struc
> extern void pci_dev_put(struct pci_dev *dev);
> extern void pci_remove_bus(struct pci_bus *b);
> extern void pci_stop_and_remove_bus_device(struct pci_dev *dev);
> +extern void pci_stop_bus_devices(struct pci_bus *bus);
> +extern void pci_remove_host_bridge(struct pci_host_bridge *bridge);
> void pci_setup_cardbus(struct pci_bus *bus);
> extern void pci_sort_breadthfirst(void);
> #define dev_is_pci(d) ((d)->bus == &pci_bus_type)
> Index: Bjorn-next-0925-configchange/drivers/acpi/pci_bind.c
> ===================================================================
> --- Bjorn-next-0925-configchange.orig/drivers/acpi/pci_bind.c
> +++ Bjorn-next-0925-configchange/drivers/acpi/pci_bind.c
> @@ -118,3 +118,10 @@ int acpi_pci_bind_root(struct acpi_devic
>
> return 0;
> }
> +
> +void acpi_pci_unbind_root(struct acpi_device *device)
> +{
> + device->ops.bind = NULL;
> + device->ops.unbind = NULL;
> +}
> +
> Index: Bjorn-next-0925-configchange/include/acpi/acpi_drivers.h
> ===================================================================
> --- Bjorn-next-0925-configchange.orig/include/acpi/acpi_drivers.h
> +++ Bjorn-next-0925-configchange/include/acpi/acpi_drivers.h
> @@ -101,6 +101,7 @@ struct pci_bus;
>
> struct pci_dev *acpi_get_pci_dev(acpi_handle);
> int acpi_pci_bind_root(struct acpi_device *device);
> +void acpi_pci_unbind_root(struct acpi_device *device);
>
> /* Arch-defined function to add a bus to the system */
>
>
^ permalink raw reply [flat|nested] 95+ messages in thread* (unknown),
2012-10-30 4:02 ` Bjorn Helgaas
@ 2012-10-30 17:42 ` Yinghai Lu
2012-10-30 17:42 ` [PATCH 1/8] PCI: Separate out pci_assign_unassigned_bus_resources() Yinghai Lu
` (9 more replies)
2012-11-04 4:39 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus Yinghai Lu
1 sibling, 10 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-10-30 17:42 UTC (permalink / raw)
To: Bjorn Helgaas, Len Brown, Taku Izumi, Jiang Liu
Cc: linux-pci, linux-acpi, Yinghai Lu
Subject: [PATCH resend 0/8] PCI, ACPI, x86: pci root bus hotplug support resources assign and remove path
1. add support for assign resource for hot add path.
2. stop and remove root bus during acpi root remove.
could get from
git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-root-bus-hotplug
Yinghai Lu (8):
PCI: Separate out pci_assign_unassigned_bus_resources()
PCI: Move pci_rescan_bus() back to probe.c
PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res
PCI, ACPI: assign unassigned resource for hot add root bus
PCI: Add pci_stop/remove_root_bus()
PCI, ACPI: Make acpi_pci_root_remove stop/remove pci root bus
PCI, ACPI: delete root bus prt during hot remove path
PCI, ACPI: remove acpi_root_driver in reserse order
drivers/acpi/pci_root.c | 21 ++++++++++++++++++++-
drivers/pci/probe.c | 22 ++++++++++++++++++++++
drivers/pci/remove.c | 36 ++++++++++++++++++++++++++++++++++++
drivers/pci/setup-bus.c | 22 +---------------------
include/linux/pci.h | 3 +++
5 files changed, 82 insertions(+), 22 deletions(-)
--
1.7.7
^ permalink raw reply [flat|nested] 95+ messages in thread* [PATCH 1/8] PCI: Separate out pci_assign_unassigned_bus_resources()
2012-10-30 17:42 ` (unknown), Yinghai Lu
@ 2012-10-30 17:42 ` Yinghai Lu
2012-10-30 17:42 ` [PATCH 2/8] PCI: Move pci_rescan_bus() back to probe.c Yinghai Lu
` (8 subsequent siblings)
9 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-10-30 17:42 UTC (permalink / raw)
To: Bjorn Helgaas, Len Brown, Taku Izumi, Jiang Liu
Cc: linux-pci, linux-acpi, Yinghai Lu
It is main portion of pci_rescan_bus().
Separate it out and prepare to use it for pci root bus hot add later.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/setup-bus.c | 32 ++++++++++++++++++--------------
include/linux/pci.h | 1 +
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 1e808ca..1f34929 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1550,25 +1550,12 @@ enable_all:
}
EXPORT_SYMBOL_GPL(pci_assign_unassigned_bridge_resources);
-#ifdef CONFIG_HOTPLUG
-/**
- * pci_rescan_bus - scan a PCI bus for devices.
- * @bus: PCI bus to scan
- *
- * Scan a PCI bus and child buses for new devices, adds them,
- * and enables them.
- *
- * Returns the max number of subordinate bus discovered.
- */
-unsigned int __ref pci_rescan_bus(struct pci_bus *bus)
+void pci_assign_unassigned_bus_resources(struct pci_bus *bus)
{
- unsigned int max;
struct pci_dev *dev;
LIST_HEAD(add_list); /* list of resources that
want additional resources */
- max = pci_scan_child_bus(bus);
-
down_read(&pci_bus_sem);
list_for_each_entry(dev, &bus->devices, bus_list)
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
@@ -1581,6 +1568,23 @@ unsigned int __ref pci_rescan_bus(struct pci_bus *bus)
BUG_ON(!list_empty(&add_list));
pci_enable_bridges(bus);
+}
+#ifdef CONFIG_HOTPLUG
+/**
+ * pci_rescan_bus - scan a PCI bus for devices.
+ * @bus: PCI bus to scan
+ *
+ * Scan a PCI bus and child buses for new devices, adds them,
+ * and enables them.
+ *
+ * Returns the max number of subordinate bus discovered.
+ */
+unsigned int __ref pci_rescan_bus(struct pci_bus *bus)
+{
+ unsigned int max;
+
+ max = pci_scan_child_bus(bus);
+ pci_assign_unassigned_bus_resources(bus);
pci_bus_add_devices(bus);
return max;
diff --git a/include/linux/pci.h b/include/linux/pci.h
index be1de01..505c05a 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -980,6 +980,7 @@ void pci_bus_size_bridges(struct pci_bus *bus);
int pci_claim_resource(struct pci_dev *, int);
void pci_assign_unassigned_resources(void);
void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge);
+void pci_assign_unassigned_bus_resources(struct pci_bus *bus);
void pdev_enable_device(struct pci_dev *);
int pci_enable_resources(struct pci_dev *, int mask);
void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 2/8] PCI: Move pci_rescan_bus() back to probe.c
2012-10-30 17:42 ` (unknown), Yinghai Lu
2012-10-30 17:42 ` [PATCH 1/8] PCI: Separate out pci_assign_unassigned_bus_resources() Yinghai Lu
@ 2012-10-30 17:42 ` Yinghai Lu
2012-10-30 17:42 ` [PATCH 3/8] PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res Yinghai Lu
` (7 subsequent siblings)
9 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-10-30 17:42 UTC (permalink / raw)
To: Bjorn Helgaas, Len Brown, Taku Izumi, Jiang Liu
Cc: linux-pci, linux-acpi, Yinghai Lu
We have pci_assign_unassigned_bus_resources() in as global function now.
Move back pci_rescan_bus to probe.c where it should be.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/probe.c | 21 +++++++++++++++++++++
drivers/pci/setup-bus.c | 22 ----------------------
2 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index ec909af..65f62e3 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1890,6 +1890,27 @@ unsigned int __ref pci_rescan_bus_bridge_resize(struct pci_dev *bridge)
return max;
}
+/**
+ * pci_rescan_bus - scan a PCI bus for devices.
+ * @bus: PCI bus to scan
+ *
+ * Scan a PCI bus and child buses for new devices, adds them,
+ * and enables them.
+ *
+ * Returns the max number of subordinate bus discovered.
+ */
+unsigned int __ref pci_rescan_bus(struct pci_bus *bus)
+{
+ unsigned int max;
+
+ max = pci_scan_child_bus(bus);
+ pci_assign_unassigned_bus_resources(bus);
+ pci_bus_add_devices(bus);
+
+ return max;
+}
+EXPORT_SYMBOL_GPL(pci_rescan_bus);
+
EXPORT_SYMBOL(pci_add_new_bus);
EXPORT_SYMBOL(pci_scan_slot);
EXPORT_SYMBOL(pci_scan_bridge);
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 1f34929..59e6c55 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1569,25 +1569,3 @@ void pci_assign_unassigned_bus_resources(struct pci_bus *bus)
pci_enable_bridges(bus);
}
-#ifdef CONFIG_HOTPLUG
-/**
- * pci_rescan_bus - scan a PCI bus for devices.
- * @bus: PCI bus to scan
- *
- * Scan a PCI bus and child buses for new devices, adds them,
- * and enables them.
- *
- * Returns the max number of subordinate bus discovered.
- */
-unsigned int __ref pci_rescan_bus(struct pci_bus *bus)
-{
- unsigned int max;
-
- max = pci_scan_child_bus(bus);
- pci_assign_unassigned_bus_resources(bus);
- pci_bus_add_devices(bus);
-
- return max;
-}
-EXPORT_SYMBOL_GPL(pci_rescan_bus);
-#endif
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 3/8] PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res
2012-10-30 17:42 ` (unknown), Yinghai Lu
2012-10-30 17:42 ` [PATCH 1/8] PCI: Separate out pci_assign_unassigned_bus_resources() Yinghai Lu
2012-10-30 17:42 ` [PATCH 2/8] PCI: Move pci_rescan_bus() back to probe.c Yinghai Lu
@ 2012-10-30 17:42 ` Yinghai Lu
2012-11-02 10:02 ` Taku Izumi
2012-10-30 17:42 ` [PATCH 4/8] PCI, ACPI: assign unassigned resource for hot add root bus Yinghai Lu
` (6 subsequent siblings)
9 siblings, 1 reply; 95+ messages in thread
From: Yinghai Lu @ 2012-10-30 17:42 UTC (permalink / raw)
To: Bjorn Helgaas, Len Brown, Taku Izumi, Jiang Liu
Cc: linux-pci, linux-acpi, Yinghai Lu
So could use assign_unassigned_bus_res pci root bus add
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/probe.c | 1 +
drivers/pci/setup-bus.c | 2 --
2 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 65f62e3..59cf1ba 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1905,6 +1905,7 @@ unsigned int __ref pci_rescan_bus(struct pci_bus *bus)
max = pci_scan_child_bus(bus);
pci_assign_unassigned_bus_resources(bus);
+ pci_enable_bridges(bus);
pci_bus_add_devices(bus);
return max;
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 59e6c55..6d3591d 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1566,6 +1566,4 @@ void pci_assign_unassigned_bus_resources(struct pci_bus *bus)
up_read(&pci_bus_sem);
__pci_bus_assign_resources(bus, &add_list, NULL);
BUG_ON(!list_empty(&add_list));
-
- pci_enable_bridges(bus);
}
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* Re: [PATCH 3/8] PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res
2012-10-30 17:42 ` [PATCH 3/8] PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res Yinghai Lu
@ 2012-11-02 10:02 ` Taku Izumi
2012-11-02 14:56 ` Yinghai Lu
0 siblings, 1 reply; 95+ messages in thread
From: Taku Izumi @ 2012-11-02 10:02 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Bjorn Helgaas, Len Brown, Jiang Liu, linux-pci, linux-acpi
On Tue, 30 Oct 2012 10:42:40 -0700
Yinghai Lu <yinghai@kernel.org> wrote:
> So could use assign_unassigned_bus_res pci root bus add
This description doesn't match the following patch...
This is for 4/8?
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> ---
> drivers/pci/probe.c | 1 +
> drivers/pci/setup-bus.c | 2 --
> 2 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 65f62e3..59cf1ba 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -1905,6 +1905,7 @@ unsigned int __ref pci_rescan_bus(struct pci_bus *bus)
>
> max = pci_scan_child_bus(bus);
> pci_assign_unassigned_bus_resources(bus);
> + pci_enable_bridges(bus);
> pci_bus_add_devices(bus);
>
> return max;
> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
> index 59e6c55..6d3591d 100644
> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -1566,6 +1566,4 @@ void pci_assign_unassigned_bus_resources(struct pci_bus *bus)
> up_read(&pci_bus_sem);
> __pci_bus_assign_resources(bus, &add_list, NULL);
> BUG_ON(!list_empty(&add_list));
> -
> - pci_enable_bridges(bus);
> }
> --
> 1.7.7
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Taku Izumi <izumi.taku@jp.fujitsu.com>
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 3/8] PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res
2012-11-02 10:02 ` Taku Izumi
@ 2012-11-02 14:56 ` Yinghai Lu
0 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-11-02 14:56 UTC (permalink / raw)
To: Taku Izumi; +Cc: Bjorn Helgaas, Len Brown, Jiang Liu, linux-pci, linux-acpi
On Fri, Nov 2, 2012 at 3:02 AM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
> On Tue, 30 Oct 2012 10:42:40 -0700
> Yinghai Lu <yinghai@kernel.org> wrote:
>
>> So could use assign_unassigned_bus_res pci root bus add
>
> This description doesn't match the following patch...
> This is for 4/8?
yes, this patch is preparation one for 4/8.
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH 4/8] PCI, ACPI: assign unassigned resource for hot add root bus
2012-10-30 17:42 ` (unknown), Yinghai Lu
` (2 preceding siblings ...)
2012-10-30 17:42 ` [PATCH 3/8] PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res Yinghai Lu
@ 2012-10-30 17:42 ` Yinghai Lu
2012-10-30 17:42 ` [PATCH 5/8] PCI: Add pci_stop/remove_root_bus() Yinghai Lu
` (5 subsequent siblings)
9 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-10-30 17:42 UTC (permalink / raw)
To: Bjorn Helgaas, Len Brown, Taku Izumi, Jiang Liu
Cc: linux-pci, linux-acpi, Yinghai Lu
After we get hot-added ioapic registered.
pci_enable_bridges will try to enable ioapic irq for pci bridges.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/acpi/pci_root.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index bce469c..27adbfd 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -644,12 +644,19 @@ static int acpi_pci_root_start(struct acpi_device *device)
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;
+ if (system_state != SYSTEM_BOOTING)
+ pci_assign_unassigned_bus_resources(root->bus);
+
mutex_lock(&acpi_pci_root_lock);
list_for_each_entry(driver, &acpi_pci_drivers, node)
if (driver->add)
driver->add(root);
mutex_unlock(&acpi_pci_root_lock);
+ /* need to after hot-added ioapic is registered */
+ if (system_state != SYSTEM_BOOTING)
+ pci_enable_bridges(root->bus);
+
pci_bus_add_devices(root->bus);
return 0;
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 5/8] PCI: Add pci_stop/remove_root_bus()
2012-10-30 17:42 ` (unknown), Yinghai Lu
` (3 preceding siblings ...)
2012-10-30 17:42 ` [PATCH 4/8] PCI, ACPI: assign unassigned resource for hot add root bus Yinghai Lu
@ 2012-10-30 17:42 ` Yinghai Lu
2012-10-30 17:42 ` [PATCH 6/8] PCI, ACPI: Make acpi_pci_root_remove stop/remove pci root bus Yinghai Lu
` (4 subsequent siblings)
9 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-10-30 17:42 UTC (permalink / raw)
To: Bjorn Helgaas, Len Brown, Taku Izumi, Jiang Liu
Cc: linux-pci, linux-acpi, Yinghai Lu
It supports both pci root bus and pci bus under pci bridge.
-v2: clear pci_bridge's subordinate.
-v3: only handle root bus. and also put Jiang's get/put pair in
-v4: fold pci_stop/remove_bus_devices in... reducing confusing.
-v5: split device_register/unregister to avoid extra get...
also remove extra blank line.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/remove.c | 36 ++++++++++++++++++++++++++++++++++++
include/linux/pci.h | 2 ++
2 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
index 513972f..7c0fd92 100644
--- a/drivers/pci/remove.c
+++ b/drivers/pci/remove.c
@@ -111,3 +111,39 @@ void pci_stop_and_remove_bus_device(struct pci_dev *dev)
pci_remove_bus_device(dev);
}
EXPORT_SYMBOL(pci_stop_and_remove_bus_device);
+
+void pci_stop_root_bus(struct pci_bus *bus)
+{
+ struct pci_dev *child, *tmp;
+ struct pci_host_bridge *host_bridge;
+
+ if (!pci_is_root_bus(bus))
+ return;
+
+ host_bridge = to_pci_host_bridge(bus->bridge);
+ list_for_each_entry_safe_reverse(child, tmp,
+ &bus->devices, bus_list)
+ pci_stop_bus_device(child);
+
+ /* stop the host bridge */
+ device_del(&host_bridge->dev);
+}
+
+void pci_remove_root_bus(struct pci_bus *bus)
+{
+ struct pci_dev *child, *tmp;
+ struct pci_host_bridge *host_bridge;
+
+ if (!pci_is_root_bus(bus))
+ return;
+
+ host_bridge = to_pci_host_bridge(bus->bridge);
+ list_for_each_entry_safe(child, tmp,
+ &bus->devices, bus_list)
+ pci_remove_bus_device(child);
+ pci_remove_bus(bus);
+ host_bridge->bus = NULL;
+
+ /* remove the host bridge */
+ put_device(&host_bridge->dev);
+}
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 505c05a..a5cd03b 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -734,6 +734,8 @@ extern struct pci_dev *pci_dev_get(struct pci_dev *dev);
extern void pci_dev_put(struct pci_dev *dev);
extern void pci_remove_bus(struct pci_bus *b);
extern void pci_stop_and_remove_bus_device(struct pci_dev *dev);
+void pci_stop_root_bus(struct pci_bus *bus);
+void pci_remove_root_bus(struct pci_bus *bus);
void pci_setup_cardbus(struct pci_bus *bus);
extern void pci_sort_breadthfirst(void);
#define dev_is_pci(d) ((d)->bus == &pci_bus_type)
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 6/8] PCI, ACPI: Make acpi_pci_root_remove stop/remove pci root bus
2012-10-30 17:42 ` (unknown), Yinghai Lu
` (4 preceding siblings ...)
2012-10-30 17:42 ` [PATCH 5/8] PCI: Add pci_stop/remove_root_bus() Yinghai Lu
@ 2012-10-30 17:42 ` Yinghai Lu
2012-10-30 17:42 ` [PATCH 7/8] PCI, ACPI: delete root bus prt during hot remove path Yinghai Lu
` (3 subsequent siblings)
9 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-10-30 17:42 UTC (permalink / raw)
To: Bjorn Helgaas, Len Brown, Taku Izumi, Jiang Liu
Cc: linux-pci, linux-acpi, Yinghai Lu
It will call new added pci_stop_and_remove_bus() to stop/remove pci root bus.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
---
drivers/acpi/pci_root.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 27adbfd..aed0953 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -667,14 +667,20 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;
+ pci_stop_root_bus(root->bus);
+
mutex_lock(&acpi_pci_root_lock);
list_for_each_entry(driver, &acpi_pci_drivers, node)
if (driver->remove)
driver->remove(root);
+ mutex_unlock(&acpi_pci_root_lock);
device_set_run_wake(root->bus->bridge, false);
pci_acpi_remove_bus_pm_notifier(device);
+ pci_remove_root_bus(root->bus);
+
+ mutex_lock(&acpi_pci_root_lock);
list_del(&root->node);
mutex_unlock(&acpi_pci_root_lock);
kfree(root);
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 7/8] PCI, ACPI: delete root bus prt during hot remove path
2012-10-30 17:42 ` (unknown), Yinghai Lu
` (5 preceding siblings ...)
2012-10-30 17:42 ` [PATCH 6/8] PCI, ACPI: Make acpi_pci_root_remove stop/remove pci root bus Yinghai Lu
@ 2012-10-30 17:42 ` Yinghai Lu
2012-10-30 17:42 ` [PATCH 8/8] PCI, ACPI: remove acpi_root_driver in reserse order Yinghai Lu
` (2 subsequent siblings)
9 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-10-30 17:42 UTC (permalink / raw)
To: Bjorn Helgaas, Len Brown, Taku Izumi, Jiang Liu
Cc: linux-pci, linux-acpi, Yinghai Lu
corresponding to add path.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/acpi/pci_root.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index aed0953..a27cbb57 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -664,6 +664,8 @@ static int acpi_pci_root_start(struct acpi_device *device)
static int acpi_pci_root_remove(struct acpi_device *device, int type)
{
+ acpi_status status;
+ acpi_handle handle;
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;
@@ -678,6 +680,10 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
device_set_run_wake(root->bus->bridge, false);
pci_acpi_remove_bus_pm_notifier(device);
+ status = acpi_get_handle(device->handle, METHOD_NAME__PRT, &handle);
+ if (ACPI_SUCCESS(status))
+ acpi_pci_irq_del_prt(root->bus);
+
pci_remove_root_bus(root->bus);
mutex_lock(&acpi_pci_root_lock);
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 8/8] PCI, ACPI: remove acpi_root_driver in reserse order
2012-10-30 17:42 ` (unknown), Yinghai Lu
` (6 preceding siblings ...)
2012-10-30 17:42 ` [PATCH 7/8] PCI, ACPI: delete root bus prt during hot remove path Yinghai Lu
@ 2012-10-30 17:42 ` Yinghai Lu
2012-11-02 0:17 ` Rafael J. Wysocki
2012-11-06 5:03 ` Taku Izumi
9 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-10-30 17:42 UTC (permalink / raw)
To: Bjorn Helgaas, Len Brown, Taku Izumi, Jiang Liu
Cc: linux-pci, linux-acpi, Yinghai Lu
aka stop acpi root driver in this sequence: acpiphp, iommu, ioapic.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/acpi/pci_root.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index a27cbb57..012f40d 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -672,7 +672,7 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
pci_stop_root_bus(root->bus);
mutex_lock(&acpi_pci_root_lock);
- list_for_each_entry(driver, &acpi_pci_drivers, node)
+ list_for_each_entry_reverse(driver, &acpi_pci_drivers, node)
if (driver->remove)
driver->remove(root);
mutex_unlock(&acpi_pci_root_lock);
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* Re:
2012-10-30 17:42 ` (unknown), Yinghai Lu
` (7 preceding siblings ...)
2012-10-30 17:42 ` [PATCH 8/8] PCI, ACPI: remove acpi_root_driver in reserse order Yinghai Lu
@ 2012-11-02 0:17 ` Rafael J. Wysocki
2012-11-05 22:27 ` Re: Bjorn Helgaas
2012-11-06 5:03 ` Taku Izumi
9 siblings, 1 reply; 95+ messages in thread
From: Rafael J. Wysocki @ 2012-11-02 0:17 UTC (permalink / raw)
To: Yinghai Lu
Cc: Bjorn Helgaas, Len Brown, Taku Izumi, Jiang Liu, linux-pci,
linux-acpi
Hi,
On Tuesday, October 30, 2012 10:42:37 AM Yinghai Lu wrote:
> Subject: [PATCH resend 0/8] PCI, ACPI, x86: pci root bus hotplug support resources assign and remove path
>
> 1. add support for assign resource for hot add path.
> 2. stop and remove root bus during acpi root remove.
>
>
> could get from
> git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-root-bus-hotplug
>
> Yinghai Lu (8):
> PCI: Separate out pci_assign_unassigned_bus_resources()
> PCI: Move pci_rescan_bus() back to probe.c
> PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res
> PCI, ACPI: assign unassigned resource for hot add root bus
> PCI: Add pci_stop/remove_root_bus()
> PCI, ACPI: Make acpi_pci_root_remove stop/remove pci root bus
> PCI, ACPI: delete root bus prt during hot remove path
> PCI, ACPI: remove acpi_root_driver in reserse order
>
> drivers/acpi/pci_root.c | 21 ++++++++++++++++++++-
> drivers/pci/probe.c | 22 ++++++++++++++++++++++
> drivers/pci/remove.c | 36 ++++++++++++++++++++++++++++++++++++
> drivers/pci/setup-bus.c | 22 +---------------------
> include/linux/pci.h | 3 +++
> 5 files changed, 82 insertions(+), 22 deletions(-)
Please feel free to add
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
to the ACPI-related patches in this series.
Thanks,
Rafael
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 95+ messages in thread* Re:
2012-11-02 0:17 ` Rafael J. Wysocki
@ 2012-11-05 22:27 ` Bjorn Helgaas
2012-11-05 22:49 ` Re: Yinghai Lu
0 siblings, 1 reply; 95+ messages in thread
From: Bjorn Helgaas @ 2012-11-05 22:27 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Yinghai Lu, Len Brown, Taku Izumi, Jiang Liu, linux-pci,
linux-acpi
On Thu, Nov 1, 2012 at 6:17 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> Hi,
>
> On Tuesday, October 30, 2012 10:42:37 AM Yinghai Lu wrote:
>> Subject: [PATCH resend 0/8] PCI, ACPI, x86: pci root bus hotplug support resources assign and remove path
>>
>> 1. add support for assign resource for hot add path.
>> 2. stop and remove root bus during acpi root remove.
>>
>>
>> could get from
>> git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-root-bus-hotplug
>>
>> Yinghai Lu (8):
>> PCI: Separate out pci_assign_unassigned_bus_resources()
>> PCI: Move pci_rescan_bus() back to probe.c
>> PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res
>> PCI, ACPI: assign unassigned resource for hot add root bus
>> PCI: Add pci_stop/remove_root_bus()
>> PCI, ACPI: Make acpi_pci_root_remove stop/remove pci root bus
>> PCI, ACPI: delete root bus prt during hot remove path
>> PCI, ACPI: remove acpi_root_driver in reserse order
>>
>> drivers/acpi/pci_root.c | 21 ++++++++++++++++++++-
>> drivers/pci/probe.c | 22 ++++++++++++++++++++++
>> drivers/pci/remove.c | 36 ++++++++++++++++++++++++++++++++++++
>> drivers/pci/setup-bus.c | 22 +---------------------
>> include/linux/pci.h | 3 +++
>> 5 files changed, 82 insertions(+), 22 deletions(-)
>
> Please feel free to add
>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> to the ACPI-related patches in this series.
I applied these to my pci/yinghai-for-pci-root-bus-hotplug branch as
v3.8 material. They should appear in "next" tomorrow. Thanks!
^ permalink raw reply [flat|nested] 95+ messages in thread
* RE:
2012-10-30 17:42 ` (unknown), Yinghai Lu
` (8 preceding siblings ...)
2012-11-02 0:17 ` Rafael J. Wysocki
@ 2012-11-06 5:03 ` Taku Izumi
9 siblings, 0 replies; 95+ messages in thread
From: Taku Izumi @ 2012-11-06 5:03 UTC (permalink / raw)
To: 'Yinghai Lu'
Cc: linux-pci, linux-acpi, 'Bjorn Helgaas',
'Len Brown', 'Jiang Liu'
Reviewed and tested by Taku Izumi <izumi.taku@jp.fujitsu.com>
> -----Original Message-----
> From: linux-pci-owner@vger.kernel.org [mailto:linux-pci-owner@vger.kernel.org] On Behalf Of Yinghai Lu
> Sent: Wednesday, October 31, 2012 2:43 AM
> To: Bjorn Helgaas; Len Brown; Taku Izumi; Jiang Liu
> Cc: linux-pci@vger.kernel.org; linux-acpi@vger.kernel.org; Yinghai Lu
> Subject:
>
> Subject: [PATCH resend 0/8] PCI, ACPI, x86: pci root bus hotplug support resources assign and remove path
>
> 1. add support for assign resource for hot add path.
> 2. stop and remove root bus during acpi root remove.
>
>
> could get from
> git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-root-bus-hotplug
>
> Yinghai Lu (8):
> PCI: Separate out pci_assign_unassigned_bus_resources()
> PCI: Move pci_rescan_bus() back to probe.c
> PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res
> PCI, ACPI: assign unassigned resource for hot add root bus
> PCI: Add pci_stop/remove_root_bus()
> PCI, ACPI: Make acpi_pci_root_remove stop/remove pci root bus
> PCI, ACPI: delete root bus prt during hot remove path
> PCI, ACPI: remove acpi_root_driver in reserse order
>
> drivers/acpi/pci_root.c | 21 ++++++++++++++++++++-
> drivers/pci/probe.c | 22 ++++++++++++++++++++++
> drivers/pci/remove.c | 36 ++++++++++++++++++++++++++++++++++++
> drivers/pci/setup-bus.c | 22 +---------------------
> include/linux/pci.h | 3 +++
> 5 files changed, 82 insertions(+), 22 deletions(-)
>
> --
> 1.7.7
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2012-10-30 4:02 ` Bjorn Helgaas
2012-10-30 17:42 ` (unknown), Yinghai Lu
@ 2012-11-04 4:39 ` Yinghai Lu
2012-11-04 4:39 ` [PATCH 1/8] PCI, x86: Separate out pcibios_allocate_bridge_resources() Yinghai Lu
` (8 more replies)
1 sibling, 9 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-11-04 4:39 UTC (permalink / raw)
To: Bjorn Helgaas, Rafael J. Wysocki, Len Brown, Taku Izumi,
Jiang Liu
Cc: linux-pci, linux-kernel, linux-acpi, Yinghai Lu
For root bus hot add, fw could assign some resource for the devices for
that root bus before notifying os via acpi, we should check and use those
resources at first just like we do for booting path.
At first, we need to refactor x86 pci pcibios_allocate related functions
for booting path to take bus as parameter.
After that, we could use the survey function for hot add root bus.
based on pci/yinghai-for-pci-root-bus-hotplug
could get from
git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-survey-resources
Yinghai Lu (8):
PCI, x86: Separate out pcibios_allocate_bridge_resources()
PCI, x86: Separate out pcibios_allocate_dev_resources()
PCI, x86: Let pcibios_allocate_bus_resources() take bus instead
PCI, x86: Separate out rom resource claim
PCI, x86: Add pcibios_fw_addr_done
PCI, x86: Remove __init for hw/fw allocated functions
PCI, x86: Claim FW allocated resources in hot add path.
PCI, ACPI: reserve fw allocated resource for hot added root bus
arch/x86/pci/i386.c | 185 +++++++++++++++++++++++++++++++----------------
drivers/acpi/pci_root.c | 4 +-
drivers/pci/bus.c | 2 +
include/linux/pci.h | 1 +
4 files changed, 127 insertions(+), 65 deletions(-)
--
1.7.7
^ permalink raw reply [flat|nested] 95+ messages in thread* [PATCH 1/8] PCI, x86: Separate out pcibios_allocate_bridge_resources()
2012-11-04 4:39 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus Yinghai Lu
@ 2012-11-04 4:39 ` Yinghai Lu
2012-11-04 4:39 ` [PATCH 2/8] PCI, x86: Separate out pcibios_allocate_dev_resources() Yinghai Lu
` (7 subsequent siblings)
8 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-11-04 4:39 UTC (permalink / raw)
To: Bjorn Helgaas, Rafael J. Wysocki, Len Brown, Taku Izumi,
Jiang Liu
Cc: linux-pci, linux-kernel, linux-acpi, Yinghai Lu, x86
Thus pcibios_allocate_bus_resources() could more simple and clean.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: x86@kernel.org
---
arch/x86/pci/i386.c | 46 ++++++++++++++++++++++++----------------------
1 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index dd8ca6f..9800362 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -193,34 +193,36 @@ EXPORT_SYMBOL(pcibios_align_resource);
* as well.
*/
-static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
+static void __init pcibios_allocate_bridge_resources(struct pci_dev *dev)
{
- struct pci_bus *bus;
- struct pci_dev *dev;
int idx;
struct resource *r;
+ for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) {
+ r = &dev->resource[idx];
+ if (!r->flags)
+ continue;
+ if (!r->start || pci_claim_resource(dev, idx) < 0) {
+ /*
+ * Something is wrong with the region.
+ * Invalidate the resource to prevent
+ * child resource allocations in this
+ * range.
+ */
+ r->start = r->end = 0;
+ r->flags = 0;
+ }
+ }
+}
+
+static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
+{
+ struct pci_bus *bus;
+
/* Depth-First Search on bus tree */
list_for_each_entry(bus, bus_list, node) {
- if ((dev = bus->self)) {
- for (idx = PCI_BRIDGE_RESOURCES;
- idx < PCI_NUM_RESOURCES; idx++) {
- r = &dev->resource[idx];
- if (!r->flags)
- continue;
- if (!r->start ||
- pci_claim_resource(dev, idx) < 0) {
- /*
- * Something is wrong with the region.
- * Invalidate the resource to prevent
- * child resource allocations in this
- * range.
- */
- r->start = r->end = 0;
- r->flags = 0;
- }
- }
- }
+ if (bus->self)
+ pcibios_allocate_bridge_resources(bus->self);
pcibios_allocate_bus_resources(&bus->children);
}
}
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 2/8] PCI, x86: Separate out pcibios_allocate_dev_resources()
2012-11-04 4:39 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus Yinghai Lu
2012-11-04 4:39 ` [PATCH 1/8] PCI, x86: Separate out pcibios_allocate_bridge_resources() Yinghai Lu
@ 2012-11-04 4:39 ` Yinghai Lu
2012-11-04 4:39 ` [PATCH 3/8] PCI, x86: Let pcibios_allocate_bus_resources() take bus instead Yinghai Lu
` (6 subsequent siblings)
8 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-11-04 4:39 UTC (permalink / raw)
To: Bjorn Helgaas, Rafael J. Wysocki, Len Brown, Taku Izumi,
Jiang Liu
Cc: linux-pci, linux-kernel, linux-acpi, Yinghai Lu, x86
Thus pcibios_allocate_resources() could more simple and clean.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: x86@kernel.org
---
arch/x86/pci/i386.c | 42 +++++++++++++++++++++++-------------------
1 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 9800362..5817cf2 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -232,9 +232,8 @@ struct pci_check_idx_range {
int end;
};
-static void __init pcibios_allocate_resources(int pass)
+static void __init pcibios_allocate_dev_resources(struct pci_dev *dev, int pass)
{
- struct pci_dev *dev = NULL;
int idx, disabled, i;
u16 command;
struct resource *r;
@@ -246,14 +245,13 @@ static void __init pcibios_allocate_resources(int pass)
#endif
};
- for_each_pci_dev(dev) {
- pci_read_config_word(dev, PCI_COMMAND, &command);
- for (i = 0; i < ARRAY_SIZE(idx_range); i++)
+ pci_read_config_word(dev, PCI_COMMAND, &command);
+ for (i = 0; i < ARRAY_SIZE(idx_range); i++)
for (idx = idx_range[i].start; idx <= idx_range[i].end; idx++) {
r = &dev->resource[idx];
- if (r->parent) /* Already allocated */
+ if (r->parent) /* Already allocated */
continue;
- if (!r->start) /* Address not assigned at all */
+ if (!r->start) /* Address not assigned at all */
continue;
if (r->flags & IORESOURCE_IO)
disabled = !(command & PCI_COMMAND_IO);
@@ -272,23 +270,29 @@ static void __init pcibios_allocate_resources(int pass)
}
}
}
- if (!pass) {
- r = &dev->resource[PCI_ROM_RESOURCE];
- if (r->flags & IORESOURCE_ROM_ENABLE) {
- /* Turn the ROM off, leave the resource region,
- * but keep it unregistered. */
- u32 reg;
- dev_dbg(&dev->dev, "disabling ROM %pR\n", r);
- r->flags &= ~IORESOURCE_ROM_ENABLE;
- pci_read_config_dword(dev,
- dev->rom_base_reg, ®);
- pci_write_config_dword(dev, dev->rom_base_reg,
+ if (!pass) {
+ r = &dev->resource[PCI_ROM_RESOURCE];
+ if (r->flags & IORESOURCE_ROM_ENABLE) {
+ /* Turn the ROM off, leave the resource region,
+ * but keep it unregistered. */
+ u32 reg;
+ dev_dbg(&dev->dev, "disabling ROM %pR\n", r);
+ r->flags &= ~IORESOURCE_ROM_ENABLE;
+ pci_read_config_dword(dev, dev->rom_base_reg, ®);
+ pci_write_config_dword(dev, dev->rom_base_reg,
reg & ~PCI_ROM_ADDRESS_ENABLE);
- }
}
}
}
+static void __init pcibios_allocate_resources(int pass)
+{
+ struct pci_dev *dev = NULL;
+
+ for_each_pci_dev(dev)
+ pcibios_allocate_dev_resources(dev, pass);
+}
+
static int __init pcibios_assign_resources(void)
{
struct pci_dev *dev = NULL;
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 3/8] PCI, x86: Let pcibios_allocate_bus_resources() take bus instead
2012-11-04 4:39 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus Yinghai Lu
2012-11-04 4:39 ` [PATCH 1/8] PCI, x86: Separate out pcibios_allocate_bridge_resources() Yinghai Lu
2012-11-04 4:39 ` [PATCH 2/8] PCI, x86: Separate out pcibios_allocate_dev_resources() Yinghai Lu
@ 2012-11-04 4:39 ` Yinghai Lu
2012-11-04 4:39 ` [PATCH 4/8] PCI, x86: Separate out rom resource claim Yinghai Lu
` (5 subsequent siblings)
8 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-11-04 4:39 UTC (permalink / raw)
To: Bjorn Helgaas, Rafael J. Wysocki, Len Brown, Taku Izumi,
Jiang Liu
Cc: linux-pci, linux-kernel, linux-acpi, Yinghai Lu, x86
Will need call the same code for one single root bus during hot add.
So make it take bus instead of bus list.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: x86@kernel.org
---
arch/x86/pci/i386.c | 38 +++++++++++++++++++++++++-------------
1 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 5817cf2..84696ed 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -215,16 +215,15 @@ static void __init pcibios_allocate_bridge_resources(struct pci_dev *dev)
}
}
-static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
+static void __init pcibios_allocate_bus_resources(struct pci_bus *bus)
{
- struct pci_bus *bus;
+ struct pci_bus *child;
/* Depth-First Search on bus tree */
- list_for_each_entry(bus, bus_list, node) {
- if (bus->self)
- pcibios_allocate_bridge_resources(bus->self);
- pcibios_allocate_bus_resources(&bus->children);
- }
+ if (bus->self)
+ pcibios_allocate_bridge_resources(bus->self);
+ list_for_each_entry(child, &bus->children, node)
+ pcibios_allocate_bus_resources(child);
}
struct pci_check_idx_range {
@@ -285,12 +284,18 @@ static void __init pcibios_allocate_dev_resources(struct pci_dev *dev, int pass)
}
}
-static void __init pcibios_allocate_resources(int pass)
+static void __init pcibios_allocate_resources(struct pci_bus *bus, int pass)
{
- struct pci_dev *dev = NULL;
+ struct pci_dev *dev;
+ struct pci_bus *child;
- for_each_pci_dev(dev)
+ list_for_each_entry(dev, &bus->devices, bus_list) {
pcibios_allocate_dev_resources(dev, pass);
+
+ child = dev->subordinate;
+ if (child)
+ pcibios_allocate_resources(child, pass);
+ }
}
static int __init pcibios_assign_resources(void)
@@ -323,10 +328,17 @@ static int __init pcibios_assign_resources(void)
void __init pcibios_resource_survey(void)
{
+ struct pci_bus *bus;
+
DBG("PCI: Allocating resources\n");
- pcibios_allocate_bus_resources(&pci_root_buses);
- pcibios_allocate_resources(0);
- pcibios_allocate_resources(1);
+
+ list_for_each_entry(bus, &pci_root_buses, node)
+ pcibios_allocate_bus_resources(bus);
+
+ list_for_each_entry(bus, &pci_root_buses, node)
+ pcibios_allocate_resources(bus, 0);
+ list_for_each_entry(bus, &pci_root_buses, node)
+ pcibios_allocate_resources(bus, 1);
e820_reserve_resources_late();
/*
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 4/8] PCI, x86: Separate out rom resource claim
2012-11-04 4:39 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus Yinghai Lu
` (2 preceding siblings ...)
2012-11-04 4:39 ` [PATCH 3/8] PCI, x86: Let pcibios_allocate_bus_resources() take bus instead Yinghai Lu
@ 2012-11-04 4:39 ` Yinghai Lu
2012-11-04 4:39 ` [PATCH 5/8] PCI, x86: Add pcibios_fw_addr_done Yinghai Lu
` (4 subsequent siblings)
8 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-11-04 4:39 UTC (permalink / raw)
To: Bjorn Helgaas, Rafael J. Wysocki, Len Brown, Taku Izumi,
Jiang Liu
Cc: linux-pci, linux-kernel, linux-acpi, Yinghai Lu, x86
So could use it with hot-added root bus later.
-v2: remove extra functions.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: x86@kernel.org
---
arch/x86/pci/i386.c | 52 ++++++++++++++++++++++++++++++++++----------------
1 files changed, 35 insertions(+), 17 deletions(-)
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 84696ed..42dd755 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -298,27 +298,45 @@ static void __init pcibios_allocate_resources(struct pci_bus *bus, int pass)
}
}
-static int __init pcibios_assign_resources(void)
+static void __init pcibios_allocate_dev_rom_resource(struct pci_dev *dev)
{
- struct pci_dev *dev = NULL;
struct resource *r;
- if (!(pci_probe & PCI_ASSIGN_ROMS)) {
- /*
- * Try to use BIOS settings for ROMs, otherwise let
- * pci_assign_unassigned_resources() allocate the new
- * addresses.
- */
- for_each_pci_dev(dev) {
- r = &dev->resource[PCI_ROM_RESOURCE];
- if (!r->flags || !r->start)
- continue;
- if (pci_claim_resource(dev, PCI_ROM_RESOURCE) < 0) {
- r->end -= r->start;
- r->start = 0;
- }
- }
+ /*
+ * Try to use BIOS settings for ROMs, otherwise let
+ * pci_assign_unassigned_resources() allocate the new
+ * addresses.
+ */
+ r = &dev->resource[PCI_ROM_RESOURCE];
+ if (!r->flags || !r->start)
+ return;
+
+ if (pci_claim_resource(dev, PCI_ROM_RESOURCE) < 0) {
+ r->end -= r->start;
+ r->start = 0;
}
+}
+static void __init pcibios_allocate_rom_resources(struct pci_bus *bus)
+{
+ struct pci_dev *dev;
+ struct pci_bus *child;
+
+ list_for_each_entry(dev, &bus->devices, bus_list) {
+ pcibios_allocate_dev_rom_resource(dev);
+
+ child = dev->subordinate;
+ if (child)
+ pcibios_allocate_rom_resources(child);
+ }
+}
+
+static int __init pcibios_assign_resources(void)
+{
+ struct pci_bus *bus;
+
+ if (!(pci_probe & PCI_ASSIGN_ROMS))
+ list_for_each_entry(bus, &pci_root_buses, node)
+ pcibios_allocate_rom_resources(bus);
pci_assign_unassigned_resources();
pcibios_fw_addr_list_del();
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 5/8] PCI, x86: Add pcibios_fw_addr_done
2012-11-04 4:39 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus Yinghai Lu
` (3 preceding siblings ...)
2012-11-04 4:39 ` [PATCH 4/8] PCI, x86: Separate out rom resource claim Yinghai Lu
@ 2012-11-04 4:39 ` Yinghai Lu
2012-11-04 4:39 ` [PATCH 6/8] PCI, x86: Remove __init for hw/fw allocated functions Yinghai Lu
` (3 subsequent siblings)
8 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-11-04 4:39 UTC (permalink / raw)
To: Bjorn Helgaas, Rafael J. Wysocki, Len Brown, Taku Izumi,
Jiang Liu
Cc: linux-pci, linux-kernel, linux-acpi, Yinghai Lu, x86
Use it to skip not needed function after pcibios_fw_addr_list_del is called.
for pci root bus hot add, we will need to use pcibios_allocate_dev_resources(),
and don't want to mess up with fw_addr, for hot-add removing path.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: x86@kernel.org
---
arch/x86/pci/i386.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 42dd755..edfc376 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -51,6 +51,7 @@ struct pcibios_fwaddrmap {
static LIST_HEAD(pcibios_fwaddrmappings);
static DEFINE_SPINLOCK(pcibios_fwaddrmap_lock);
+static bool pcibios_fw_addr_done;
/* Must be called with 'pcibios_fwaddrmap_lock' lock held. */
static struct pcibios_fwaddrmap *pcibios_fwaddrmap_lookup(struct pci_dev *dev)
@@ -72,6 +73,9 @@ pcibios_save_fw_addr(struct pci_dev *dev, int idx, resource_size_t fw_addr)
unsigned long flags;
struct pcibios_fwaddrmap *map;
+ if (pcibios_fw_addr_done)
+ return;
+
spin_lock_irqsave(&pcibios_fwaddrmap_lock, flags);
map = pcibios_fwaddrmap_lookup(dev);
if (!map) {
@@ -97,6 +101,9 @@ resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx)
struct pcibios_fwaddrmap *map;
resource_size_t fw_addr = 0;
+ if (pcibios_fw_addr_done)
+ return fw_addr;
+
spin_lock_irqsave(&pcibios_fwaddrmap_lock, flags);
map = pcibios_fwaddrmap_lookup(dev);
if (map)
@@ -106,7 +113,7 @@ resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx)
return fw_addr;
}
-static void pcibios_fw_addr_list_del(void)
+static void __init pcibios_fw_addr_list_del(void)
{
unsigned long flags;
struct pcibios_fwaddrmap *entry, *next;
@@ -118,6 +125,7 @@ static void pcibios_fw_addr_list_del(void)
kfree(entry);
}
spin_unlock_irqrestore(&pcibios_fwaddrmap_lock, flags);
+ pcibios_fw_addr_done = true;
}
static int
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 6/8] PCI, x86: Remove __init for hw/fw allocated functions
2012-11-04 4:39 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus Yinghai Lu
` (4 preceding siblings ...)
2012-11-04 4:39 ` [PATCH 5/8] PCI, x86: Add pcibios_fw_addr_done Yinghai Lu
@ 2012-11-04 4:39 ` Yinghai Lu
2012-11-04 4:39 ` [PATCH 7/8] PCI, x86: Claim FW allocated resources in hot add path Yinghai Lu
` (2 subsequent siblings)
8 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-11-04 4:39 UTC (permalink / raw)
To: Bjorn Helgaas, Rafael J. Wysocki, Len Brown, Taku Izumi,
Jiang Liu
Cc: linux-pci, linux-kernel, linux-acpi, Yinghai Lu, x86
will need it for hot add path.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: x86@kernel.org
---
arch/x86/pci/i386.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index edfc376..1806e91 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -201,7 +201,7 @@ EXPORT_SYMBOL(pcibios_align_resource);
* as well.
*/
-static void __init pcibios_allocate_bridge_resources(struct pci_dev *dev)
+static void pcibios_allocate_bridge_resources(struct pci_dev *dev)
{
int idx;
struct resource *r;
@@ -223,7 +223,7 @@ static void __init pcibios_allocate_bridge_resources(struct pci_dev *dev)
}
}
-static void __init pcibios_allocate_bus_resources(struct pci_bus *bus)
+static void pcibios_allocate_bus_resources(struct pci_bus *bus)
{
struct pci_bus *child;
@@ -239,7 +239,7 @@ struct pci_check_idx_range {
int end;
};
-static void __init pcibios_allocate_dev_resources(struct pci_dev *dev, int pass)
+static void pcibios_allocate_dev_resources(struct pci_dev *dev, int pass)
{
int idx, disabled, i;
u16 command;
@@ -292,7 +292,7 @@ static void __init pcibios_allocate_dev_resources(struct pci_dev *dev, int pass)
}
}
-static void __init pcibios_allocate_resources(struct pci_bus *bus, int pass)
+static void pcibios_allocate_resources(struct pci_bus *bus, int pass)
{
struct pci_dev *dev;
struct pci_bus *child;
@@ -306,7 +306,7 @@ static void __init pcibios_allocate_resources(struct pci_bus *bus, int pass)
}
}
-static void __init pcibios_allocate_dev_rom_resource(struct pci_dev *dev)
+static void pcibios_allocate_dev_rom_resource(struct pci_dev *dev)
{
struct resource *r;
@@ -324,7 +324,7 @@ static void __init pcibios_allocate_dev_rom_resource(struct pci_dev *dev)
r->start = 0;
}
}
-static void __init pcibios_allocate_rom_resources(struct pci_bus *bus)
+static void pcibios_allocate_rom_resources(struct pci_bus *bus)
{
struct pci_dev *dev;
struct pci_bus *child;
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 7/8] PCI, x86: Claim FW allocated resources in hot add path.
2012-11-04 4:39 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus Yinghai Lu
` (5 preceding siblings ...)
2012-11-04 4:39 ` [PATCH 6/8] PCI, x86: Remove __init for hw/fw allocated functions Yinghai Lu
@ 2012-11-04 4:39 ` Yinghai Lu
2012-11-04 4:39 ` [PATCH 8/8] PCI, ACPI: reserve fw allocated resource for hot added root bus Yinghai Lu
2012-12-07 7:15 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add " Yinghai Lu
8 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-11-04 4:39 UTC (permalink / raw)
To: Bjorn Helgaas, Rafael J. Wysocki, Len Brown, Taku Izumi,
Jiang Liu
Cc: linux-pci, linux-kernel, linux-acpi, Yinghai Lu, x86
During testing remove/rescan root bus 00, found
[ 338.142574] bus: 'pci': really_probe: probing driver ata_piix with device 0000:00:01.1
[ 338.146788] ata_piix 0000:00:01.1: device not available (can't reserve [io 0x01f0-0x01f7])
[ 338.150565] ata_piix: probe of 0000:00:01.1 failed with error -22
because that fixed resource is not claimed.
For bootint path it is claimed in from
arch/x86/pci/i386.c::pcibios_allocate_resources()
Claim those resources, so on the remove/rescan will still use old
resources.
It is some kind honoring FW setting in the registers during hot add.
esp root-bus hot add is through acpi, BIOS has chance to set some registers
before handing over.
-v2: add rom resource claiming.
-v3: separate __init removing to another patch, also
put pci_probe checking with caller from rom resource allocating
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: x86@kernel.org
---
arch/x86/pci/i386.c | 13 +++++++++++++
drivers/pci/bus.c | 2 ++
include/linux/pci.h | 1 +
3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 1806e91..e0b7f30 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -352,6 +352,19 @@ static int __init pcibios_assign_resources(void)
return 0;
}
+void pcibios_resource_survey_bus(struct pci_bus *bus)
+{
+ dev_printk(KERN_DEBUG, &bus->dev, "Allocating resources\n");
+
+ pcibios_allocate_bus_resources(bus);
+
+ pcibios_allocate_resources(bus, 0);
+ pcibios_allocate_resources(bus, 1);
+
+ if (!(pci_probe & PCI_ASSIGN_ROMS))
+ pcibios_allocate_rom_resources(bus);
+}
+
void __init pcibios_resource_survey(void)
{
struct pci_bus *bus;
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 6241fd0..a85247d 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -158,6 +158,8 @@ pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
return ret;
}
+void __weak pcibios_resource_survey_bus(struct pci_bus *bus) { }
+
/**
* pci_bus_add_device - add a single device
* @dev: device to add
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 7860942..f30af2f 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -654,6 +654,7 @@ extern struct list_head pci_root_buses; /* list of all known PCI buses */
/* Some device drivers need know if pci is initiated */
extern int no_pci_devices(void);
+void pcibios_resource_survey_bus(struct pci_bus *bus);
void pcibios_fixup_bus(struct pci_bus *);
int __must_check pcibios_enable_device(struct pci_dev *, int mask);
/* Architecture specific versions may override this (weak) */
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* [PATCH 8/8] PCI, ACPI: reserve fw allocated resource for hot added root bus
2012-11-04 4:39 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus Yinghai Lu
` (6 preceding siblings ...)
2012-11-04 4:39 ` [PATCH 7/8] PCI, x86: Claim FW allocated resources in hot add path Yinghai Lu
@ 2012-11-04 4:39 ` Yinghai Lu
2012-12-07 7:15 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add " Yinghai Lu
8 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-11-04 4:39 UTC (permalink / raw)
To: Bjorn Helgaas, Rafael J. Wysocki, Len Brown, Taku Izumi,
Jiang Liu
Cc: linux-pci, linux-kernel, linux-acpi, Yinghai Lu
FW could already allocate resource in pci bar registers, and we need to
reserve it before try to allocate another one.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/acpi/pci_root.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 012f40d..bc09567 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -644,8 +644,10 @@ static int acpi_pci_root_start(struct acpi_device *device)
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;
- if (system_state != SYSTEM_BOOTING)
+ if (system_state != SYSTEM_BOOTING) {
+ pcibios_resource_survey_bus(root->bus);
pci_assign_unassigned_bus_resources(root->bus);
+ }
mutex_lock(&acpi_pci_root_lock);
list_for_each_entry(driver, &acpi_pci_drivers, node)
--
1.7.7
^ permalink raw reply related [flat|nested] 95+ messages in thread* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2012-11-04 4:39 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus Yinghai Lu
` (7 preceding siblings ...)
2012-11-04 4:39 ` [PATCH 8/8] PCI, ACPI: reserve fw allocated resource for hot added root bus Yinghai Lu
@ 2012-12-07 7:15 ` Yinghai Lu
2013-01-07 23:49 ` Bjorn Helgaas
8 siblings, 1 reply; 95+ messages in thread
From: Yinghai Lu @ 2012-12-07 7:15 UTC (permalink / raw)
To: Bjorn Helgaas, Rafael J. Wysocki, Len Brown, Taku Izumi,
Jiang Liu
Cc: linux-pci, linux-kernel, linux-acpi, Yinghai Lu
On Sat, Nov 3, 2012 at 9:39 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> For root bus hot add, fw could assign some resource for the devices for
> that root bus before notifying os via acpi, we should check and use those
> resources at first just like we do for booting path.
>
> At first, we need to refactor x86 pci pcibios_allocate related functions
> for booting path to take bus as parameter.
>
> After that, we could use the survey function for hot add root bus.
>
> based on pci/yinghai-for-pci-root-bus-hotplug
>
> could get from
> git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-survey-resources
>
> Yinghai Lu (8):
> PCI, x86: Separate out pcibios_allocate_bridge_resources()
> PCI, x86: Separate out pcibios_allocate_dev_resources()
> PCI, x86: Let pcibios_allocate_bus_resources() take bus instead
> PCI, x86: Separate out rom resource claim
> PCI, x86: Add pcibios_fw_addr_done
> PCI, x86: Remove __init for hw/fw allocated functions
> PCI, x86: Claim FW allocated resources in hot add path.
> PCI, ACPI: reserve fw allocated resource for hot added root bus
>
> arch/x86/pci/i386.c | 185 +++++++++++++++++++++++++++++++----------------
> drivers/acpi/pci_root.c | 4 +-
> drivers/pci/bus.c | 2 +
> include/linux/pci.h | 1 +
> 4 files changed, 127 insertions(+), 65 deletions(-)
>
Bjorn,
Can you queue those 8 patches for v3.9 in pci tree?
So I could resend out other pci root hotplug patches.
Thanks
Yinghai
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2012-12-07 7:15 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add " Yinghai Lu
@ 2013-01-07 23:49 ` Bjorn Helgaas
2013-01-08 17:57 ` Bjorn Helgaas
0 siblings, 1 reply; 95+ messages in thread
From: Bjorn Helgaas @ 2013-01-07 23:49 UTC (permalink / raw)
To: Yinghai Lu
Cc: Rafael J. Wysocki, Len Brown, Taku Izumi, Jiang Liu, linux-pci,
linux-kernel, linux-acpi, David Howells, Michal Simek,
Koichi Yasutake, Benjamin Herrenschmidt, Paul Mackerras
[+cc David, Michal, Koichi, Ben, Paul]
On Fri, Dec 7, 2012 at 12:15 AM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Sat, Nov 3, 2012 at 9:39 PM, Yinghai Lu <yinghai@kernel.org> wrote:
>> For root bus hot add, fw could assign some resource for the devices for
>> that root bus before notifying os via acpi, we should check and use those
>> resources at first just like we do for booting path.
>>
>> At first, we need to refactor x86 pci pcibios_allocate related functions
>> for booting path to take bus as parameter.
>>
>> After that, we could use the survey function for hot add root bus.
>>
>> based on pci/yinghai-for-pci-root-bus-hotplug
>>
>> could get from
>> git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-survey-resources
>>
>> Yinghai Lu (8):
>> PCI, x86: Separate out pcibios_allocate_bridge_resources()
>> PCI, x86: Separate out pcibios_allocate_dev_resources()
>> PCI, x86: Let pcibios_allocate_bus_resources() take bus instead
>> PCI, x86: Separate out rom resource claim
>> PCI, x86: Add pcibios_fw_addr_done
>> PCI, x86: Remove __init for hw/fw allocated functions
>> PCI, x86: Claim FW allocated resources in hot add path.
>> PCI, ACPI: reserve fw allocated resource for hot added root bus
>>
>> arch/x86/pci/i386.c | 185 +++++++++++++++++++++++++++++++----------------
>> drivers/acpi/pci_root.c | 4 +-
>> drivers/pci/bus.c | 2 +
>> include/linux/pci.h | 1 +
>> 4 files changed, 127 insertions(+), 65 deletions(-)
>>
>
> Bjorn,
>
> Can you queue those 8 patches for v3.9 in pci tree?
>
> So I could resend out other pci root hotplug patches.
I'm really sorry that it's taken me so long to get to these.
I applied these to my pci/yinghai-survey-resources branch. I
re-ordered the last two and reworked some of the changelogs.
In general these look good. My main concern is that they only touch
x86, without touching the similar code in frv, microblaze, mn10300,
and powerpc.
This code (pcibios_resource_survey(), pcibios_assign_resources(),
pcibios_allocate_resources(), pcibios_allocate_bus_resources()) was
obviously copied from x86 originally, and I'd like to preserve the
similarity between them. It would be even better to refactor it so
it's actually *shared*, but I don't think that's a requirement right
now.
If we allow it to diverge now, it will make it harder to refactor and
harder to notice when bug fixes should be applied to all of them. For
example, looking at pcibios_allocate_resources(), commit 575939cf5
added some SR-IOV support to x86. Should similar code be added for
frv, microblaze, mn10300, and powerpc?
Anybody else have thoughts on this?
Bjorn
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-01-07 23:49 ` Bjorn Helgaas
@ 2013-01-08 17:57 ` Bjorn Helgaas
2013-01-08 18:27 ` Yinghai Lu
0 siblings, 1 reply; 95+ messages in thread
From: Bjorn Helgaas @ 2013-01-08 17:57 UTC (permalink / raw)
To: Yinghai Lu
Cc: Rafael J. Wysocki, Len Brown, Taku Izumi, Jiang Liu, linux-pci,
linux-kernel, linux-acpi, David Howells, Michal Simek,
Koichi Yasutake, Benjamin Herrenschmidt, Paul Mackerras
On Mon, Jan 7, 2013 at 4:49 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> [+cc David, Michal, Koichi, Ben, Paul]
>
> On Fri, Dec 7, 2012 at 12:15 AM, Yinghai Lu <yinghai@kernel.org> wrote:
>> On Sat, Nov 3, 2012 at 9:39 PM, Yinghai Lu <yinghai@kernel.org> wrote:
>>> For root bus hot add, fw could assign some resource for the devices for
>>> that root bus before notifying os via acpi, we should check and use those
>>> resources at first just like we do for booting path.
>>>
>>> At first, we need to refactor x86 pci pcibios_allocate related functions
>>> for booting path to take bus as parameter.
>>>
>>> After that, we could use the survey function for hot add root bus.
>>>
>>> based on pci/yinghai-for-pci-root-bus-hotplug
>>>
>>> could get from
>>> git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-survey-resources
>>>
>>> Yinghai Lu (8):
>>> PCI, x86: Separate out pcibios_allocate_bridge_resources()
>>> PCI, x86: Separate out pcibios_allocate_dev_resources()
>>> PCI, x86: Let pcibios_allocate_bus_resources() take bus instead
>>> PCI, x86: Separate out rom resource claim
>>> PCI, x86: Add pcibios_fw_addr_done
>>> PCI, x86: Remove __init for hw/fw allocated functions
>>> PCI, x86: Claim FW allocated resources in hot add path.
>>> PCI, ACPI: reserve fw allocated resource for hot added root bus
>>>
>>> arch/x86/pci/i386.c | 185 +++++++++++++++++++++++++++++++----------------
>>> drivers/acpi/pci_root.c | 4 +-
>>> drivers/pci/bus.c | 2 +
>>> include/linux/pci.h | 1 +
>>> 4 files changed, 127 insertions(+), 65 deletions(-)
>>>
>>
>> Bjorn,
>>
>> Can you queue those 8 patches for v3.9 in pci tree?
>>
>> So I could resend out other pci root hotplug patches.
>
> I'm really sorry that it's taken me so long to get to these.
>
> I applied these to my pci/yinghai-survey-resources branch. I
> re-ordered the last two and reworked some of the changelogs.
To be clear about this, the pci/yinghai-survey-resources branch I
mentioned is a staging branch that just gets build test coverage. I
don't plan to actually merge this or put it into -next until the
questions below are resolved.
My inclination, until I'm persuaded otherwise, is to wait for patches
that preserve the similarities among these architectures.
> In general these look good. My main concern is that they only touch
> x86, without touching the similar code in frv, microblaze, mn10300,
> and powerpc.
>
> This code (pcibios_resource_survey(), pcibios_assign_resources(),
> pcibios_allocate_resources(), pcibios_allocate_bus_resources()) was
> obviously copied from x86 originally, and I'd like to preserve the
> similarity between them. It would be even better to refactor it so
> it's actually *shared*, but I don't think that's a requirement right
> now.
>
> If we allow it to diverge now, it will make it harder to refactor and
> harder to notice when bug fixes should be applied to all of them. For
> example, looking at pcibios_allocate_resources(), commit 575939cf5
> added some SR-IOV support to x86. Should similar code be added for
> frv, microblaze, mn10300, and powerpc?
>
> Anybody else have thoughts on this?
>
> Bjorn
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-01-08 17:57 ` Bjorn Helgaas
@ 2013-01-08 18:27 ` Yinghai Lu
2013-01-09 17:35 ` Bjorn Helgaas
0 siblings, 1 reply; 95+ messages in thread
From: Yinghai Lu @ 2013-01-08 18:27 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Rafael J. Wysocki, Len Brown, Taku Izumi, Jiang Liu, linux-pci,
linux-kernel, linux-acpi, David Howells, Michal Simek,
Koichi Yasutake, Benjamin Herrenschmidt, Paul Mackerras
On Tue, Jan 8, 2013 at 9:57 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> I'm really sorry that it's taken me so long to get to these.
>>
>> I applied these to my pci/yinghai-survey-resources branch. I
>> re-ordered the last two and reworked some of the changelogs.
>
> To be clear about this, the pci/yinghai-survey-resources branch I
> mentioned is a staging branch that just gets build test coverage. I
> don't plan to actually merge this or put it into -next until the
> questions below are resolved.
>
> My inclination, until I'm persuaded otherwise, is to wait for patches
> that preserve the similarities among these architectures.
I don't know, that could be separated patcheset after we conclude
pci root bus hotplug support.
>
>> In general these look good. My main concern is that they only touch
>> x86, without touching the similar code in frv, microblaze, mn10300,
>> and powerpc.
>>
>> This code (pcibios_resource_survey(), pcibios_assign_resources(),
>> pcibios_allocate_resources(), pcibios_allocate_bus_resources()) was
>> obviously copied from x86 originally, and I'd like to preserve the
>> similarity between them. It would be even better to refactor it so
>> it's actually *shared*, but I don't think that's a requirement right
>> now.
yes, should be moved to drivers/pci
>>
>> If we allow it to diverge now, it will make it harder to refactor and
>> harder to notice when bug fixes should be applied to all of them. For
>> example, looking at pcibios_allocate_resources(), commit 575939cf5
>> added some SR-IOV support to x86. Should similar code be added for
>> frv, microblaze, mn10300, and powerpc?
should be treated the same.
>>
>> Anybody else have thoughts on this?
>>
>> Bjorn
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-01-08 18:27 ` Yinghai Lu
@ 2013-01-09 17:35 ` Bjorn Helgaas
2013-01-09 17:53 ` Yinghai Lu
0 siblings, 1 reply; 95+ messages in thread
From: Bjorn Helgaas @ 2013-01-09 17:35 UTC (permalink / raw)
To: Yinghai Lu
Cc: Rafael J. Wysocki, Len Brown, Taku Izumi, Jiang Liu, linux-pci,
linux-kernel, linux-acpi, David Howells, Michal Simek,
Koichi Yasutake, Benjamin Herrenschmidt, Paul Mackerras
On Tue, Jan 8, 2013 at 11:27 AM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Tue, Jan 8, 2013 at 9:57 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>>> I'm really sorry that it's taken me so long to get to these.
>>>
>>> I applied these to my pci/yinghai-survey-resources branch. I
>>> re-ordered the last two and reworked some of the changelogs.
>>
>> To be clear about this, the pci/yinghai-survey-resources branch I
>> mentioned is a staging branch that just gets build test coverage. I
>> don't plan to actually merge this or put it into -next until the
>> questions below are resolved.
>>
>> My inclination, until I'm persuaded otherwise, is to wait for patches
>> that preserve the similarities among these architectures.
>
> I don't know, that could be separated patcheset after we conclude
> pci root bus hotplug support.
The main reason I review patches before merging them is to identify
issues that we can fix before they affect everybody. It makes my life
a lot easier if I don't have to keep track of pending unaddressed
review comments. Is there an advantage to waiting and doing this work
later?
>>> In general these look good. My main concern is that they only touch
>>> x86, without touching the similar code in frv, microblaze, mn10300,
>>> and powerpc.
>>>
>>> This code (pcibios_resource_survey(), pcibios_assign_resources(),
>>> pcibios_allocate_resources(), pcibios_allocate_bus_resources()) was
>>> obviously copied from x86 originally, and I'd like to preserve the
>>> similarity between them. It would be even better to refactor it so
>>> it's actually *shared*, but I don't think that's a requirement right
>>> now.
>
> yes, should be moved to drivers/pci
>
>>>
>>> If we allow it to diverge now, it will make it harder to refactor and
>>> harder to notice when bug fixes should be applied to all of them. For
>>> example, looking at pcibios_allocate_resources(), commit 575939cf5
>>> added some SR-IOV support to x86. Should similar code be added for
>>> frv, microblaze, mn10300, and powerpc?
>
> should be treated the same.
>
>>>
>>> Anybody else have thoughts on this?
>>>
>>> Bjorn
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-01-09 17:35 ` Bjorn Helgaas
@ 2013-01-09 17:53 ` Yinghai Lu
2013-01-09 18:39 ` Bjorn Helgaas
0 siblings, 1 reply; 95+ messages in thread
From: Yinghai Lu @ 2013-01-09 17:53 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Rafael J. Wysocki, Len Brown, Taku Izumi, Jiang Liu, linux-pci,
linux-kernel, linux-acpi, David Howells, Michal Simek,
Koichi Yasutake, Benjamin Herrenschmidt, Paul Mackerras
On Wed, Jan 9, 2013 at 9:35 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> I don't know, that could be separated patcheset after we conclude
>> pci root bus hotplug support.
>
> The main reason I review patches before merging them is to identify
> issues that we can fix before they affect everybody. It makes my life
> a lot easier if I don't have to keep track of pending unaddressed
> review comments. Is there an advantage to waiting and doing this work
> later?
>
>>>> In general these look good. My main concern is that they only touch
>>>> x86, without touching the similar code in frv, microblaze, mn10300,
>>>> and powerpc.
the reason why we need to change those codes for x86, we want to make it support
pci root bus hotplug. So it would be reasonable for us to align other
platform to x86
changes after pci root bus hotplug change is completely done.
Also I have for_dev_each_res patches rely on this patchset.
After those done, we can move the code from x86 to drivers/pci and delete
other arches code one by one.
Yinghai
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-01-09 17:53 ` Yinghai Lu
@ 2013-01-09 18:39 ` Bjorn Helgaas
2013-01-09 19:01 ` Yinghai Lu
` (2 more replies)
0 siblings, 3 replies; 95+ messages in thread
From: Bjorn Helgaas @ 2013-01-09 18:39 UTC (permalink / raw)
To: Yinghai Lu
Cc: Rafael J. Wysocki, Len Brown, Taku Izumi, Jiang Liu, linux-pci,
linux-kernel, linux-acpi, David Howells, Michal Simek,
Koichi Yasutake, Benjamin Herrenschmidt, Paul Mackerras
On Wed, Jan 9, 2013 at 10:53 AM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Wed, Jan 9, 2013 at 9:35 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>>> I don't know, that could be separated patcheset after we conclude
>>> pci root bus hotplug support.
>>
>> The main reason I review patches before merging them is to identify
>> issues that we can fix before they affect everybody. It makes my life
>> a lot easier if I don't have to keep track of pending unaddressed
>> review comments. Is there an advantage to waiting and doing this work
>> later?
>>
>>>>> In general these look good. My main concern is that they only touch
>>>>> x86, without touching the similar code in frv, microblaze, mn10300,
>>>>> and powerpc.
>
> the reason why we need to change those codes for x86, we want to make it support
> pci root bus hotplug. So it would be reasonable for us to align other
> platform to x86
> changes after pci root bus hotplug change is completely done.
OK, I opened https://bugzilla.kernel.org/show_bug.cgi?id=52531 as a
way to keep track of this consistency issue and merged
pci/yinghai-survey-resources to my -next branch.
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-01-09 18:39 ` Bjorn Helgaas
@ 2013-01-09 19:01 ` Yinghai Lu
2013-01-09 20:10 ` Rafael J. Wysocki
2013-01-09 20:59 ` Benjamin Herrenschmidt
2013-07-02 21:31 ` Bjorn Helgaas
2 siblings, 1 reply; 95+ messages in thread
From: Yinghai Lu @ 2013-01-09 19:01 UTC (permalink / raw)
To: Bjorn Helgaas, Rafael J. Wysocki
Cc: Len Brown, Taku Izumi, Jiang Liu, linux-pci, linux-kernel,
linux-acpi, David Howells, Michal Simek, Koichi Yasutake,
Benjamin Herrenschmidt, Paul Mackerras
On Wed, Jan 9, 2013 at 10:39 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> the reason why we need to change those codes for x86, we want to make it support
>> pci root bus hotplug. So it would be reasonable for us to align other
>> platform to x86
>> changes after pci root bus hotplug change is completely done.
>
> OK, I opened https://bugzilla.kernel.org/show_bug.cgi?id=52531 as a
> way to keep track of this consistency issue and merged
> pci/yinghai-survey-resources to my -next branch.
Thanks a lot. will send other pci root bus hotplug out.
question: now Rafael's tree has acpi-scan branch and it touches pci-root.c.
so is it ok for me to base patches on your pci/next and his pm/acpi-scan?
how?
can you two have some arrangement like you pulling Rafael's branch?
Thanks
Yinghai
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-01-09 19:01 ` Yinghai Lu
@ 2013-01-09 20:10 ` Rafael J. Wysocki
2013-01-10 0:34 ` Bjorn Helgaas
0 siblings, 1 reply; 95+ messages in thread
From: Rafael J. Wysocki @ 2013-01-09 20:10 UTC (permalink / raw)
To: Yinghai Lu
Cc: Bjorn Helgaas, Len Brown, Taku Izumi, Jiang Liu, linux-pci,
linux-kernel, linux-acpi, David Howells, Michal Simek,
Koichi Yasutake, Benjamin Herrenschmidt, Paul Mackerras
On Wednesday, January 09, 2013 11:01:39 AM Yinghai Lu wrote:
> On Wed, Jan 9, 2013 at 10:39 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> >> the reason why we need to change those codes for x86, we want to make it support
> >> pci root bus hotplug. So it would be reasonable for us to align other
> >> platform to x86
> >> changes after pci root bus hotplug change is completely done.
> >
> > OK, I opened https://bugzilla.kernel.org/show_bug.cgi?id=52531 as a
> > way to keep track of this consistency issue and merged
> > pci/yinghai-survey-resources to my -next branch.
>
> Thanks a lot. will send other pci root bus hotplug out.
>
> question: now Rafael's tree has acpi-scan branch and it touches pci-root.c.
>
> so is it ok for me to base patches on your pci/next and his pm/acpi-scan?
> how?
> can you two have some arrangement like you pulling Rafael's branch?
My acpi-scan branch is not going to be rebased going forward, so it can be
pulled from safely if that helps.
Thanks,
Rafael
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-01-09 20:10 ` Rafael J. Wysocki
@ 2013-01-10 0:34 ` Bjorn Helgaas
2013-01-10 13:07 ` Rafael J. Wysocki
0 siblings, 1 reply; 95+ messages in thread
From: Bjorn Helgaas @ 2013-01-10 0:34 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Yinghai Lu, Len Brown, Taku Izumi, Jiang Liu, linux-pci,
linux-kernel, linux-acpi, David Howells, Michal Simek,
Koichi Yasutake, Benjamin Herrenschmidt, Paul Mackerras
On Wed, Jan 9, 2013 at 1:10 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Wednesday, January 09, 2013 11:01:39 AM Yinghai Lu wrote:
>> On Wed, Jan 9, 2013 at 10:39 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> >> the reason why we need to change those codes for x86, we want to make it support
>> >> pci root bus hotplug. So it would be reasonable for us to align other
>> >> platform to x86
>> >> changes after pci root bus hotplug change is completely done.
>> >
>> > OK, I opened https://bugzilla.kernel.org/show_bug.cgi?id=52531 as a
>> > way to keep track of this consistency issue and merged
>> > pci/yinghai-survey-resources to my -next branch.
>>
>> Thanks a lot. will send other pci root bus hotplug out.
>>
>> question: now Rafael's tree has acpi-scan branch and it touches pci-root.c.
>>
>> so is it ok for me to base patches on your pci/next and his pm/acpi-scan?
>> how?
>> can you two have some arrangement like you pulling Rafael's branch?
>
> My acpi-scan branch is not going to be rebased going forward, so it can be
> pulled from safely if that helps.
I'm happy to do that, but it is outside the scope of my limited git
experience. My guess is that I should do this (doing the pull into a
branch which I later merge into my -next branch):
$ git checkout -b pci/yinghai-survey-resources+acpi-scan
pci/yinghai-survey-resources
$ git pull --no-ff --log
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
acpi-scan
$ vi drivers/acpi/pci_root.c # resolve conflicts
$ git add drivers/acpi/pci_root.c
$ git commit
$ git checkout next
$ git merge --no-ff --log pci/yinghai-survey-resources+acpi-scan
Is that reasonable? This won't cause issues when both Rafael and I
ask Linus to pull from our trees later?
Bjorn
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-01-10 0:34 ` Bjorn Helgaas
@ 2013-01-10 13:07 ` Rafael J. Wysocki
2013-01-10 14:49 ` Bjorn Helgaas
0 siblings, 1 reply; 95+ messages in thread
From: Rafael J. Wysocki @ 2013-01-10 13:07 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Yinghai Lu, Len Brown, Taku Izumi, Jiang Liu, linux-pci,
linux-kernel, linux-acpi, David Howells, Michal Simek,
Koichi Yasutake, Benjamin Herrenschmidt, Paul Mackerras
On Wednesday, January 09, 2013 05:34:32 PM Bjorn Helgaas wrote:
> On Wed, Jan 9, 2013 at 1:10 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > On Wednesday, January 09, 2013 11:01:39 AM Yinghai Lu wrote:
> >> On Wed, Jan 9, 2013 at 10:39 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> >> >> the reason why we need to change those codes for x86, we want to make it support
> >> >> pci root bus hotplug. So it would be reasonable for us to align other
> >> >> platform to x86
> >> >> changes after pci root bus hotplug change is completely done.
> >> >
> >> > OK, I opened https://bugzilla.kernel.org/show_bug.cgi?id=52531 as a
> >> > way to keep track of this consistency issue and merged
> >> > pci/yinghai-survey-resources to my -next branch.
> >>
> >> Thanks a lot. will send other pci root bus hotplug out.
> >>
> >> question: now Rafael's tree has acpi-scan branch and it touches pci-root.c.
> >>
> >> so is it ok for me to base patches on your pci/next and his pm/acpi-scan?
> >> how?
> >> can you two have some arrangement like you pulling Rafael's branch?
> >
> > My acpi-scan branch is not going to be rebased going forward, so it can be
> > pulled from safely if that helps.
>
> I'm happy to do that, but it is outside the scope of my limited git
> experience. My guess is that I should do this (doing the pull into a
> branch which I later merge into my -next branch):
>
> $ git checkout -b pci/yinghai-survey-resources+acpi-scan
> pci/yinghai-survey-resources
> $ git pull --no-ff --log
> git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
> acpi-scan
> $ vi drivers/acpi/pci_root.c # resolve conflicts
> $ git add drivers/acpi/pci_root.c
> $ git commit
>
> $ git checkout next
> $ git merge --no-ff --log pci/yinghai-survey-resources+acpi-scan
>
> Is that reasonable?
Yes, it looks reasonable.
> This won't cause issues when both Rafael and I ask Linus to pull from our
> trees later?
No, it won't, as long as I don't rebase the original acpi-scan branch (which
I'm not going to do) and you don't rebase your
pci/yinghai-survey-resources+acpi-scan branch going forward.
The pull makes your tree contain the same commits (i.e. commit IDs along with
the data) that are in my acpi-scan branch, so when Linus merges them together,
git will notice that the commits are the same.
Thanks,
Rafael
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-01-10 13:07 ` Rafael J. Wysocki
@ 2013-01-10 14:49 ` Bjorn Helgaas
0 siblings, 0 replies; 95+ messages in thread
From: Bjorn Helgaas @ 2013-01-10 14:49 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Yinghai Lu, Len Brown, Taku Izumi, Jiang Liu, linux-pci,
linux-kernel, linux-acpi, David Howells, Michal Simek,
Koichi Yasutake, Benjamin Herrenschmidt, Paul Mackerras
On Thu, Jan 10, 2013 at 6:07 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Wednesday, January 09, 2013 05:34:32 PM Bjorn Helgaas wrote:
>> On Wed, Jan 9, 2013 at 1:10 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
>> > On Wednesday, January 09, 2013 11:01:39 AM Yinghai Lu wrote:
>> >> On Wed, Jan 9, 2013 at 10:39 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> >> >> the reason why we need to change those codes for x86, we want to make it support
>> >> >> pci root bus hotplug. So it would be reasonable for us to align other
>> >> >> platform to x86
>> >> >> changes after pci root bus hotplug change is completely done.
>> >> >
>> >> > OK, I opened https://bugzilla.kernel.org/show_bug.cgi?id=52531 as a
>> >> > way to keep track of this consistency issue and merged
>> >> > pci/yinghai-survey-resources to my -next branch.
>> >>
>> >> Thanks a lot. will send other pci root bus hotplug out.
>> >>
>> >> question: now Rafael's tree has acpi-scan branch and it touches pci-root.c.
>> >>
>> >> so is it ok for me to base patches on your pci/next and his pm/acpi-scan?
>> >> how?
>> >> can you two have some arrangement like you pulling Rafael's branch?
>> >
>> > My acpi-scan branch is not going to be rebased going forward, so it can be
>> > pulled from safely if that helps.
>>
>> I'm happy to do that, but it is outside the scope of my limited git
>> experience. My guess is that I should do this (doing the pull into a
>> branch which I later merge into my -next branch):
>>
>> $ git checkout -b pci/yinghai-survey-resources+acpi-scan
>> pci/yinghai-survey-resources
>> $ git pull --no-ff --log
>> git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
>> acpi-scan
>> $ vi drivers/acpi/pci_root.c # resolve conflicts
>> $ git add drivers/acpi/pci_root.c
>> $ git commit
>>
>> $ git checkout next
>> $ git merge --no-ff --log pci/yinghai-survey-resources+acpi-scan
>>
>> Is that reasonable?
>
> Yes, it looks reasonable.
>
>> This won't cause issues when both Rafael and I ask Linus to pull from our
>> trees later?
>
> No, it won't, as long as I don't rebase the original acpi-scan branch (which
> I'm not going to do) and you don't rebase your
> pci/yinghai-survey-resources+acpi-scan branch going forward.
>
> The pull makes your tree contain the same commits (i.e. commit IDs along with
> the data) that are in my acpi-scan branch, so when Linus merges them together,
> git will notice that the commits are the same.
OK, I did the above, merged it into my -next branch, and pushed it.
Let me know if you see any issues.
Bjorn
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-01-09 18:39 ` Bjorn Helgaas
2013-01-09 19:01 ` Yinghai Lu
@ 2013-01-09 20:59 ` Benjamin Herrenschmidt
2013-07-02 21:31 ` Bjorn Helgaas
2 siblings, 0 replies; 95+ messages in thread
From: Benjamin Herrenschmidt @ 2013-01-09 20:59 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Yinghai Lu, Rafael J. Wysocki, Len Brown, Taku Izumi, Jiang Liu,
linux-pci, linux-kernel, linux-acpi, David Howells, Michal Simek,
Koichi Yasutake, Paul Mackerras
On Wed, 2013-01-09 at 11:39 -0700, Bjorn Helgaas wrote:
>
> > the reason why we need to change those codes for x86, we want to
> make it support
> > pci root bus hotplug. So it would be reasonable for us to align
> other
> > platform to x86
> > changes after pci root bus hotplug change is completely done.
>
> OK, I opened https://bugzilla.kernel.org/show_bug.cgi?id=52531 as a
> way to keep track of this consistency issue and merged
> pci/yinghai-survey-resources to my -next branch.
Hrm... that's going to be tricky. For example the SR-IOV stuff will not
work for us, we are working on a different implementation, due to some
of "interesting" bridge constraints etc...
It would be nice to get more of the resource survey in common, our
original code was actually completely different and I reconciled it a
lot with x86 in the past few years, but I'm sure we can do better.
However there are still going to be corner cases....
Ben.
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-01-09 18:39 ` Bjorn Helgaas
2013-01-09 19:01 ` Yinghai Lu
2013-01-09 20:59 ` Benjamin Herrenschmidt
@ 2013-07-02 21:31 ` Bjorn Helgaas
2013-07-02 22:55 ` Yinghai Lu
2 siblings, 1 reply; 95+ messages in thread
From: Bjorn Helgaas @ 2013-07-02 21:31 UTC (permalink / raw)
To: Yinghai Lu
Cc: Rafael J. Wysocki, Len Brown, Taku Izumi, Jiang Liu,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org
On Wed, Jan 9, 2013 at 11:39 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Wed, Jan 9, 2013 at 10:53 AM, Yinghai Lu <yinghai@kernel.org> wrote:
>> the reason why we need to change those codes for x86, we want to make it support
>> pci root bus hotplug. So it would be reasonable for us to align other
>> platform to x86
>> changes after pci root bus hotplug change is completely done.
>
> OK, I opened https://bugzilla.kernel.org/show_bug.cgi?id=52531 as a
> way to keep track of this consistency issue ...
What's your plan for this? We desperately need more cross-arch
consistency in how we manage resources, and I'd like to make some
progress in this cycle.
Bjorn
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus
2013-07-02 21:31 ` Bjorn Helgaas
@ 2013-07-02 22:55 ` Yinghai Lu
0 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2013-07-02 22:55 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Rafael J. Wysocki, Len Brown, Taku Izumi, Jiang Liu,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 955 bytes --]
On Tue, Jul 2, 2013 at 2:31 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Wed, Jan 9, 2013 at 11:39 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Wed, Jan 9, 2013 at 10:53 AM, Yinghai Lu <yinghai@kernel.org> wrote:
>
>>> the reason why we need to change those codes for x86, we want to make it support
>>> pci root bus hotplug. So it would be reasonable for us to align other
>>> platform to x86
>>> changes after pci root bus hotplug change is completely done.
>>
>> OK, I opened https://bugzilla.kernel.org/show_bug.cgi?id=52531 as a
>> way to keep track of this consistency issue ...
>
> What's your plan for this? We desperately need more cross-arch
> consistency in how we manage resources, and I'd like to make some
> progress in this cycle.
Ok, will work on that.
but will on top of
[PATCH v5 0/7] PCI: Change assign unassigned resources per root bus bassis
and attached.
will resend them after v3.11-rc1 is out.
Thanks
Yinghai
[-- Attachment #2: root_bus_ioport_skip_2_a.patch --]
[-- Type: application/octet-stream, Size: 1298 bytes --]
Subject: [PATCH] PCI: check pci bus address for unassigned res
We should compare res->start with root bus window offset.
Otherwise will have problem with arch that support hostbridge
resource offset.
BenH pointed out that during reviewing patchset that separate
assign unassigned to per root buses.
According to Bjorn, have it in separated patch.
Use pcibios_resource_to_bus to get region at first, and check
region.start instead.
Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/setup-bus.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: linux-2.6/drivers/pci/setup-bus.c
===================================================================
--- linux-2.6.orig/drivers/pci/setup-bus.c
+++ linux-2.6/drivers/pci/setup-bus.c
@@ -1420,9 +1420,14 @@ static int check_unassigned_resources(st
for (i = PCI_IOV_RESOURCES; i <= PCI_IOV_RESOURCE_END; i++) {
struct resource *r = &dev->resource[i];
+ struct pci_bus_region region;
/* Not assigned, or rejected by kernel ? */
- if (r->flags && !r->start) {
+ if (!r->flags)
+ continue;
+
+ pcibios_resource_to_bus(dev, ®ion, r);
+ if (!region.start) {
(*unassigned)++;
return 1; /* return early from pci_walk_bus */
}
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge
2012-09-18 6:12 [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Taku Izumi
` (6 preceding siblings ...)
2012-09-18 6:25 ` [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function Taku Izumi
@ 2012-09-18 6:26 ` Taku Izumi
2012-09-20 5:41 ` Yinghai Lu
2012-09-18 18:41 ` [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Yinghai Lu
8 siblings, 1 reply; 95+ messages in thread
From: Taku Izumi @ 2012-09-18 6:26 UTC (permalink / raw)
To: linux-pci, bhelgaas; +Cc: linux-acpi, kaneshige.kenji, yinghai, jiang.liu
Devices under hot-added hostbridge have no chance to assign resources
and to configure them, so this patch adds such code for hot-added
hostbridges at acpi_pci_root_start().
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
drivers/acpi/pci_root.c | 17 +++++++++++++++++
include/acpi/acpi_bus.h | 1 +
2 files changed, 18 insertions(+)
Index: Bjorn-next-0903/drivers/acpi/pci_root.c
===================================================================
--- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
+++ Bjorn-next-0903/drivers/acpi/pci_root.c
@@ -38,6 +38,7 @@
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
#include <acpi/apei.h>
+#include <linux/pci_hotplug.h>
#define PREFIX "ACPI: "
@@ -459,6 +460,9 @@ static int __devinit acpi_pci_root_add(s
if (!root)
return -ENOMEM;
+ if (system_state != SYSTEM_BOOTING)
+ root->hot_added = true;
+
segment = 0;
status = acpi_evaluate_integer(device->handle, METHOD_NAME__SEG, NULL,
&segment);
@@ -636,6 +640,7 @@ static int acpi_pci_root_start(struct ac
{
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;
+ struct pci_dev *pdev;
mutex_lock(&acpi_pci_root_lock);
list_for_each_entry(driver, &acpi_pci_drivers, node)
@@ -643,6 +648,18 @@ static int acpi_pci_root_start(struct ac
driver->add(root);
mutex_unlock(&acpi_pci_root_lock);
+ /*
+ * Devices under hot-added hostbridge have no chance to assign
+ * resources and to configure them, so do that here
+ */
+ if (root->hot_added) {
+ pci_bus_size_bridges(root->bus);
+ pci_bus_assign_resources(root->bus);
+ list_for_each_entry(pdev, &root->bus->devices, bus_list)
+ pci_configure_slot(pdev);
+ pci_enable_bridges(root->bus);
+ }
+
pci_bus_add_devices(root->bus);
return 0;
Index: Bjorn-next-0903/include/acpi/acpi_bus.h
===================================================================
--- Bjorn-next-0903.orig/include/acpi/acpi_bus.h
+++ Bjorn-next-0903/include/acpi/acpi_bus.h
@@ -407,6 +407,7 @@ struct acpi_pci_root {
u32 osc_support_set; /* _OSC state of support bits */
u32 osc_control_set; /* _OSC state of control bits */
phys_addr_t mcfg_addr;
+ bool hot_added;
};
/* helper */
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge
2012-09-18 6:26 ` [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge Taku Izumi
@ 2012-09-20 5:41 ` Yinghai Lu
2012-09-23 22:48 ` Yinghai Lu
0 siblings, 1 reply; 95+ messages in thread
From: Yinghai Lu @ 2012-09-20 5:41 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, bhelgaas, linux-acpi, kaneshige.kenji, jiang.liu
On Mon, Sep 17, 2012 at 11:26 PM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>
> Devices under hot-added hostbridge have no chance to assign resources
> and to configure them, so this patch adds such code for hot-added
> hostbridges at acpi_pci_root_start().
>
> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
> ---
> drivers/acpi/pci_root.c | 17 +++++++++++++++++
> include/acpi/acpi_bus.h | 1 +
> 2 files changed, 18 insertions(+)
>
> Index: Bjorn-next-0903/drivers/acpi/pci_root.c
> ===================================================================
> --- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
> +++ Bjorn-next-0903/drivers/acpi/pci_root.c
> @@ -38,6 +38,7 @@
> #include <acpi/acpi_bus.h>
> #include <acpi/acpi_drivers.h>
> #include <acpi/apei.h>
> +#include <linux/pci_hotplug.h>
>
> #define PREFIX "ACPI: "
>
> @@ -459,6 +460,9 @@ static int __devinit acpi_pci_root_add(s
> if (!root)
> return -ENOMEM;
>
> + if (system_state != SYSTEM_BOOTING)
> + root->hot_added = true;
> +
should be moved down just before return.
> segment = 0;
> status = acpi_evaluate_integer(device->handle, METHOD_NAME__SEG, NULL,
> &segment);
> @@ -636,6 +640,7 @@ static int acpi_pci_root_start(struct ac
> {
> struct acpi_pci_root *root = acpi_driver_data(device);
> struct acpi_pci_driver *driver;
> + struct pci_dev *pdev;
>
> mutex_lock(&acpi_pci_root_lock);
> list_for_each_entry(driver, &acpi_pci_drivers, node)
> @@ -643,6 +648,18 @@ static int acpi_pci_root_start(struct ac
> driver->add(root);
> mutex_unlock(&acpi_pci_root_lock);
>
> + /*
> + * Devices under hot-added hostbridge have no chance to assign
> + * resources and to configure them, so do that here
> + */
> + if (root->hot_added) {
> + pci_bus_size_bridges(root->bus);
> + pci_bus_assign_resources(root->bus);
> + list_for_each_entry(pdev, &root->bus->devices, bus_list)
> + pci_configure_slot(pdev);
> + pci_enable_bridges(root->bus);
> + }
should move that before acpi_pci_drivers.add calling
> +
> pci_bus_add_devices(root->bus);
>
> return 0;
> Index: Bjorn-next-0903/include/acpi/acpi_bus.h
> ===================================================================
> --- Bjorn-next-0903.orig/include/acpi/acpi_bus.h
> +++ Bjorn-next-0903/include/acpi/acpi_bus.h
> @@ -407,6 +407,7 @@ struct acpi_pci_root {
> u32 osc_support_set; /* _OSC state of support bits */
> u32 osc_control_set; /* _OSC state of control bits */
> phys_addr_t mcfg_addr;
> + bool hot_added;
> };
>
> /* helper */
>
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge
2012-09-20 5:41 ` Yinghai Lu
@ 2012-09-23 22:48 ` Yinghai Lu
2012-09-28 9:48 ` Taku Izumi
0 siblings, 1 reply; 95+ messages in thread
From: Yinghai Lu @ 2012-09-23 22:48 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, bhelgaas, linux-acpi, kaneshige.kenji, jiang.liu
On Wed, Sep 19, 2012 at 10:41 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Mon, Sep 17, 2012 at 11:26 PM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>>
>> Devices under hot-added hostbridge have no chance to assign resources
>> and to configure them, so this patch adds such code for hot-added
>> hostbridges at acpi_pci_root_start().
>>
>> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
>> ---
>> drivers/acpi/pci_root.c | 17 +++++++++++++++++
>> include/acpi/acpi_bus.h | 1 +
>> 2 files changed, 18 insertions(+)
>>
>> Index: Bjorn-next-0903/drivers/acpi/pci_root.c
>> ===================================================================
>> --- Bjorn-next-0903.orig/drivers/acpi/pci_root.c
>> +++ Bjorn-next-0903/drivers/acpi/pci_root.c
>> @@ -38,6 +38,7 @@
>> #include <acpi/acpi_bus.h>
>> #include <acpi/acpi_drivers.h>
>> #include <acpi/apei.h>
>> +#include <linux/pci_hotplug.h>
>>
>> #define PREFIX "ACPI: "
>>
>> @@ -636,6 +640,7 @@ static int acpi_pci_root_start(struct ac
>> {
>> struct acpi_pci_root *root = acpi_driver_data(device);
>> struct acpi_pci_driver *driver;
>> + struct pci_dev *pdev;
>>
>> mutex_lock(&acpi_pci_root_lock);
>> list_for_each_entry(driver, &acpi_pci_drivers, node)
>> @@ -643,6 +648,18 @@ static int acpi_pci_root_start(struct ac
>> driver->add(root);
>> mutex_unlock(&acpi_pci_root_lock);
>>
>> + /*
>> + * Devices under hot-added hostbridge have no chance to assign
>> + * resources and to configure them, so do that here
>> + */
>> + if (root->hot_added) {
>> + pci_bus_size_bridges(root->bus);
>> + pci_bus_assign_resources(root->bus);
>> + list_for_each_entry(pdev, &root->bus->devices, bus_list)
>> + pci_configure_slot(pdev);
one more problem, this one will have problem when CONFIG_HOTPLUG_PCI=m
or not defined.
Also I do not see the point to call pci_config_slot here - my
patcheset did not do that, So how do you figure that out?
or you just need to have mpss set?
Bjorn, You may need to have a patch that will enable
CONFIG_HOTPLUG_PCI just Greg's enabling CONIFG_HOTPLUG forcely.
Yinghai
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge
2012-09-23 22:48 ` Yinghai Lu
@ 2012-09-28 9:48 ` Taku Izumi
0 siblings, 0 replies; 95+ messages in thread
From: Taku Izumi @ 2012-09-28 9:48 UTC (permalink / raw)
To: linux-pci; +Cc: bhelgaas, linux-acpi, kaneshige.kenji, jiang.liu, Yinghai Lu
Devices under hot-added hostbridge have no chance to assign resources
and to configure them, so this patch adds such code for hot-added
hostbridges at acpi_pci_root_start().
diff: updated according to Yinhai's comment
disconnect dependency on CONFIG_HOTPLUG
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
drivers/acpi/pci_root.c | 13 +++++++++++++
include/acpi/acpi_bus.h | 1 +
2 files changed, 14 insertions(+)
Index: Bjorn-next-0925/drivers/acpi/pci_root.c
===================================================================
--- Bjorn-next-0925.orig/drivers/acpi/pci_root.c
+++ Bjorn-next-0925/drivers/acpi/pci_root.c
@@ -628,6 +628,9 @@ static int __devinit acpi_pci_root_add(s
if (device->wakeup.flags.run_wake)
device_set_run_wake(root->bus->bridge, true);
+ if (system_state != SYSTEM_BOOTING)
+ root->hot_added = true;
+
return 0;
out_del_root:
@@ -644,6 +647,16 @@ static int acpi_pci_root_start(struct ac
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;
+ /*
+ * Devices under hot-added hostbridge have no chance to assign
+ * resources and to configure them, so do that here
+ */
+ if (root->hot_added) {
+ pci_bus_size_bridges(root->bus);
+ pci_bus_assign_resources(root->bus);
+ pci_enable_bridges(root->bus);
+ }
+
mutex_lock(&acpi_pci_root_lock);
list_for_each_entry(driver, &acpi_pci_drivers, node)
if (driver->add)
Index: Bjorn-next-0925/include/acpi/acpi_bus.h
===================================================================
--- Bjorn-next-0925.orig/include/acpi/acpi_bus.h
+++ Bjorn-next-0925/include/acpi/acpi_bus.h
@@ -407,6 +407,7 @@ struct acpi_pci_root {
u32 osc_support_set; /* _OSC state of support bits */
u32 osc_control_set; /* _OSC state of control bits */
phys_addr_t mcfg_addr;
+ bool hot_added;
};
/* helper */
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH v3 0/6] acpi,pci: hostbridge hotplug support
2012-09-18 6:12 [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Taku Izumi
` (7 preceding siblings ...)
2012-09-18 6:26 ` [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge Taku Izumi
@ 2012-09-18 18:41 ` Yinghai Lu
2012-09-18 18:57 ` Yinghai Lu
2012-09-19 0:50 ` Jiang Liu
8 siblings, 2 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-09-18 18:41 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, bhelgaas, linux-acpi, kaneshige.kenji, jiang.liu
On Mon, Sep 17, 2012 at 11:12 PM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
> Hi all,
>
> This patchset is 3rd version of the following:
> http://marc.info/?l=linux-pci&m=134457928913775&w=2
> http://marc.info/?l=linux-pci&m=134665909321684&w=2
>
> v2 -> v3:
> - change acpi_pci_drivers' add/remove interface according to Bjorn's suggestion
> - abandon RCU for protecting acpi_pci_roots list according to Bjorn's suggestion
> - change acpi_pci_find_root implementation to avoid potential deadlock
>
> * [PATCH v3 1/8] ACPI, PCI: Use normal list for struct acpi_pci_driver
> * [PATCH v3 2/8] ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
> * [PATCH v3 3/8] ACPI, PCI: add acpi_pci_drivers protection
> * [PATCH v3 4/8] ACPI, PCI: change acpi_pci_drivers' add/remove interface
> * [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation
> * [PATCH v3 6/8] ACPI, PCI: add acpi_pci_roots protection
> * [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
> * [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge
now it is more similar to my for-pci-root-bus-hotplug-part4 and part5
http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=shortlog;h=refs/heads/for-pci-root-bus-hotplug-part5
big difference:
I separated code from acpiphp_glue.c to pci_root_hp.c for root bridge
hotplug support
I thought we all agreed on that acpi root bridge hotplug plug need to
be separated from acpiphp at first.
http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=commitdiff;h=ab9fd4ccbfb6120a4a4adf9833487d656b0501d3
and CONFIG_HOTPLUG will always be enabled, so root bridge hotplug will
be always enabled.
acpiphp will still be used as one module, and to keep it simple pciehp
will be used for pcie etc.
That make the system BIOS much simple to avoid acpiphp.
Thanks
Yinghai
^ permalink raw reply [flat|nested] 95+ messages in thread* Re: [PATCH v3 0/6] acpi,pci: hostbridge hotplug support
2012-09-18 18:41 ` [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Yinghai Lu
@ 2012-09-18 18:57 ` Yinghai Lu
2012-09-19 4:53 ` Taku Izumi
2012-09-19 0:50 ` Jiang Liu
1 sibling, 1 reply; 95+ messages in thread
From: Yinghai Lu @ 2012-09-18 18:57 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, bhelgaas, linux-acpi, kaneshige.kenji, jiang.liu
On Tue, Sep 18, 2012 at 11:41 AM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Mon, Sep 17, 2012 at 11:12 PM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>> Hi all,
>>
>> This patchset is 3rd version of the following:
>> http://marc.info/?l=linux-pci&m=134457928913775&w=2
>> http://marc.info/?l=linux-pci&m=134665909321684&w=2
>>
>> v2 -> v3:
>> - change acpi_pci_drivers' add/remove interface according to Bjorn's suggestion
>> - abandon RCU for protecting acpi_pci_roots list according to Bjorn's suggestion
>> - change acpi_pci_find_root implementation to avoid potential deadlock
>>
>> * [PATCH v3 1/8] ACPI, PCI: Use normal list for struct acpi_pci_driver
>> * [PATCH v3 2/8] ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
>> * [PATCH v3 3/8] ACPI, PCI: add acpi_pci_drivers protection
>> * [PATCH v3 4/8] ACPI, PCI: change acpi_pci_drivers' add/remove interface
>> * [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation
>> * [PATCH v3 6/8] ACPI, PCI: add acpi_pci_roots protection
>> * [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
>> * [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge
>
> now it is more similar to my for-pci-root-bus-hotplug-part4 and part5
>
> http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=shortlog;h=refs/heads/for-pci-root-bus-hotplug-part5
>
> big difference:
> I separated code from acpiphp_glue.c to pci_root_hp.c for root bridge
> hotplug support
>
> I thought we all agreed on that acpi root bridge hotplug plug need to
> be separated from acpiphp at first.
>
> http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=commitdiff;h=ab9fd4ccbfb6120a4a4adf9833487d656b0501d3
>
> and CONFIG_HOTPLUG will always be enabled, so root bridge hotplug will
> be always enabled.
> acpiphp will still be used as one module, and to keep it simple pciehp
> will be used for pcie etc.
> That make the system BIOS much simple to avoid acpiphp.
also current acpiphp only have root bridge add notification.
and your code do not add any code for remove notification.
So how to you test your code with removal path?
Thanks
Yinghai
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH v3 0/6] acpi,pci: hostbridge hotplug support
2012-09-18 18:57 ` Yinghai Lu
@ 2012-09-19 4:53 ` Taku Izumi
2012-09-20 6:19 ` Yinghai Lu
0 siblings, 1 reply; 95+ messages in thread
From: Taku Izumi @ 2012-09-19 4:53 UTC (permalink / raw)
To: Yinghai Lu; +Cc: linux-pci, bhelgaas, linux-acpi, kaneshige.kenji, jiang.liu
On Tue, 18 Sep 2012 11:57:59 -0700
Yinghai Lu <yinghai@kernel.org> wrote:
> On Tue, Sep 18, 2012 at 11:41 AM, Yinghai Lu <yinghai@kernel.org> wrote:
> > On Mon, Sep 17, 2012 at 11:12 PM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
> >> Hi all,
> >>
> >> This patchset is 3rd version of the following:
> >> http://marc.info/?l=linux-pci&m=134457928913775&w=2
> >> http://marc.info/?l=linux-pci&m=134665909321684&w=2
> >>
> >> v2 -> v3:
> >> - change acpi_pci_drivers' add/remove interface according to Bjorn's suggestion
> >> - abandon RCU for protecting acpi_pci_roots list according to Bjorn's suggestion
> >> - change acpi_pci_find_root implementation to avoid potential deadlock
> >>
> >> * [PATCH v3 1/8] ACPI, PCI: Use normal list for struct acpi_pci_driver
> >> * [PATCH v3 2/8] ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
> >> * [PATCH v3 3/8] ACPI, PCI: add acpi_pci_drivers protection
> >> * [PATCH v3 4/8] ACPI, PCI: change acpi_pci_drivers' add/remove interface
> >> * [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation
> >> * [PATCH v3 6/8] ACPI, PCI: add acpi_pci_roots protection
> >> * [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
> >> * [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge
> >
> > now it is more similar to my for-pci-root-bus-hotplug-part4 and part5
> >
> > http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=shortlog;h=refs/heads/for-pci-root-bus-hotplug-part5
> >
> > big difference:
> > I separated code from acpiphp_glue.c to pci_root_hp.c for root bridge
> > hotplug support
> >
> > I thought we all agreed on that acpi root bridge hotplug plug need to
> > be separated from acpiphp at first.
> >
> > http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=commitdiff;h=ab9fd4ccbfb6120a4a4adf9833487d656b0501d3
> >
> > and CONFIG_HOTPLUG will always be enabled, so root bridge hotplug will
> > be always enabled.
> > acpiphp will still be used as one module, and to keep it simple pciehp
> > will be used for pcie etc.
> > That make the system BIOS much simple to avoid acpiphp.
>
> also current acpiphp only have root bridge add notification.
> and your code do not add any code for remove notification.
>
> So how to you test your code with removal path?
You were saying how to hot-remove hostbridge ?
I tested by ejecting ACPI container which includes hostbridge.
acpiphp is not the only way to hotplug hostbridge, so I ommit acpiphp
work from this patchset. This patchset is core part.
Best regards,
Taku Izumi <izumi.taku@jp.fujitsu.com>
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH v3 0/6] acpi,pci: hostbridge hotplug support
2012-09-19 4:53 ` Taku Izumi
@ 2012-09-20 6:19 ` Yinghai Lu
0 siblings, 0 replies; 95+ messages in thread
From: Yinghai Lu @ 2012-09-20 6:19 UTC (permalink / raw)
To: Taku Izumi; +Cc: linux-pci, bhelgaas, linux-acpi, kaneshige.kenji, jiang.liu
On Tue, Sep 18, 2012 at 9:53 PM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
> On Tue, 18 Sep 2012 11:57:59 -0700
>> also current acpiphp only have root bridge add notification.
>> and your code do not add any code for remove notification.
>>
>> So how to you test your code with removal path?
>
> You were saying how to hot-remove hostbridge ?
> I tested by ejecting ACPI container which includes hostbridge.
> acpiphp is not the only way to hotplug hostbridge, so I ommit acpiphp
> work from this patchset. This patchset is core part.
yes.
so acpi root for pci root bus will have parent? I did not think about.
I reordered my patchset and put updated version for your patch 8 into it.
http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=commitdiff;h=3db33bb8b94f3b03dfa097eafb00649643cd893a
the whole tree:
git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git
for-pci-root-bus-hotplug
Thanks
Yinghai
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re: [PATCH v3 0/6] acpi,pci: hostbridge hotplug support
2012-09-18 18:41 ` [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Yinghai Lu
2012-09-18 18:57 ` Yinghai Lu
@ 2012-09-19 0:50 ` Jiang Liu
1 sibling, 0 replies; 95+ messages in thread
From: Jiang Liu @ 2012-09-19 0:50 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Taku Izumi, linux-pci, bhelgaas, linux-acpi, kaneshige.kenji
On 2012-9-19 2:41, Yinghai Lu wrote:
> On Mon, Sep 17, 2012 at 11:12 PM, Taku Izumi <izumi.taku@jp.fujitsu.com> wrote:
>> Hi all,
>>
>> This patchset is 3rd version of the following:
>> http://marc.info/?l=linux-pci&m=134457928913775&w=2
>> http://marc.info/?l=linux-pci&m=134665909321684&w=2
>>
>> v2 -> v3:
>> - change acpi_pci_drivers' add/remove interface according to Bjorn's suggestion
>> - abandon RCU for protecting acpi_pci_roots list according to Bjorn's suggestion
>> - change acpi_pci_find_root implementation to avoid potential deadlock
>>
>> * [PATCH v3 1/8] ACPI, PCI: Use normal list for struct acpi_pci_driver
>> * [PATCH v3 2/8] ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
>> * [PATCH v3 3/8] ACPI, PCI: add acpi_pci_drivers protection
>> * [PATCH v3 4/8] ACPI, PCI: change acpi_pci_drivers' add/remove interface
>> * [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation
>> * [PATCH v3 6/8] ACPI, PCI: add acpi_pci_roots protection
>> * [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function
>> * [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge
>
> now it is more similar to my for-pci-root-bus-hotplug-part4 and part5
>
> http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=shortlog;h=refs/heads/for-pci-root-bus-hotplug-part5
>
> big difference:
> I separated code from acpiphp_glue.c to pci_root_hp.c for root bridge
> hotplug support
>
> I thought we all agreed on that acpi root bridge hotplug plug need to
> be separated from acpiphp at first.
>
> http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=commitdiff;h=ab9fd4ccbfb6120a4a4adf9833487d656b0501d3
>
> and CONFIG_HOTPLUG will always be enabled, so root bridge hotplug will
> be always enabled.
> acpiphp will still be used as one module, and to keep it simple pciehp
> will be used for pcie etc.
> That make the system BIOS much simple to avoid acpiphp.
I think it's a better way to separate host bridge hotplug functionality
from acpiphp driver, so acpiphp only handles PCI device hotplug, which
is much more clear.
--Gerry
^ permalink raw reply [flat|nested] 95+ messages in thread
* [PATCH v5 00/11] Add support for X86/ACPI camera sensor/PMIC setup with clk and regulator platform data
@ 2021-11-02 9:48 Hans de Goede
2021-11-02 9:49 ` [PATCH v5 05/11] clk: Introduce clk-tps68470 driver Hans de Goede
0 siblings, 1 reply; 95+ messages in thread
From: Hans de Goede @ 2021-11-02 9:48 UTC (permalink / raw)
To: Rafael J . Wysocki, Mark Gross, Andy Shevchenko, Wolfram Sang,
Mika Westerberg, Daniel Scally, Laurent Pinchart,
Mauro Carvalho Chehab, Liam Girdwood, Mark Brown,
Michael Turquette, Stephen Boyd
Cc: Hans de Goede, Len Brown, linux-acpi, platform-driver-x86,
linux-kernel, linux-i2c, Sakari Ailus, Kate Hsuan, linux-media,
linux-clk
Here is v5 of my patch-set adding support for camera sensor connected to a
TPS68470 PMIC on x86/ACPI devices.
Changes in v5:
- Update regulator_init_data in patch 10/11 to include the VCM regulator
- Address various small review remarks from Andy
- Make a couple of functions / vars static in the clk + regulator drivers
Reported-by: kernel test robot <lkp@intel.com>
Changes in v4:
[PATCH 01/11] ACPI: delay enumeration of devices with a _DEP
pointing to an INT3472 device:
- Move the acpi_dev_ready_for_enumeration() check to acpi_bus_attach()
(replacing the acpi_device_is_present() check there)
[PATCH 04/11] regulator: Introduce tps68470-regulator driver:
- Make the top comment block use c++ style comments
- Drop the bogus builtin regulator_init_data
- Make the driver enable the PMIC clk when enabling the Core buck
regulator, this switching regulator needs the PLL to be on
- Kconfig: add || COMPILE_TEST, fix help text
[PATCH 05/11] clk: Introduce clk-tps68470 driver
- Kconfig: select REGMAP_I2C, add || COMPILE_TEST, fix help text
- tps68470_clk_prepare(): Wait for the PLL to lock before returning
- tps68470_clk_unprepare(): Remove unnecesary clearing of divider regs
- tps68470_clk_probe(): Use devm_clk_hw_register()
- Misc. small cleanups
I'm quite happy with how this works now, so from my pov this is the final
version of the device-instantiation deferral code / approach.
###
The clk and regulator frameworks expect clk/regulator consumer-devices
to have info about the consumed clks/regulators described in the device's
fw_node, but on ACPI this info is missing.
This series worksaround this by providing platform_data with the info to
the TPS68470 clk/regulator MFD cells.
Patches 1 - 2 deal with a probe-ordering problem this introduces,
since the lookups are only registered when the provider-driver binds,
trying to get these clks/regulators before then results in a -ENOENT
error for clks and a dummy regulator for regulators. See the patches
for more details.
Patch 3 adds a header file which adds tps68470_clk_platform_data and
tps68470_regulator_platform_data structs. The futher patches depend on
this new header file.
Patch 4 + 5 add the TPS68470 clk and regulator drivers
Patches 6 - 11 Modify the INT3472 driver which instantiates the MFD cells to
provide the necessary platform-data.
Assuming this series is acceptable to everyone, we need to talk about how
to merge this.
Patch 2 has already been acked by Wolfram for merging by Rafael, so patch
1 + 2 can be merged into linux-pm, independent of the rest of the series
(there are some runtime deps on other changes for everything to work,
but the camera-sensors impacted by this are not fully supported yet in
the mainline kernel anyways).
For "[PATCH 03/13] platform_data: Add linux/platform_data/tps68470.h file",
which all further patches depend on I plan to provide an immutable branch
myself (once it has been reviewed), which the clk / regulator maintainers
can then merge before merging the clk / regulator driver which depends on
this.
And I will merge that IM-branch + patches 6-11 into the pdx86 tree myself.
Regards,
Hans
Daniel Scally (1):
platform/x86: int3472: Enable I2c daisy chain
Hans de Goede (10):
ACPI: delay enumeration of devices with a _DEP pointing to an INT3472
device
i2c: acpi: Use acpi_dev_ready_for_enumeration() helper
platform_data: Add linux/platform_data/tps68470.h file
regulator: Introduce tps68470-regulator driver
clk: Introduce clk-tps68470 driver
platform/x86: int3472: Split into 2 drivers
platform/x86: int3472: Add get_sensor_adev_and_name() helper
platform/x86: int3472: Pass tps68470_clk_platform_data to the
tps68470-regulator MFD-cell
platform/x86: int3472: Pass tps68470_regulator_platform_data to the
tps68470-regulator MFD-cell
platform/x86: int3472: Deal with probe ordering issues
drivers/acpi/scan.c | 37 ++-
drivers/clk/Kconfig | 8 +
drivers/clk/Makefile | 1 +
drivers/clk/clk-tps68470.c | 257 ++++++++++++++++++
drivers/i2c/i2c-core-acpi.c | 5 +-
drivers/platform/x86/intel/int3472/Makefile | 9 +-
...lk_and_regulator.c => clk_and_regulator.c} | 2 +-
drivers/platform/x86/intel/int3472/common.c | 82 ++++++
.../{intel_skl_int3472_common.h => common.h} | 6 +-
...ntel_skl_int3472_discrete.c => discrete.c} | 51 ++--
.../intel/int3472/intel_skl_int3472_common.c | 106 --------
...ntel_skl_int3472_tps68470.c => tps68470.c} | 99 ++++++-
drivers/platform/x86/intel/int3472/tps68470.h | 25 ++
.../x86/intel/int3472/tps68470_board_data.c | 134 +++++++++
drivers/regulator/Kconfig | 9 +
drivers/regulator/Makefile | 1 +
drivers/regulator/tps68470-regulator.c | 212 +++++++++++++++
include/acpi/acpi_bus.h | 5 +-
include/linux/mfd/tps68470.h | 11 +
include/linux/platform_data/tps68470.h | 35 +++
20 files changed, 944 insertions(+), 151 deletions(-)
create mode 100644 drivers/clk/clk-tps68470.c
rename drivers/platform/x86/intel/int3472/{intel_skl_int3472_clk_and_regulator.c => clk_and_regulator.c} (99%)
create mode 100644 drivers/platform/x86/intel/int3472/common.c
rename drivers/platform/x86/intel/int3472/{intel_skl_int3472_common.h => common.h} (94%)
rename drivers/platform/x86/intel/int3472/{intel_skl_int3472_discrete.c => discrete.c} (91%)
delete mode 100644 drivers/platform/x86/intel/int3472/intel_skl_int3472_common.c
rename drivers/platform/x86/intel/int3472/{intel_skl_int3472_tps68470.c => tps68470.c} (54%)
create mode 100644 drivers/platform/x86/intel/int3472/tps68470.h
create mode 100644 drivers/platform/x86/intel/int3472/tps68470_board_data.c
create mode 100644 drivers/regulator/tps68470-regulator.c
create mode 100644 include/linux/platform_data/tps68470.h
--
2.31.1
^ permalink raw reply [flat|nested] 95+ messages in thread* [PATCH v5 05/11] clk: Introduce clk-tps68470 driver
2021-11-02 9:48 [PATCH v5 00/11] Add support for X86/ACPI camera sensor/PMIC setup with clk and regulator platform data Hans de Goede
@ 2021-11-02 9:49 ` Hans de Goede
[not found] ` <163588780885.2993099.2088131017920983969@swboyd.mtv.corp.google.com>
0 siblings, 1 reply; 95+ messages in thread
From: Hans de Goede @ 2021-11-02 9:49 UTC (permalink / raw)
To: Rafael J . Wysocki, Mark Gross, Andy Shevchenko, Wolfram Sang,
Mika Westerberg, Daniel Scally, Laurent Pinchart,
Mauro Carvalho Chehab, Liam Girdwood, Mark Brown,
Michael Turquette, Stephen Boyd
Cc: Hans de Goede, Len Brown, linux-acpi, platform-driver-x86,
linux-kernel, linux-i2c, Sakari Ailus, Kate Hsuan, linux-media,
linux-clk
The TPS68470 PMIC provides Clocks, GPIOs and Regulators. At present in
the kernel the Regulators and Clocks are controlled by an OpRegion
driver designed to work with power control methods defined in ACPI, but
some platforms lack those methods, meaning drivers need to be able to
consume the resources of these chips through the usual frameworks.
This commit adds a driver for the clocks provided by the tps68470,
and is designed to bind to the platform_device registered by the
intel_skl_int3472 module.
This is based on this out of tree driver written by Intel:
https://github.com/intel/linux-intel-lts/blob/4.14/base/drivers/clk/clk-tps68470.c
with various cleanups added.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v5:
- Small comment cleanups based on review from Andy
Changes in v4:
- Kconfig: select REGMAP_I2C, add || COMPILE_TEST, fix help text
- tps68470_clk_prepare(): Wait for the PLL to lock before returning
- tps68470_clk_unprepare(): Remove unnecesary clearing of divider regs
- tps68470_clk_probe(): Use devm_clk_hw_register()
- Misc. small cleanups
Changes in v2:
- Update the comment on why a subsys_initcall is used to register the drv
- Fix trailing whitespice on line 100
---
drivers/clk/Kconfig | 8 ++
drivers/clk/Makefile | 1 +
drivers/clk/clk-tps68470.c | 257 +++++++++++++++++++++++++++++++++++
include/linux/mfd/tps68470.h | 11 ++
4 files changed, 277 insertions(+)
create mode 100644 drivers/clk/clk-tps68470.c
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index c5b3dc97396a..4e9098d79249 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -169,6 +169,14 @@ config COMMON_CLK_CDCE706
help
This driver supports TI CDCE706 programmable 3-PLL clock synthesizer.
+config COMMON_CLK_TPS68470
+ tristate "Clock Driver for TI TPS68470 PMIC"
+ depends on I2C
+ depends on INTEL_SKL_INT3472 || COMPILE_TEST
+ select REGMAP_I2C
+ help
+ This driver supports the clocks provided by the TPS68470 PMIC.
+
config COMMON_CLK_CDCE925
tristate "Clock driver for TI CDCE913/925/937/949 devices"
depends on I2C
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index e42312121e51..6b6a88ae1425 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -63,6 +63,7 @@ obj-$(CONFIG_COMMON_CLK_SI570) += clk-si570.o
obj-$(CONFIG_COMMON_CLK_STM32F) += clk-stm32f4.o
obj-$(CONFIG_COMMON_CLK_STM32H7) += clk-stm32h7.o
obj-$(CONFIG_COMMON_CLK_STM32MP157) += clk-stm32mp1.o
+obj-$(CONFIG_COMMON_CLK_TPS68470) += clk-tps68470.o
obj-$(CONFIG_CLK_TWL6040) += clk-twl6040.o
obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o
obj-$(CONFIG_COMMON_CLK_VC5) += clk-versaclock5.o
diff --git a/drivers/clk/clk-tps68470.c b/drivers/clk/clk-tps68470.c
new file mode 100644
index 000000000000..2ad0ac2f4096
--- /dev/null
+++ b/drivers/clk/clk-tps68470.c
@@ -0,0 +1,257 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Clock driver for TPS68470 PMIC
+ *
+ * Copyright (c) 2021 Red Hat Inc.
+ * Copyright (C) 2018 Intel Corporation
+ *
+ * Authors:
+ * Hans de Goede <hdegoede@redhat.com>
+ * Zaikuo Wang <zaikuo.wang@intel.com>
+ * Tianshu Qiu <tian.shu.qiu@intel.com>
+ * Jian Xu Zheng <jian.xu.zheng@intel.com>
+ * Yuning Pu <yuning.pu@intel.com>
+ * Antti Laakso <antti.laakso@intel.com>
+ */
+
+#include <linux/clk-provider.h>
+#include <linux/clkdev.h>
+#include <linux/kernel.h>
+#include <linux/mfd/tps68470.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/platform_data/tps68470.h>
+#include <linux/regmap.h>
+
+#define TPS68470_CLK_NAME "tps68470-clk"
+
+#define to_tps68470_clkdata(clkd) \
+ container_of(clkd, struct tps68470_clkdata, clkout_hw)
+
+static struct tps68470_clkout_freqs {
+ unsigned long freq;
+ unsigned int xtaldiv;
+ unsigned int plldiv;
+ unsigned int postdiv;
+ unsigned int buckdiv;
+ unsigned int boostdiv;
+} clk_freqs[] = {
+/*
+ * The PLL is used to multiply the crystal oscillator
+ * frequency range of 3 MHz to 27 MHz by a programmable
+ * factor of F = (M/N)*(1/P) such that the output
+ * available at the HCLK_A or HCLK_B pins are in the range
+ * of 4 MHz to 64 MHz in increments of 0.1 MHz.
+ *
+ * hclk_# = osc_in * (((plldiv*2)+320) / (xtaldiv+30)) * (1 / 2^postdiv)
+ *
+ * PLL_REF_CLK should be as close as possible to 100kHz
+ * PLL_REF_CLK = input clk / XTALDIV[7:0] + 30)
+ *
+ * PLL_VCO_CLK = (PLL_REF_CLK * (plldiv*2 + 320))
+ *
+ * BOOST should be as close as possible to 2Mhz
+ * BOOST = PLL_VCO_CLK / (BOOSTDIV[4:0] + 16) *
+ *
+ * BUCK should be as close as possible to 5.2Mhz
+ * BUCK = PLL_VCO_CLK / (BUCKDIV[3:0] + 5)
+ *
+ * osc_in xtaldiv plldiv postdiv hclk_#
+ * 20Mhz 170 32 1 19.2Mhz
+ * 20Mhz 170 40 1 20Mhz
+ * 20Mhz 170 80 1 24Mhz
+ */
+ { 19200000, 170, 32, 1, 2, 3 },
+ { 20000000, 170, 40, 1, 3, 4 },
+ { 24000000, 170, 80, 1, 4, 8 },
+};
+
+struct tps68470_clkdata {
+ struct clk_hw clkout_hw;
+ struct regmap *regmap;
+ unsigned int clk_cfg_idx;
+};
+
+static int tps68470_clk_is_prepared(struct clk_hw *hw)
+{
+ struct tps68470_clkdata *clkdata = to_tps68470_clkdata(hw);
+ int val;
+
+ if (regmap_read(clkdata->regmap, TPS68470_REG_PLLCTL, &val))
+ return 0;
+
+ return val & TPS68470_PLL_EN_MASK;
+}
+
+static int tps68470_clk_prepare(struct clk_hw *hw)
+{
+ struct tps68470_clkdata *clkdata = to_tps68470_clkdata(hw);
+ unsigned int idx = clkdata->clk_cfg_idx;
+
+ regmap_write(clkdata->regmap, TPS68470_REG_BOOSTDIV, clk_freqs[idx].boostdiv);
+ regmap_write(clkdata->regmap, TPS68470_REG_BUCKDIV, clk_freqs[idx].buckdiv);
+ regmap_write(clkdata->regmap, TPS68470_REG_PLLSWR, TPS68470_PLLSWR_DEFAULT);
+ regmap_write(clkdata->regmap, TPS68470_REG_XTALDIV, clk_freqs[idx].xtaldiv);
+ regmap_write(clkdata->regmap, TPS68470_REG_PLLDIV, clk_freqs[idx].plldiv);
+ regmap_write(clkdata->regmap, TPS68470_REG_POSTDIV, clk_freqs[idx].postdiv);
+ regmap_write(clkdata->regmap, TPS68470_REG_POSTDIV2, clk_freqs[idx].postdiv);
+ regmap_write(clkdata->regmap, TPS68470_REG_CLKCFG2, TPS68470_CLKCFG2_DRV_STR_2MA);
+
+ regmap_write(clkdata->regmap, TPS68470_REG_PLLCTL,
+ TPS68470_OSC_EXT_CAP_DEFAULT << TPS68470_OSC_EXT_CAP_SHIFT |
+ TPS68470_CLK_SRC_XTAL << TPS68470_CLK_SRC_SHIFT);
+
+ regmap_write(clkdata->regmap, TPS68470_REG_CLKCFG1,
+ (TPS68470_PLL_OUTPUT_ENABLE << TPS68470_OUTPUT_A_SHIFT) |
+ (TPS68470_PLL_OUTPUT_ENABLE << TPS68470_OUTPUT_B_SHIFT));
+
+ regmap_update_bits(clkdata->regmap, TPS68470_REG_PLLCTL,
+ TPS68470_PLL_EN_MASK, TPS68470_PLL_EN_MASK);
+
+ /*
+ * The PLLCTL reg lock bit is set by the PMIC after approx. 4ms and
+ * does not indicate a true lock, so just wait 4 ms.
+ */
+ usleep_range(4000, 5000);
+
+ return 0;
+}
+
+static void tps68470_clk_unprepare(struct clk_hw *hw)
+{
+ struct tps68470_clkdata *clkdata = to_tps68470_clkdata(hw);
+
+ /* Disable clock first ... */
+ regmap_update_bits(clkdata->regmap, TPS68470_REG_PLLCTL, TPS68470_PLL_EN_MASK, 0);
+
+ /* ... and then tri-state the clock outputs. */
+ regmap_write(clkdata->regmap, TPS68470_REG_CLKCFG1, 0);
+}
+
+static unsigned long tps68470_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
+{
+ struct tps68470_clkdata *clkdata = to_tps68470_clkdata(hw);
+
+ return clk_freqs[clkdata->clk_cfg_idx].freq;
+}
+
+/*
+ * This returns the index of the clk_freqs[] cfg with the closest rate for
+ * use in tps68470_clk_round_rate(). tps68470_clk_set_rate() checks that
+ * the rate of the returned cfg is an exact match.
+ */
+static unsigned int tps68470_clk_cfg_lookup(unsigned long rate)
+{
+ long diff, best_diff = LONG_MAX;
+ unsigned int i, best_idx = 0;
+
+ for (i = 0; i < ARRAY_SIZE(clk_freqs); i++) {
+ diff = clk_freqs[i].freq - rate;
+ if (diff == 0)
+ return i;
+
+ diff = abs(diff);
+ if (diff < best_diff) {
+ best_diff = diff;
+ best_idx = i;
+ }
+ }
+
+ return best_idx;
+}
+
+static long tps68470_clk_round_rate(struct clk_hw *hw, unsigned long rate,
+ unsigned long *parent_rate)
+{
+ unsigned int idx = tps68470_clk_cfg_lookup(rate);
+
+ return clk_freqs[idx].freq;
+}
+
+static int tps68470_clk_set_rate(struct clk_hw *hw, unsigned long rate,
+ unsigned long parent_rate)
+{
+ struct tps68470_clkdata *clkdata = to_tps68470_clkdata(hw);
+ unsigned int idx = tps68470_clk_cfg_lookup(rate);
+
+ if (rate != clk_freqs[idx].freq)
+ return -EINVAL;
+
+ clkdata->clk_cfg_idx = idx;
+
+ return 0;
+}
+
+static const struct clk_ops tps68470_clk_ops = {
+ .is_prepared = tps68470_clk_is_prepared,
+ .prepare = tps68470_clk_prepare,
+ .unprepare = tps68470_clk_unprepare,
+ .recalc_rate = tps68470_clk_recalc_rate,
+ .round_rate = tps68470_clk_round_rate,
+ .set_rate = tps68470_clk_set_rate,
+};
+
+static const struct clk_init_data tps68470_clk_initdata = {
+ .name = TPS68470_CLK_NAME,
+ .ops = &tps68470_clk_ops,
+};
+
+static int tps68470_clk_probe(struct platform_device *pdev)
+{
+ struct tps68470_clk_platform_data *pdata = pdev->dev.platform_data;
+ struct tps68470_clkdata *tps68470_clkdata;
+ int ret;
+
+ tps68470_clkdata = devm_kzalloc(&pdev->dev, sizeof(*tps68470_clkdata),
+ GFP_KERNEL);
+ if (!tps68470_clkdata)
+ return -ENOMEM;
+
+ tps68470_clkdata->regmap = dev_get_drvdata(pdev->dev.parent);
+ tps68470_clkdata->clkout_hw.init = &tps68470_clk_initdata;
+ ret = devm_clk_hw_register(&pdev->dev, &tps68470_clkdata->clkout_hw);
+ if (ret)
+ return ret;
+
+ ret = devm_clk_hw_register_clkdev(&pdev->dev, &tps68470_clkdata->clkout_hw,
+ TPS68470_CLK_NAME, NULL);
+ if (ret)
+ return ret;
+
+ if (pdata) {
+ ret = devm_clk_hw_register_clkdev(&pdev->dev,
+ &tps68470_clkdata->clkout_hw,
+ pdata->consumer_con_id,
+ pdata->consumer_dev_name);
+ }
+
+ return ret;
+}
+
+static struct platform_driver tps68470_clk_driver = {
+ .driver = {
+ .name = TPS68470_CLK_NAME,
+ },
+ .probe = tps68470_clk_probe,
+};
+
+/*
+ * The ACPI tps68470 probe-ordering depends on the clk/gpio/regulator drivers
+ * registering before the drivers for the camera-sensors which use them bind.
+ * subsys_initcall() ensures this when the drivers are builtin.
+ */
+static int __init tps68470_clk_init(void)
+{
+ return platform_driver_register(&tps68470_clk_driver);
+}
+subsys_initcall(tps68470_clk_init);
+
+static void __exit tps68470_clk_exit(void)
+{
+ platform_driver_unregister(&tps68470_clk_driver);
+}
+module_exit(tps68470_clk_exit);
+
+MODULE_ALIAS("platform:tps68470-clk");
+MODULE_DESCRIPTION("clock driver for TPS68470 pmic");
+MODULE_LICENSE("GPL");
diff --git a/include/linux/mfd/tps68470.h b/include/linux/mfd/tps68470.h
index ffe81127d91c..7807fa329db0 100644
--- a/include/linux/mfd/tps68470.h
+++ b/include/linux/mfd/tps68470.h
@@ -75,6 +75,17 @@
#define TPS68470_CLKCFG1_MODE_A_MASK GENMASK(1, 0)
#define TPS68470_CLKCFG1_MODE_B_MASK GENMASK(3, 2)
+#define TPS68470_CLKCFG2_DRV_STR_2MA 0x05
+#define TPS68470_PLL_OUTPUT_ENABLE 0x02
+#define TPS68470_CLK_SRC_XTAL BIT(0)
+#define TPS68470_PLLSWR_DEFAULT GENMASK(1, 0)
+#define TPS68470_OSC_EXT_CAP_DEFAULT 0x05
+
+#define TPS68470_OUTPUT_A_SHIFT 0x00
+#define TPS68470_OUTPUT_B_SHIFT 0x02
+#define TPS68470_CLK_SRC_SHIFT GENMASK(2, 0)
+#define TPS68470_OSC_EXT_CAP_SHIFT BIT(2)
+
#define TPS68470_GPIO_CTL_REG_A(x) (TPS68470_REG_GPCTL0A + (x) * 2)
#define TPS68470_GPIO_CTL_REG_B(x) (TPS68470_REG_GPCTL0B + (x) * 2)
#define TPS68470_GPIO_MODE_MASK GENMASK(1, 0)
--
2.31.1
^ permalink raw reply related [flat|nested] 95+ messages in thread
* Re:
@ 2017-11-13 14:55 Amos Kalonzo
0 siblings, 0 replies; 95+ messages in thread
From: Amos Kalonzo @ 2017-11-13 14:55 UTC (permalink / raw)
Attn:
I am wondering why You haven't respond to my email for some days now.
reference to my client's contract balance payment of (11.7M,USD)
Kindly get back to me for more details.
Best Regards
Amos Kalonzo
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re:
@ 2017-05-03 6:23 H.A
0 siblings, 0 replies; 95+ messages in thread
From: H.A @ 2017-05-03 6:23 UTC (permalink / raw)
To: Recipients
With profound love in my heart, I Kindly Oblige your interest to very important proposal.. It is Truly Divine and require your utmost attention..........
S hlubokou láskou v mém srdci, Laskave jsem prinutit svuj zájem k návrhu .. Je velmi duležité, skutecne Divine a vyžadují vaši nejvyšší pozornost.
Kontaktujte me prímo pres: helenaroberts99@gmail.com pro úplné podrobnosti.complete.
HELINA .A ROBERTS
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
^ permalink raw reply [flat|nested] 95+ messages in thread
* RE:
@ 2017-02-23 15:09 Qin's Yanjun
0 siblings, 0 replies; 95+ messages in thread
From: Qin's Yanjun @ 2017-02-23 15:09 UTC (permalink / raw)
How are you today and your family? I require your attention and honest
co-operation about some issues which i will really want to discuss with you
which. Looking forward to read from you soon.
Qin's
______________________________
Sky Silk, http://aknet.kz
^ permalink raw reply [flat|nested] 95+ messages in thread
* (unknown),
@ 2013-12-21 16:48 Alex Barattini
2013-12-23 1:44 ` Aaron Lu
0 siblings, 1 reply; 95+ messages in thread
From: Alex Barattini @ 2013-12-21 16:48 UTC (permalink / raw)
To: linux-acpi
[1.] One line summary of the problem:
8086:0166 [Dell Inspiron 15R 5521] Impossible to adjust the screen backlight
[2.] Full description of the problem/report:
The change in the level of illumination of the screen, through the
corresponding option in the control panel, has no effect.
[3.] Keywords :
---------------
[4.] Kernel version (from /proc/version):
Linux version 3.13.0-031300rc3-generic (apw@gomeisa) (gcc version
4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #201312061335 SMP Fri Dec 6
18:37:23 UTC 2013
[5.] Output of Oops.. message (if applicable) with symbolic
information resolved (see Documentation/oops-tracing.txt)
-------------
[6.] A small shell script or example program which triggers the
problem (if possible)
-------------
[7.] Environment
Description: Ubuntu 13.10
Release: 13.10
[7.1.] Software (add the output of the ver_linux script here)
alex@alex-Inspiron-5521:/usr/src/linux-headers-3.13.0-031300rc3/scripts$
sh ver_linux
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
Linux alex-Inspiron-5521 3.13.0-031300rc3-generic #201312061335 SMP
Fri Dec 6 18:37:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Gnu C 4.8
Gnu make 3.81
binutils 2.23.52.20130913
util-linux 2.20.1
mount support
module-init-tools 9
e2fsprogs 1.42.8
pcmciautils 018
PPP 2.4.5
Linux C Library 2.17
Dynamic linker (ldd) 2.17
Procps 3.3.3
Net-tools 1.60
Kbd 1.15.5
Sh-utils 8.20
wireless-tools 30
Modules Loaded nls_utf8 isofs parport_pc ppdev rfcomm bnep
nls_iso8859_1 x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel
kvm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel
aes_x86_64 uvcvideo lrw gf128mul arc4 joydev iwldvm videobuf2_vmalloc
glue_helper videobuf2_memops mac80211 videobuf2_core rts5139 i915
videodev ablk_helper cryptd dell_laptop dell_wmi dcdbas sparse_keymap
snd_hda_codec_hdmi snd_hda_codec_realtek drm_kms_helper snd_hda_intel
snd_hda_codec drm iwlwifi snd_hwdep snd_pcm snd_page_alloc
snd_seq_midi snd_seq_midi_event snd_rawmidi btusb snd_seq
snd_seq_device microcode snd_timer lp mei_me lpc_ich snd cfg80211
bluetooth parport psmouse mei video serio_raw i2c_algo_bit wmi
soundcore mac_hid ahci libahci r8169 mii
[7.2.] Processor information (from /proc/cpuinfo):
alex@alex-Inspiron-5521:~$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
stepping : 9
microcode : 0x17
cpu MHz : 1875.515
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology
nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl
vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt
tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb
xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase
smep erms
bogomips : 3591.92
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
stepping : 9
microcode : 0x17
cpu MHz : 1112.765
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology
nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl
vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt
tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb
xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase
smep erms
bogomips : 3591.92
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
stepping : 9
microcode : 0x17
cpu MHz : 1331.367
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology
nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl
vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt
tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb
xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase
smep erms
bogomips : 3591.92
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz
stepping : 9
microcode : 0x17
cpu MHz : 2486.250
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology
nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl
vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt
tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb
xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase
smep erms
bogomips : 3591.92
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
[7.3.] Module information (from /proc/modules):
alex@alex-Inspiron-5521:~$ cat /proc/modules
nls_utf8 12557 1 - Live 0x0000000000000000
isofs 40285 1 - Live 0x0000000000000000
parport_pc 36962 0 - Live 0x0000000000000000
ppdev 17711 0 - Live 0x0000000000000000
rfcomm 74748 12 - Live 0x0000000000000000
bnep 19884 2 - Live 0x0000000000000000
nls_iso8859_1 12713 1 - Live 0x0000000000000000
x86_pkg_temp_thermal 14269 0 - Live 0x0000000000000000
intel_powerclamp 19031 0 - Live 0x0000000000000000
coretemp 17728 0 - Live 0x0000000000000000
kvm_intel 144426 0 - Live 0x0000000000000000
kvm 468147 1 kvm_intel, Live 0x0000000000000000
crct10dif_pclmul 14250 0 - Live 0x0000000000000000
crc32_pclmul 13160 0 - Live 0x0000000000000000
ghash_clmulni_intel 13259 0 - Live 0x0000000000000000
aesni_intel 55720 0 - Live 0x0000000000000000
aes_x86_64 17131 1 aesni_intel, Live 0x0000000000000000
uvcvideo 82247 0 - Live 0x0000000000000000
lrw 13323 1 aesni_intel, Live 0x0000000000000000
gf128mul 14951 1 lrw, Live 0x0000000000000000
arc4 12573 2 - Live 0x0000000000000000
joydev 17575 0 - Live 0x0000000000000000
iwldvm 243417 0 - Live 0x0000000000000000
videobuf2_vmalloc 13216 1 uvcvideo, Live 0x0000000000000000
glue_helper 14095 1 aesni_intel, Live 0x0000000000000000
videobuf2_memops 13362 1 videobuf2_vmalloc, Live 0x0000000000000000
mac80211 654078 1 iwldvm, Live 0x0000000000000000
videobuf2_core 40972 1 uvcvideo, Live 0x0000000000000000
rts5139 318332 0 - Live 0x0000000000000000 (C)
i915 816671 4 - Live 0x0000000000000000
videodev 139761 2 uvcvideo,videobuf2_core, Live 0x0000000000000000
ablk_helper 13597 1 aesni_intel, Live 0x0000000000000000
cryptd 20530 3 ghash_clmulni_intel,aesni_intel,ablk_helper, Live
0x0000000000000000
dell_laptop 18315 0 - Live 0x0000000000000000
dell_wmi 12681 0 - Live 0x0000000000000000
dcdbas 15017 1 dell_laptop, Live 0x0000000000000000
sparse_keymap 13890 1 dell_wmi, Live 0x0000000000000000
snd_hda_codec_hdmi 46898 1 - Live 0x0000000000000000
snd_hda_codec_realtek 61978 1 - Live 0x0000000000000000
drm_kms_helper 53224 1 i915, Live 0x0000000000000000
snd_hda_intel 57222 3 - Live 0x0000000000000000
snd_hda_codec 195017 3
snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel, Live
0x0000000000000000
drm 308397 5 i915,drm_kms_helper, Live 0x0000000000000000
iwlwifi 179643 1 iwldvm, Live 0x0000000000000000
snd_hwdep 13613 1 snd_hda_codec, Live 0x0000000000000000
snd_pcm 107140 3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec, Live
0x0000000000000000
snd_page_alloc 18798 2 snd_hda_intel,snd_pcm, Live 0x0000000000000000
snd_seq_midi 13324 0 - Live 0x0000000000000000
snd_seq_midi_event 14899 1 snd_seq_midi, Live 0x0000000000000000
snd_rawmidi 30465 1 snd_seq_midi, Live 0x0000000000000000
btusb 28326 0 - Live 0x0000000000000000
snd_seq 66061 2 snd_seq_midi,snd_seq_midi_event, Live 0x0000000000000000
snd_seq_device 14497 3 snd_seq_midi,snd_rawmidi,snd_seq, Live 0x0000000000000000
microcode 23788 0 - Live 0x0000000000000000
snd_timer 30038 2 snd_pcm,snd_seq, Live 0x0000000000000000
lp 17799 0 - Live 0x0000000000000000
mei_me 18578 0 - Live 0x0000000000000000
lpc_ich 21163 0 - Live 0x0000000000000000
snd 73850 17 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_seq_midi,snd_rawmidi,snd_seq,snd_seq_device,snd_timer,
Live 0x0000000000000000
cfg80211 509407 3 iwldvm,mac80211,iwlwifi, Live 0x0000000000000000
bluetooth 411140 22 rfcomm,bnep,btusb, Live 0x0000000000000000
parport 42481 3 parport_pc,ppdev,lp, Live 0x0000000000000000
psmouse 104142 0 - Live 0x0000000000000000
mei 82671 1 mei_me, Live 0x0000000000000000
video 19859 1 i915, Live 0x0000000000000000
serio_raw 13462 0 - Live 0x0000000000000000
i2c_algo_bit 13564 1 i915, Live 0x0000000000000000
wmi 19363 1 dell_wmi, Live 0x0000000000000000
soundcore 12680 1 snd, Live 0x0000000000000000
mac_hid 13253 0 - Live 0x0000000000000000
ahci 30063 4 - Live 0x0000000000000000
libahci 32277 1 ahci, Live 0x0000000000000000
r8169 73299 0 - Live 0x0000000000000000
mii 13981 1 r8169, Live 0x0000000000000000
[7.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem)
alex@alex-Inspiron-5521:~$ cat /proc/ioports
0000-0cf7 : PCI Bus 0000:00
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-0060 : keyboard
0062-0062 : EC data
0064-0064 : keyboard
0066-0066 : EC cmd
0070-0077 : rtc0
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
0400-0403 : ACPI PM1a_EVT_BLK
0404-0405 : ACPI PM1a_CNT_BLK
0408-040b : ACPI PM_TMR
0410-0415 : ACPI CPU throttle
0420-042f : ACPI GPE0_BLK
0430-0433 : iTCO_wdt
0450-0450 : ACPI PM2_CNT_BLK
0454-0457 : pnp 00:06
0458-047f : pnp 00:04
0460-047f : iTCO_wdt
0500-057f : pnp 00:04
0680-069f : pnp 00:04
0cf8-0cff : PCI conf1
0d00-ffff : PCI Bus 0000:00
1000-100f : pnp 00:04
164e-164f : pnp 00:04
2000-2fff : PCI Bus 0000:01
2000-20ff : 0000:01:00.0
2000-20ff : r8169
3000-303f : 0000:00:02.0
3040-305f : 0000:00:1f.3
3060-307f : 0000:00:1f.2
3060-307f : ahci
3080-3087 : 0000:00:1f.2
3080-3087 : ahci
3088-308f : 0000:00:1f.2
3088-308f : ahci
3090-3093 : 0000:00:1f.2
3090-3093 : ahci
3094-3097 : 0000:00:1f.2
3094-3097 : ahci
fd60-fd63 : pnp 00:04
ffff-ffff : pnp 00:04
ffff-ffff : pnp 00:04
alex@alex-Inspiron-5521:~$ cat /proc/iomem
00000000-00000fff : reserved
00001000-00087fff : System RAM
00088000-000bffff : reserved
000a0000-000bffff : PCI Bus 0000:00
000c0000-000c3fff : PCI Bus 0000:00
000c4000-000c7fff : PCI Bus 0000:00
000c8000-000cbfff : PCI Bus 0000:00
000cc000-000cffff : PCI Bus 0000:00
000d0000-000d3fff : PCI Bus 0000:00
000d4000-000d7fff : PCI Bus 0000:00
000d8000-000dbfff : PCI Bus 0000:00
000dc000-000dffff : PCI Bus 0000:00
000e0000-000e3fff : PCI Bus 0000:00
000e4000-000e7fff : PCI Bus 0000:00
000e8000-000ebfff : PCI Bus 0000:00
000ec000-000effff : PCI Bus 0000:00
000f0000-000fffff : PCI Bus 0000:00
000f0000-000fffff : System ROM
00100000-1fffffff : System RAM
02000000-0277171d : Kernel code
0277171e-02d1bdbf : Kernel data
02e78000-02fdcfff : Kernel bss
20000000-201fffff : reserved
20000000-201fffff : pnp 00:0a
20200000-40003fff : System RAM
40004000-40004fff : reserved
40004000-40004fff : pnp 00:0a
40005000-a0baffff : System RAM
a0bb0000-a13affff : reserved
a13b0000-a9dbefff : System RAM
a9dbf000-aaebefff : reserved
aaebf000-aafbefff : ACPI Non-volatile Storage
aafbf000-aaffefff : ACPI Tables
aafff000-aaffffff : System RAM
ab000000-af9fffff : reserved
aba00000-af9fffff : Graphics Stolen Memory
afa00000-feafffff : PCI Bus 0000:00
afa00000-afa00fff : pnp 00:09
b0000000-bfffffff : 0000:00:02.0
b0000000-b0407fff : BOOTFB
c0000000-c03fffff : 0000:00:02.0
c0400000-c04fffff : PCI Bus 0000:01
c0400000-c0403fff : 0000:01:00.0
c0400000-c0403fff : r8169
c0404000-c0404fff : 0000:01:00.0
c0404000-c0404fff : r8169
c0500000-c05fffff : PCI Bus 0000:02
c0500000-c0501fff : 0000:02:00.0
c0500000-c0501fff : iwlwifi
c0600000-c060ffff : 0000:00:14.0
c0600000-c060ffff : xhci_hcd
c0610000-c0613fff : 0000:00:1b.0
c0610000-c0613fff : ICH HD audio
c0614000-c061400f : 0000:00:16.0
c0614000-c061400f : mei_me
c0615000-c06150ff : 0000:00:1f.3
c0617000-c06177ff : 0000:00:1f.2
c0617000-c06177ff : ahci
c0618000-c06183ff : 0000:00:1d.0
c0618000-c06183ff : ehci_hcd
c0619000-c06193ff : 0000:00:1a.0
c0619000-c06193ff : ehci_hcd
e0000000-efffffff : PCI MMCONFIG 0000 [bus 00-ff]
e0000000-efffffff : reserved
e0000000-efffffff : pnp 00:09
feb00000-feb03fff : reserved
fec00000-fec00fff : reserved
fec00000-fec003ff : IOAPIC 0
fed00000-fed003ff : HPET 0
fed10000-fed19fff : reserved
fed10000-fed17fff : pnp 00:09
fed18000-fed18fff : pnp 00:09
fed19000-fed19fff : pnp 00:09
fed1c000-fed1ffff : reserved
fed1c000-fed1ffff : pnp 00:09
fed1f410-fed1f414 : iTCO_wdt
fed20000-fed3ffff : pnp 00:09
fed90000-fed90fff : dmar0
fed91000-fed91fff : dmar1
fee00000-fee00fff : Local APIC
fee00000-fee00fff : reserved
ff000000-ff000fff : pnp 00:09
ffb80000-ffffffff : reserved
100000000-14f5fffff : System RAM
14f600000-14fffffff : RAM buffer
[7.5.] PCI information ('lspci -vvv' as root)
alex@alex-Inspiron-5521:~$ sudo lspci -vvv
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM
Controller (rev 09)
Subsystem: Dell Device 0597
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort+ >SERR- <PERR- INTx-
Latency: 0
Capabilities: [e0] Vendor Specific Information: Len=0c <?>
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core
processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
Subsystem: Dell Device 0597
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 48
Region 0: Memory at c0000000 (64-bit, non-prefetchable) [size=4M]
Region 2: Memory at b0000000 (64-bit, prefetchable) [size=256M]
Region 4: I/O ports at 3000 [size=64]
Expansion ROM at <unassigned> [disabled]
Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
Address: fee00018 Data: 0000
Capabilities: [d0] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [a4] PCI Advanced Features
AFCap: TP+ FLR+
AFCtrl: FLR-
AFStatus: TP-
Kernel driver in use: i915
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset
Family USB xHCI Host Controller (rev 04) (prog-if 30 [XHCI])
Subsystem: Dell Device 0597
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 42
Region 0: Memory at c0600000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [70] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
Address: 00000000fee002f8 Data: 0000
Kernel driver in use: xhci_hcd
00:16.0 Communication controller: Intel Corporation 7 Series/C210
Series Chipset Family MEI Controller #1 (rev 04)
Subsystem: Dell Device 0597
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 45
Region 0: Memory at c0614000 (64-bit, non-prefetchable) [size=16]
Capabilities: [50] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [8c] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee00378 Data: 0000
Kernel driver in use: mei_me
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset
Family USB Enhanced Host Controller #2 (rev 04) (prog-if 20 [EHCI])
Subsystem: Dell Device 0597
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 16
Region 0: Memory at c0619000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [58] Debug port: BAR=1 offset=00a0
Capabilities: [98] PCI Advanced Features
AFCap: TP+ FLR+
AFCtrl: FLR-
AFStatus: TP-
Kernel driver in use: ehci-pci
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset
Family High Definition Audio Controller (rev 04)
Subsystem: Dell Device 0597
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 47
Region 0: Memory at c0610000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee003d8 Data: 0000
Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
ExtTag- RBE- FLReset+
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0
<64ns, L1 <1us
ClockPM- Surprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed unknown, Width x0, TrErr- Train- SlotClk- DLActive-
BWMgmt- ABWMgmt-
Capabilities: [100 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed- WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
Status: NegoPending- InProgress-
VC1: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=1 ArbSelect=Fixed TC/VC=22
Status: NegoPending- InProgress-
Capabilities: [130 v1] Root Complex Link
Desc: PortNumber=0f ComponentID=00 EltType=Config
Link0: Desc: TargetPort=00 TargetComponent=00 AssocRCRB-
LinkType=MemMapped LinkValid+
Addr: 00000000fed1c000
Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset
Family PCI Express Root Port 1 (rev c4) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00002000-00002fff
Memory behind bridge: fff00000-000fffff
Prefetchable memory behind bridge: 00000000c0400000-00000000c04fffff
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- <SERR- <PERR-
BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
ExtTag- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
ClockPM- Surprise- LLActRep+ BwNot-
LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+
BWMgmt+ ABWMgmt-
SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
Slot #0, PowerLimit 10.000W; Interlock- NoCompl+
SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
Changed: MRL- PresDet- LinkState+
RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
RootCap: CRSVisible-
RootSta: PME ReqID 0000, PMEStatus- PMEPending-
DevCap2: Completion Timeout: Range BC, TimeoutDis+ ARIFwd-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- ARIFwd-
LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-,
Selectable De-emphasis: -6dB
Transmit Margin: Normal Operating Range, EnterModifiedCompliance-
ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-,
EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
Address: 00000000 Data: 0000
Capabilities: [90] Subsystem: Dell Device 0597
Capabilities: [a0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Kernel driver in use: pcieport
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset
Family PCI Express Root Port 2 (rev c4) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
I/O behind bridge: 0000f000-00000fff
Memory behind bridge: c0500000-c05fffff
Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- <SERR- <PERR-
BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
ExtTag- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #2, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
ClockPM- Surprise- LLActRep+ BwNot-
LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+
BWMgmt+ ABWMgmt-
SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
Slot #1, PowerLimit 10.000W; Interlock- NoCompl+
SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
Changed: MRL- PresDet- LinkState+
RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
RootCap: CRSVisible-
RootSta: PME ReqID 0000, PMEStatus- PMEPending-
DevCap2: Completion Timeout: Range BC, TimeoutDis+ ARIFwd-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- ARIFwd-
LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-,
Selectable De-emphasis: -6dB
Transmit Margin: Normal Operating Range, EnterModifiedCompliance-
ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-,
EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
Address: 00000000 Data: 0000
Capabilities: [90] Subsystem: Dell Device 0597
Capabilities: [a0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset
Family USB Enhanced Host Controller #1 (rev 04) (prog-if 20 [EHCI])
Subsystem: Dell Device 0597
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 23
Region 0: Memory at c0618000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [58] Debug port: BAR=1 offset=00a0
Capabilities: [98] PCI Advanced Features
AFCap: TP+ FLR+
AFCtrl: FLR-
AFStatus: TP-
Kernel driver in use: ehci-pci
00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC
Controller (rev 04)
Subsystem: Dell Device 0597
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Capabilities: [e0] Vendor Specific Information: Len=0c <?>
Kernel driver in use: lpc_ich
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family
6-port SATA Controller [AHCI mode] (rev 04) (prog-if 01 [AHCI 1.0])
Subsystem: Dell Device 0597
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin B routed to IRQ 44
Region 0: I/O ports at 3088 [size=8]
Region 1: I/O ports at 3094 [size=4]
Region 2: I/O ports at 3080 [size=8]
Region 3: I/O ports at 3090 [size=4]
Region 4: I/O ports at 3060 [size=32]
Region 5: Memory at c0617000 (32-bit, non-prefetchable) [size=2K]
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Address: fee00358 Data: 0000
Capabilities: [70] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [a8] SATA HBA v1.0 BAR4 Offset=00000004
Capabilities: [b0] PCI Advanced Features
AFCap: TP+ FLR+
AFCtrl: FLR-
AFStatus: TP-
Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family
SMBus Controller (rev 04)
Subsystem: Dell Device 0597
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin C routed to IRQ 0
Region 0: Memory at c0615000 (64-bit, non-prefetchable) [size=256]
Region 4: I/O ports at 3040 [size=32]
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05)
Subsystem: Dell Device 0597
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 43
Region 0: I/O ports at 2000 [size=256]
Region 2: Memory at c0404000 (64-bit, prefetchable) [size=4K]
Region 4: Memory at c0400000 (64-bit, prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee00318 Data: 0000
Capabilities: [70] Express (v2) Endpoint, MSI 01
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0
unlimited, L1 <64us
ClockPM+ Surprise- LLActRep- BwNot-
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive-
BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported, TimeoutDis+
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-,
Selectable De-emphasis: -6dB
Transmit Margin: Normal Operating Range, EnterModifiedCompliance-
ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-,
EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00000800
Capabilities: [d0] Vital Product Data
Unknown small resource type 00, will not decode more.
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+
MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
Capabilities: [140 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed- WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
Status: NegoPending- InProgress-
Capabilities: [160 v1] Device Serial Number 50-00-00-00-36-4c-e0-00
Kernel driver in use: r8169
02:00.0 Network controller: Intel Corporation Centrino Wireless-N 2230 (rev c4)
Subsystem: Intel Corporation Centrino Wireless-N 2230 BGN
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 46
Region 0: Memory at c0500000 (64-bit, non-prefetchable) [size=8K]
Capabilities: [c8] Power Management version 3
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee00398 Data: 0000
Capabilities: [e0] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 unlimited
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <4us, L1 <32us
ClockPM+ Surprise- LLActRep- BwNot-
LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive-
BWMgmt- ABWMgmt-
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+
MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
Capabilities: [140 v1] Device Serial Number 60-36-dd-ff-ff-cc-6b-6d
Kernel driver in use: iwlwifi
[7.6.] SCSI information (from /proc/scsi/scsi)
alex@alex-Inspiron-5521:~$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: WDC WD10JPVT-75A Rev: 01.0
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: PLDS Model: DVD+-RW DU-8A5HH Rev: SD11
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi6 Channel: 00 Id: 00 Lun: 00
Vendor: Generic- Model: xD/SD/M.S. Rev: 1.00
Type: Direct-Access ANSI SCSI revision: 02
[7.7.] Other information that might be relevant to the problem (please
look in /proc and include all information that you think to be
relevant):
alex@alex-Inspiron-5521:~$ ls /proc
1 1372 1522 1827 2302 370 531 96 loadavg
10 1375 1523 1831 2312 371 54 97 locks
1053 1376 1524 1848 2314 376 56 acpi mdstat
1058 1381 1525 1856 24 377 57 asound meminfo
1063 1383 153 1858 2423 38 576 buddyinfo misc
1064 1386 154 1859 2427 386 58 bus modules
1068 1391 155 1863 2432 387 59 cgroups mounts
11 1396 1555 1885 2466 388 60 cmdline mtrr
1145 1397 157 189 25 39 61 consoles net
1149 1399 1574 1894 26 40 62 cpuinfo pagetypeinfo
1162 14 1579 19 2679 41 7 crypto partitions
1168 1406 1598 1900 2688 410 717 devices sched_debug
1185 1408 16 1901 2689 412 735 diskstats schedstat
1188 1443 160 1902 27 42 74 dma scsi
12 1464 1638 1908 2763 420 749 driver self
1209 1467 1639 1909 2766 43 752 execdomains slabinfo
1214 1469 1680 1930 2776 44 782 fb softirqs
1224 148 17 1938 28 45 796 filesystems stat
1225 149 172 1944 29 46 8 fs swaps
1239 1498 173 1965 297 466 822 interrupts sys
13 15 1785 2 3 47 824 iomem sysrq-trigger
1306 150 1787 20 304 476 831 ioports sysvipc
1310 1506 1788 2031 31 477 850 irq timer_list
1316 151 1789 2037 32 478 856 kallsyms timer_stats
1319 1510 1795 2054 33 49 860 kcore tty
1348 1511 18 21 34 5 865 key-users uptime
1351 1515 1800 22 341 50 870 kmsg version
1352 1517 1810 2213 35 51 872 kpagecount vmallocinfo
1354 1518 1814 2235 36 52 875 kpageflags vmstat
1368 152 1822 23 37 53 9 latency_stats zoneinfo
[X.] Other notes, patches, fixes, workarounds:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1261853
^ permalink raw reply [flat|nested] 95+ messages in thread* Re:
@ 2011-05-01 13:35 lotto
0 siblings, 0 replies; 95+ messages in thread
From: lotto @ 2011-05-01 13:35 UTC (permalink / raw)
Send your Names*Address*Phone* to claim your 1,000,000 GBP awarded to
you.Reply to lotto_agent1@ymail.com for more info
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re:
@ 2010-09-28 12:23 Marc Ferland
0 siblings, 0 replies; 95+ messages in thread
From: Marc Ferland @ 2010-09-28 12:23 UTC (permalink / raw)
hey,
how are you?
Just received my Iphone 4G 16GB from this homepage, www.Benefits188.com
It's so cheaper but genuine, Wow. that's amazing. I like it very much!!
I paid it $690US couier charges included , They have some other
products. If you want to get one. you can check it out !
Regards,
Marc Ferland
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re:
@ 2010-07-17 2:41 SINOPEC OIL AND GAS COMPANY
0 siblings, 0 replies; 95+ messages in thread
From: SINOPEC OIL AND GAS COMPANY @ 2010-07-17 2:41 UTC (permalink / raw)
Dear winner,
We the SINOPEC OIL AND GAS COMPANY board of directors like to officially
congratulate you for the draw that was just held by our company which
featured you as the second place winner.Prizes won : Brand New 2010
Lamborghini Car new model and The Sum Of $570,000.00USD
(United State Dollars) cash.
FILL DETAILs BELOW;
Your Full Name : Address :Country :Phone number :Age :Gender :Occupation :
Yours,
Sinopec Oil And Gas Corp.
^ permalink raw reply [flat|nested] 95+ messages in thread
* RE:
@ 2010-06-05 3:47 MR PETER LUK
0 siblings, 0 replies; 95+ messages in thread
From: MR PETER LUK @ 2010-06-05 3:47 UTC (permalink / raw)
To: info
I have a business proposal to share with you.
^ permalink raw reply [flat|nested] 95+ messages in thread
* RE;
@ 2010-04-02 23:17 Mrs Claire page
0 siblings, 0 replies; 95+ messages in thread
From: Mrs Claire page @ 2010-04-02 23:17 UTC (permalink / raw)
I am Mrs Claire page,contact my lawyer(barlandon_watson@gala.net)
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re:
@ 2005-11-15 9:20 yuki
0 siblings, 0 replies; 95+ messages in thread
From: yuki @ 2005-11-15 9:20 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]
®«S«³«¿««g«¢«ú«è«
ª®ª®ª®ª®ª®ª®ª®ª®ª®
@@@@@@@@¤¤¤¤¤¤
http://www.checkcheck-zero.net/?id=pc120
üïï^Nïï
[óMM
zÌè^²ßõ
Ê^^®æÌo^{
Z^AhX^dbÔÌð·
j««ÆàÉ®S³¿ÅSIJp¸¯Ü·B
http://www.checkcheck-zero.net/?id=pc120
ÀSTCgé¾
EEEcªªªªªªªªªªªªªªªªªªªªªªªªª
u[[ÍX|T[TCgl©çÌL¿ÌÝÅ^cµÄ¨èÜ·B
»Ì×AST[rXð®S³¿ÅSIJp¸¯Ü·B
zÌèðßéûXÉÀSÆMðæêÉl¦ÈªçA
Cyɨg¢¸¯éT[rXðÚwµA
SÌT|[ģÅFlÉÁ½¨èTµð¨è`¢µÄ¨èÜ·B
ªªªªªªªªªªªªªªªªªªªªªªªªªcEEE
http://www.checkcheck-zero.net/?id=pc120
--
zMÛF
kissme_rej-OKxsdJkEjlFWk0Htik3J/w@public.gmane.org
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
^ permalink raw reply [flat|nested] 95+ messages in thread* Re:
@ 2005-07-05 23:28 =?ISO-2022-JP?B?GyRCJCpKdSU1ITwlQRsoQiA8b3Rha2FyYWdldHRlckB5YWhvby5jb20+?=
0 siblings, 0 replies; 95+ messages in thread
From: =?ISO-2022-JP?B?GyRCJCpKdSU1ITwlQRsoQiA8b3Rha2FyYWdldHRlckB5YWhvby5jb20+?= @ 2005-07-05 23:28 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
nkEqå¶ElÈÌvCx[gGb`ÉüI
ÞÌOKðàçÁÄBeII
¢«ÈèÌJüɬ·éÞ½¿BB
µ©àvCÉàüAÞÌ©ÂßéOÅ©mçÊj½¿ðó¯üêéÌq¥¥¥B
µ©µ¾ñ¾ñAÞ½¿ÌÌðõ´ªïÝÝnß饥¥
http://hamex.tv/index2.php?35
ÞÈOðmçÈ©Á½ÌqàAiÆÍá¤vCÉ©ªðYêÄõ´ðß饥¥B
flÈçÅÍÌvZūȢANVÉå»±Ôá¢ÈµÅ·BBB
»µÄÅãÍ¥¥¥
http://hamex.tv/index2.php?35
NSLSRJGIOJ
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re:
@ 2004-07-19 7:29 Mj
0 siblings, 0 replies; 95+ messages in thread
From: Mj @ 2004-07-19 7:29 UTC (permalink / raw)
To: Acpi-devel
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
------------------ Virus Warning Message (on the network)
Found virus WORM_BAGLE.AG in file Garry.com
The file Garry.com can not be moved because /var/quarantine/virus/virJWWjgUxMt: No space left on device.
This is a machine-generated message, please do not reply via e-mail. If you have questions, please contact the Lucent Help Desk at +1 888 300 0770.
---------------------------------------------------------
[-- Attachment #2: Type: text/html, Size: 53 bytes --]
[-- Attachment #3: Type: text/plain, Size: 179 bytes --]
------------------ Virus Warning Message (on the network)
Garry.com is removed from here because it contains a virus.
---------------------------------------------------------
^ permalink raw reply [flat|nested] 95+ messages in thread
* Re:
@ 2004-07-19 4:53 Mj
0 siblings, 0 replies; 95+ messages in thread
From: Mj @ 2004-07-19 4:53 UTC (permalink / raw)
To: Acpi-devel
[-- Attachment #1: Type: text/plain, Size: 413 bytes --]
------------------ Virus Warning Message (on the network)
Found virus WORM_BAGLE.AG in file Dog.exe
The file Dog.exe can not be moved because /var/quarantine/virus/virAIFT6oWfZ: No space left on device.
This is a machine-generated message, please do not reply via e-mail. If you have questions, please contact the Lucent Help Desk at +1 888 300 0770.
---------------------------------------------------------
[-- Attachment #2: Type: text/html, Size: 49 bytes --]
[-- Attachment #3: Type: text/plain, Size: 177 bytes --]
------------------ Virus Warning Message (on the network)
Dog.exe is removed from here because it contains a virus.
---------------------------------------------------------
^ permalink raw reply [flat|nested] 95+ messages in thread
[parent not found: <200402040504.i1454nSA026612@dcs-server4.cs.uiuc.edu>]
* Re:
@ 2003-01-03 8:43 hotdi-049YEbzBPRy2DcrEJY9i8Q
0 siblings, 0 replies; 95+ messages in thread
From: hotdi-049YEbzBPRy2DcrEJY9i8Q @ 2003-01-03 8:43 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
confirm 191616
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 95+ messages in thread
end of thread, other threads:[~2021-11-25 15:03 UTC | newest]
Thread overview: 95+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-18 6:12 [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Taku Izumi
2012-09-18 6:19 ` [PATCH v3 1/8] ACPI, PCI: Use normal list for struct acpi_pci_driver Taku Izumi
2012-09-18 6:20 ` [PATCH v3 2/8] ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges Taku Izumi
2012-09-18 6:21 ` [PATCH v3 3/8] ACPI, PCI: add acpi_pci_drivers protection Taku Izumi
2012-09-18 6:22 ` [PATCH v3 4/8] ACPI, PCI: change acpi_pci_drivers' add/remove interface Taku Izumi
2012-09-19 22:46 ` Bjorn Helgaas
2012-09-20 10:15 ` Taku Izumi
2012-09-21 7:03 ` [PATCH] change signature of walk_root_bridge() function Taku Izumi
2012-09-21 13:24 ` Bjorn Helgaas
2012-09-18 6:23 ` [PATCH v3 5/8] ACPI, PCI: change acpi_pci_find_root implementation Taku Izumi
2012-09-19 22:03 ` Bjorn Helgaas
2012-09-21 7:14 ` Taku Izumi
2012-09-21 17:57 ` Bjorn Helgaas
2012-09-18 6:24 ` [PATCH v3 6/8] ACPI, PCI: add acpi_pci_roots protection Taku Izumi
2012-09-20 19:32 ` Bjorn Helgaas
2012-09-18 6:25 ` [PATCH v3 7/8] ACPI, PCI: add hostbridge removal function Taku Izumi
2012-09-21 20:09 ` Bjorn Helgaas
2012-09-27 16:48 ` Bjorn Helgaas
2012-09-27 17:23 ` Yinghai Lu
2012-09-27 17:59 ` Yinghai Lu
2012-09-27 18:44 ` Bjorn Helgaas
2012-09-27 20:17 ` Yinghai Lu
2012-09-28 16:07 ` Bjorn Helgaas
2012-09-28 16:19 ` Yinghai Lu
2012-09-28 19:44 ` Bjorn Helgaas
2012-09-28 0:15 ` Taku Izumi
2012-09-28 0:23 ` Bjorn Helgaas
2012-09-28 14:16 ` Bjorn Helgaas
2012-09-28 9:46 ` Taku Izumi
2012-10-30 4:02 ` Bjorn Helgaas
2012-10-30 17:42 ` (unknown), Yinghai Lu
2012-10-30 17:42 ` [PATCH 1/8] PCI: Separate out pci_assign_unassigned_bus_resources() Yinghai Lu
2012-10-30 17:42 ` [PATCH 2/8] PCI: Move pci_rescan_bus() back to probe.c Yinghai Lu
2012-10-30 17:42 ` [PATCH 3/8] PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res Yinghai Lu
2012-11-02 10:02 ` Taku Izumi
2012-11-02 14:56 ` Yinghai Lu
2012-10-30 17:42 ` [PATCH 4/8] PCI, ACPI: assign unassigned resource for hot add root bus Yinghai Lu
2012-10-30 17:42 ` [PATCH 5/8] PCI: Add pci_stop/remove_root_bus() Yinghai Lu
2012-10-30 17:42 ` [PATCH 6/8] PCI, ACPI: Make acpi_pci_root_remove stop/remove pci root bus Yinghai Lu
2012-10-30 17:42 ` [PATCH 7/8] PCI, ACPI: delete root bus prt during hot remove path Yinghai Lu
2012-10-30 17:42 ` [PATCH 8/8] PCI, ACPI: remove acpi_root_driver in reserse order Yinghai Lu
2012-11-02 0:17 ` Rafael J. Wysocki
2012-11-05 22:27 ` Re: Bjorn Helgaas
2012-11-05 22:49 ` Re: Yinghai Lu
2012-11-06 5:03 ` Taku Izumi
2012-11-04 4:39 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add root bus Yinghai Lu
2012-11-04 4:39 ` [PATCH 1/8] PCI, x86: Separate out pcibios_allocate_bridge_resources() Yinghai Lu
2012-11-04 4:39 ` [PATCH 2/8] PCI, x86: Separate out pcibios_allocate_dev_resources() Yinghai Lu
2012-11-04 4:39 ` [PATCH 3/8] PCI, x86: Let pcibios_allocate_bus_resources() take bus instead Yinghai Lu
2012-11-04 4:39 ` [PATCH 4/8] PCI, x86: Separate out rom resource claim Yinghai Lu
2012-11-04 4:39 ` [PATCH 5/8] PCI, x86: Add pcibios_fw_addr_done Yinghai Lu
2012-11-04 4:39 ` [PATCH 6/8] PCI, x86: Remove __init for hw/fw allocated functions Yinghai Lu
2012-11-04 4:39 ` [PATCH 7/8] PCI, x86: Claim FW allocated resources in hot add path Yinghai Lu
2012-11-04 4:39 ` [PATCH 8/8] PCI, ACPI: reserve fw allocated resource for hot added root bus Yinghai Lu
2012-12-07 7:15 ` [PATCH 0/8] PCI, ACPI, x86: Reserve fw allocated resource for hot-add " Yinghai Lu
2013-01-07 23:49 ` Bjorn Helgaas
2013-01-08 17:57 ` Bjorn Helgaas
2013-01-08 18:27 ` Yinghai Lu
2013-01-09 17:35 ` Bjorn Helgaas
2013-01-09 17:53 ` Yinghai Lu
2013-01-09 18:39 ` Bjorn Helgaas
2013-01-09 19:01 ` Yinghai Lu
2013-01-09 20:10 ` Rafael J. Wysocki
2013-01-10 0:34 ` Bjorn Helgaas
2013-01-10 13:07 ` Rafael J. Wysocki
2013-01-10 14:49 ` Bjorn Helgaas
2013-01-09 20:59 ` Benjamin Herrenschmidt
2013-07-02 21:31 ` Bjorn Helgaas
2013-07-02 22:55 ` Yinghai Lu
2012-09-18 6:26 ` [PATCH v3 8/8] ACPI, PCI: add resoruce-assign code for devices under hot-added hostbridge Taku Izumi
2012-09-20 5:41 ` Yinghai Lu
2012-09-23 22:48 ` Yinghai Lu
2012-09-28 9:48 ` Taku Izumi
2012-09-18 18:41 ` [PATCH v3 0/6] acpi,pci: hostbridge hotplug support Yinghai Lu
2012-09-18 18:57 ` Yinghai Lu
2012-09-19 4:53 ` Taku Izumi
2012-09-20 6:19 ` Yinghai Lu
2012-09-19 0:50 ` Jiang Liu
-- strict thread matches above, loose matches on Subject: below --
2021-11-02 9:48 [PATCH v5 00/11] Add support for X86/ACPI camera sensor/PMIC setup with clk and regulator platform data Hans de Goede
2021-11-02 9:49 ` [PATCH v5 05/11] clk: Introduce clk-tps68470 driver Hans de Goede
[not found] ` <163588780885.2993099.2088131017920983969@swboyd.mtv.corp.google.com>
2021-11-25 15:01 ` Hans de Goede
2017-11-13 14:55 Re: Amos Kalonzo
2017-05-03 6:23 Re: H.A
2017-02-23 15:09 Qin's Yanjun
2013-12-21 16:48 (unknown), Alex Barattini
2013-12-23 1:44 ` Aaron Lu
2013-12-23 16:24 ` Re: Alex Barattini
2011-05-01 13:35 Re: lotto
2010-09-28 12:23 Re: Marc Ferland
2010-07-17 2:41 Re: SINOPEC OIL AND GAS COMPANY
2010-06-05 3:47 MR PETER LUK
2010-04-02 23:17 RE; Mrs Claire page
2005-11-15 9:20 yuki
2005-07-05 23:28 Re: =?ISO-2022-JP?B?GyRCJCpKdSU1ITwlQRsoQiA8b3Rha2FyYWdldHRlckB5YWhvby5jb20+?=
2004-07-19 7:29 Re: Mj
2004-07-19 4:53 Re: Mj
[not found] <200402040504.i1454nSA026612@dcs-server4.cs.uiuc.edu>
[not found] ` <200402040504.i1454nSA026612-X7uhcDA/9l0r6e4dAyNacUYNSvWw4lR0@public.gmane.org>
2004-02-04 5:04 ` Re: Design Patterns Source reflector
2003-01-03 8:43 Re: hotdi-049YEbzBPRy2DcrEJY9i8Q
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).