2008-11-10 22:30:51

by Andrew Patterson

[permalink] [raw]
Subject: [PATCH v4 0/7] call _OSC support during root bridge discovery

This is v4 of the "call _OSC support during root bridge discovery"
patchset.

We now call pci_acpi_osc_support() twice during
acpi_pci_root_add(). Once at the beginning with a default flag
OSC_PCI_SEGMENT_GROUPS_SUPPORT set since we need this to evaluate _SEG
and _BBN. And once again after the bus is scanned to set all the other
_OSC flags. The second call is performed after all PCI quirks are
finished.


I recently reported a problem where a machine with close to a 100 PCIe
root bridges was taking half an hour to just call _OSC. The root
cause is the AER code calling:

pcie_osc_support_set(OSC_EXT_PCI_CONFIG_SUPPORT);

for each bridge. The pcie_osc_support_set() function also iterates
over each bridge, so _OSC is called a quadratic number of times.

One solution to this problem would be to just move the call to
pcie_osc_support_set() to aer_service_init(), so _OSC support is only
called on each bridge once.

Matthew Wilcox came up with a better solution. He says "Why should a
driver be calling pcie_osc_support_set() anyway? This is something
the PCI core should be taking care of for it."

Matthew provided a patch for this solution that I massaged into the
following patch series.

It creates a new function (pci_acpi_osc_support()) which is called
from pci_root.c before we call any other methods on the device (as
recommended by the ACPI spec). Since we know what capabilities the
system supports, individual modules do not now need to inform the core
of their support for various capabilities.

Some work that still needs to be done (provided by Matthew):

o All the existing _OSC code should be moved from pci-acpi.c to
pci_root.c. I also think the acpi_osc_data should be made part of
the acpi_pci_root struct, eliminating a separate allocation.

o We could also use an interface that iterates over all existing
busses calling _OSC with new flags. Shouldn't be hard, once it's
integrated into pci_root.c.

o Further ahead, we don't actually check that the bits we asked for
(in 'control') were actually granted to us. The PCI firmware spec
is quite explicit about interdependencies amongst the bits.

o We also need to re-evaluate _OSC when coming out of S4.

This patch series duplicates currently functionality while removing
our quadratic problem. I believe that it can be applied now while the
above new functionality can be implemented some time in the future.

This patch series applies to the linux-next branch of pci-2.6 git
repository. I expect it will also work with linux-next.

Diff stats:

arch/x86/pci/common.c | 8 +++++++
drivers/acpi/pci_root.c | 20 +++++++++++++++++++
drivers/pci/msi.c | 31 ++++++++++-------------------
drivers/pci/pci-acpi.c | 37 ++++++++++++-----------------------
drivers/pci/pci.c | 15 ++++++++++++-
drivers/pci/pci.h | 2 -
drivers/pci/pcie/aer/aerdrv_acpi.c | 1 -
drivers/pci/pcie/aspm.c | 27 ++++++++-----------------
include/linux/pci-acpi.h | 14 ++----------
include/linux/pci.h | 16 +++++++++++++++
10 files changed, 93 insertions(+), 78 deletions(-)

Commits:

- Include missing acpi.h file in pci-acpi.h.
- Call _OSC support during root bridge discovery.
- PCI extended config _OSC support called when root bridge added.
- PCIe ASPM _OSC support capabilities called when root bridge added.
- PCIe AER _OSC support capabilities called when root bridge added.
- PCI MSI _OSC support capabilities called when root bridge added.
- Remove obsolete _OSC capability support functions.

--
Andrew Patterson


2008-11-10 22:31:19

by Andrew Patterson

[permalink] [raw]
Subject: [PATCH 1/7] PCI, ACPI: include missing acpi.h file in pci-acpi.h.

PCI, ACPI: include missing acpi.h file in pci-acpi.h.

The pci-acpi.h file will not compile without including linux/acpi.h.

Signed-off-by: Matthew Wilcox <[email protected]>
---

diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 8837928..a9e4c34 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -8,6 +8,8 @@
#ifndef _PCI_ACPI_H_
#define _PCI_ACPI_H_

+#include <linux/acpi.h>
+
#define OSC_QUERY_TYPE 0
#define OSC_SUPPORT_TYPE 1
#define OSC_CONTROL_TYPE 2

2008-11-10 22:31:38

by Andrew Patterson

[permalink] [raw]
Subject: [PATCH 2/7] ACPI, PCI: call _OSC support during root bridge discovery

ACPI, PCI: call _OSC support during root bridge discovery

Added pci_acpi_osc_support() which is called when a PCI bridge is
added, so individual PCI root bridge drivers do not have to call _OSC
support for every root bridge in their probe functions.

Signed-off-by: Matthew Wilcox <[email protected]>
---

diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 1b8f67d..7ca153e 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -31,6 +31,7 @@
#include <linux/spinlock.h>
#include <linux/pm.h>
#include <linux/pci.h>
+#include <linux/pci-acpi.h>
#include <linux/acpi.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
@@ -193,6 +194,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
unsigned long long value = 0;
acpi_handle handle = NULL;
struct acpi_device *child;
+ u32 flags;


if (!device)
@@ -210,6 +212,13 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)

device->ops.bind = acpi_pci_bind;

+ /*
+ * All supported architectures that use ACPI have support for
+ * PCI domains, so we indicate this in _OSC support capabilities.
+ */
+ flags = OSC_PCI_SEGMENT_GROUPS_SUPPORT;
+ pci_acpi_osc_support(device->handle, flags);
+
/*
* Segment
* -------
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index dfe7c8e..f457387 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -139,28 +139,42 @@ static acpi_status __acpi_query_osc(u32 flags, struct acpi_osc_data *osc_data,
return status;
}

-static acpi_status acpi_query_osc(acpi_handle handle,
- u32 level, void *context, void **retval)
+/*
+ * pci_acpi_osc_support: Invoke _OSC indicating support for the given feature
+ * @flags: Bitmask of flags to support
+ *
+ * See the ACPI spec for the definition of the flags
+ */
+int pci_acpi_osc_support(acpi_handle handle, u32 flags)
{
+ u32 dummy;
acpi_status status;
- struct acpi_osc_data *osc_data;
- u32 flags = (unsigned long)context, dummy;
acpi_handle tmp;
+ struct acpi_osc_data *osc_data;
+ int rc = 0;

status = acpi_get_handle(handle, "_OSC", &tmp);
if (ACPI_FAILURE(status))
- return AE_OK;
+ return -ENOTTY;

mutex_lock(&pci_acpi_lock);
osc_data = acpi_get_osc_data(handle);
if (!osc_data) {
printk(KERN_ERR "acpi osc data array is full\n");
+ rc = -ENOMEM;
goto out;
}

__acpi_query_osc(flags, osc_data, &dummy);
out:
mutex_unlock(&pci_acpi_lock);
+ return rc;
+}
+
+static acpi_status acpi_query_osc(acpi_handle handle, u32 level,
+ void *context, void **retval)
+{
+ pci_acpi_osc_support(handle, (unsigned long)context);
return AE_OK;
}

diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index a9e4c34..424f06f 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -51,6 +51,7 @@
#ifdef CONFIG_ACPI
extern acpi_status pci_osc_control_set(acpi_handle handle, u32 flags);
extern acpi_status __pci_osc_support_set(u32 flags, const char *hid);
+int pci_acpi_osc_support(acpi_handle handle, u32 flags);
static inline acpi_status pci_osc_support_set(u32 flags)
{
return __pci_osc_support_set(flags, PCI_ROOT_HID_STRING);

2008-11-10 22:32:19

by Andrew Patterson

[permalink] [raw]
Subject: [PATCH 4/7] ACPI, PCI: PCIe ASPM _OSC support capabilities called when root bridge added

ACPI, PCI: PCIe ASPM _OSC support capabilities called when root bridge added

The _OSC capabilities OSC_ACTIVE_STATE_PWR_SUPPORT and
OSC_CLOCK_PWR_CAPABILITY_SUPPORT are set when the root bridge is added
with pci_acpi_osc_support(), so we no longer need to do it in the
ASPM driver.

Added the function pcie_aspm_enabled, which returns true if pcie_aspm=off
is not on the kernel command-line.

Signed-off-by: Andrew Patterson <[email protected]>
---

diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 191a510..a7068b4 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -347,6 +347,9 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
/* Indicate support for various _OSC capabilities. */
if (pci_ext_cfg_avail(root->bus->self))
flags |= OSC_EXT_PCI_CONFIG_SUPPORT;
+ if (pcie_aspm_enabled())
+ flags |= OSC_ACTIVE_STATE_PWR_SUPPORT |
+ OSC_CLOCK_PWR_CAPABILITY_SUPPORT;
if (flags != base_flags)
pci_acpi_osc_support(device->handle, flags);

diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 8f63f4c..1089f86 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -834,24 +834,15 @@ void pcie_no_aspm(void)
aspm_disabled = 1;
}

-#ifdef CONFIG_ACPI
-#include <acpi/acpi_bus.h>
-#include <linux/pci-acpi.h>
-static void pcie_aspm_platform_init(void)
-{
- pcie_osc_support_set(OSC_ACTIVE_STATE_PWR_SUPPORT|
- OSC_CLOCK_PWR_CAPABILITY_SUPPORT);
-}
-#else
-static inline void pcie_aspm_platform_init(void) { }
-#endif
-
-static int __init pcie_aspm_init(void)
+/**
+ * pcie_aspm_enabled - is PCIe ASPM enabled?
+ *
+ * Returns true if ASPM has not been disabled by the command-line option
+ * pcie_aspm=off.
+ **/
+int pcie_aspm_enabled(void)
{
- if (aspm_disabled)
- return 0;
- pcie_aspm_platform_init();
- return 0;
+ return !aspm_disabled;
}
+EXPORT_SYMBOL(pcie_aspm_enabled);

-fs_initcall(pcie_aspm_init);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index c5d40ba..bdaf221 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -786,6 +786,15 @@ extern void msi_remove_pci_irq_vectors(struct pci_dev *dev);
extern void pci_restore_msi_state(struct pci_dev *dev);
#endif

+#ifndef CONFIG_PCIEASPM
+static inline int pcie_aspm_enabled(void)
+{
+ return 0;
+}
+#else
+extern int pcie_aspm_enabled(void);
+#endif
+
#ifdef CONFIG_HT_IRQ
/* The functions a driver should call */
int ht_create_irq(struct pci_dev *dev, int idx);

2008-11-10 22:32:34

by Andrew Patterson

[permalink] [raw]
Subject: [PATCH 5/7] ACPI, PCI: PCIe AER _OSC support capabilities called when root bridge added

ACPI, PCI: PCIe AER _OSC support capabilities called when root bridge added

The _OSC capability OSC_EXT_PCI_CONFIG_SUPPORT is set when the root
bridge is added with pci_acpi_osc_support(), so we no longer need to do
it in the PCIe AER driver.

Signed-off-by: Andrew Patterson <[email protected]>
---

diff --git a/drivers/pci/pcie/aer/aerdrv_acpi.c b/drivers/pci/pcie/aer/aerdrv_acpi.c
index 6dd7b13..ebce26c 100644
--- a/drivers/pci/pcie/aer/aerdrv_acpi.c
+++ b/drivers/pci/pcie/aer/aerdrv_acpi.c
@@ -38,7 +38,6 @@ int aer_osc_setup(struct pcie_device *pciedev)

handle = acpi_find_root_bridge_handle(pdev);
if (handle) {
- pcie_osc_support_set(OSC_EXT_PCI_CONFIG_SUPPORT);
status = pci_osc_control_set(handle,
OSC_PCI_EXPRESS_AER_CONTROL |
OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL);

2008-11-10 22:32:51

by Andrew Patterson

[permalink] [raw]
Subject: [PATCH 3/7] ACPI, PCI: PCI extended config _OSC support called when root bridge added

ACPI, PCI: PCI extended config _OSC support called when root bridge added

The _OSC capability OSC_EXT_PCI_CONFIG_SUPPORT is set when the root bridge
is added with pci_acpi_osc_support() if we can access PCI extended
config space.

Added the function pci_ext_cfg_avail which returns true if we can
access PCI extended config space (offset greater than 0xff). It
currently only returns false if arch=x86 and raw_pci_ext_ops is not set
(which might happen if pci=nommcfg is set on the kernel command-line).

Signed-off-by: Andrew Patterson <[email protected]>
---

diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index b67732b..bf017bb 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -546,6 +546,14 @@ void pcibios_disable_device (struct pci_dev *dev)
pcibios_disable_irq(dev);
}

+int pci_ext_cfg_avail(struct pci_dev *dev)
+{
+ if (raw_pci_ext_ops)
+ return 1;
+ else
+ return 0;
+}
+
struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
{
struct pci_bus *bus = NULL;
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 7ca153e..191a510 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -194,7 +194,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
unsigned long long value = 0;
acpi_handle handle = NULL;
struct acpi_device *child;
- u32 flags;
+ u32 flags, base_flags;


if (!device)
@@ -216,7 +216,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
* All supported architectures that use ACPI have support for
* PCI domains, so we indicate this in _OSC support capabilities.
*/
- flags = OSC_PCI_SEGMENT_GROUPS_SUPPORT;
+ flags = base_flags = OSC_PCI_SEGMENT_GROUPS_SUPPORT;
pci_acpi_osc_support(device->handle, flags);

/*
@@ -344,6 +344,12 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
list_for_each_entry(child, &device->children, node)
acpi_pci_bridge_scan(child);

+ /* Indicate support for various _OSC capabilities. */
+ if (pci_ext_cfg_avail(root->bus->self))
+ flags |= OSC_EXT_PCI_CONFIG_SUPPORT;
+ if (flags != base_flags)
+ pci_acpi_osc_support(device->handle, flags);
+
end:
if (result) {
if (!list_empty(&root->node))
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 21f2ac6..70a8c74 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2029,6 +2029,19 @@ static void __devinit pci_no_domains(void)
#endif
}

+/**
+ * pci_ext_cfg_enabled - can we access extended PCI config space?
+ * @dev: The PCI device of the root bridge.
+ *
+ * Returns 1 if we can access PCI extended config space (offsets
+ * greater than 0xff). This is the default implementation. Architecture
+ * implementations can override this.
+ */
+int __attribute__ ((weak)) pci_ext_cfg_avail(struct pci_dev *dev)
+{
+ return 1;
+}
+
static int __devinit pci_init(void)
{
struct pci_dev *dev = NULL;
diff --git a/include/linux/pci.h b/include/linux/pci.h
index c75b82b..c5d40ba 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1135,6 +1135,8 @@ static inline void pci_mmcfg_early_init(void) { }
static inline void pci_mmcfg_late_init(void) { }
#endif

+int pci_ext_cfg_avail(struct pci_dev *dev);
+
#ifdef CONFIG_HAS_IOMEM
static inline void * pci_ioremap_bar(struct pci_dev *pdev, int bar)
{

2008-11-10 22:33:16

by Andrew Patterson

[permalink] [raw]
Subject: [PATCH 6/7] ACPI, PCI: PCI MSI _OSC support capabilities called when root bridge added

ACPI, PCI: PCI MSI _OSC support capabilities called when root bridge added

The _OSC capability OSC_MSI_SUPPORT is set when the root
bridge is added with pci_acpi_osc_support(), so we no longer
need to do it in the PCI MSI driver.

Added the function pci_msi_enabled, which returns true if pci=nomsi is not
on the kernel command-line.

Signed-off-by: Andrew Patterson <[email protected]>
---

diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index a7068b4..cffea3c 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -350,6 +350,8 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
if (pcie_aspm_enabled())
flags |= OSC_ACTIVE_STATE_PWR_SUPPORT |
OSC_CLOCK_PWR_CAPABILITY_SUPPORT;
+ if (pci_msi_enabled())
+ flags |= OSC_MSI_SUPPORT;
if (flags != base_flags)
pci_acpi_osc_support(device->handle, flags);

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 74801f7..0e8dae1 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -755,28 +755,19 @@ void pci_no_msi(void)
pci_msi_enable = 0;
}

-void pci_msi_init_pci_dev(struct pci_dev *dev)
-{
- INIT_LIST_HEAD(&dev->msi_list);
-}
-
-#ifdef CONFIG_ACPI
-#include <linux/acpi.h>
-#include <linux/pci-acpi.h>
-static void __devinit msi_acpi_init(void)
+/**
+ * pci_msi_enabled - is MSI enabled?
+ *
+ * Returns true if MSI has not been disabled by the command-line option
+ * pci=nomsi.
+ **/
+int pci_msi_enabled(void)
{
- if (acpi_pci_disabled)
- return;
- pci_osc_support_set(OSC_MSI_SUPPORT);
- pcie_osc_support_set(OSC_MSI_SUPPORT);
+ return pci_msi_enable;
}
-#else
-static inline void msi_acpi_init(void) { }
-#endif /* CONFIG_ACPI */
+EXPORT_SYMBOL(pci_msi_enabled);

-void __devinit msi_init(void)
+void pci_msi_init_pci_dev(struct pci_dev *dev)
{
- if (!pci_msi_enable)
- return;
- msi_acpi_init();
+ INIT_LIST_HEAD(&dev->msi_list);
}
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 70a8c74..1c60531 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2050,8 +2050,6 @@ static int __devinit pci_init(void)
pci_fixup_device(pci_fixup_final, dev);
}

- msi_init();
-
return 0;
}

diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index d3e65e2..9162e24 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -102,11 +102,9 @@ extern unsigned int pci_pm_d3_delay;
#ifdef CONFIG_PCI_MSI
void pci_no_msi(void);
extern void pci_msi_init_pci_dev(struct pci_dev *dev);
-extern void __devinit msi_init(void);
#else
static inline void pci_no_msi(void) { }
static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { }
-static inline void msi_init(void) { }
#endif

#ifdef CONFIG_PCIEAER
diff --git a/include/linux/pci.h b/include/linux/pci.h
index bdaf221..163dd9f 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -774,6 +774,10 @@ static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev)

static inline void pci_restore_msi_state(struct pci_dev *dev)
{ }
+static inline int pci_msi_enabled(void)
+{
+ return 0;
+}
#else
extern int pci_enable_msi(struct pci_dev *dev);
extern void pci_msi_shutdown(struct pci_dev *dev);
@@ -784,6 +788,7 @@ extern void pci_msix_shutdown(struct pci_dev *dev);
extern void pci_disable_msix(struct pci_dev *dev);
extern void msi_remove_pci_irq_vectors(struct pci_dev *dev);
extern void pci_restore_msi_state(struct pci_dev *dev);
+extern int pci_msi_enabled(void);
#endif

#ifndef CONFIG_PCIEASPM

2008-11-10 22:33:37

by Andrew Patterson

[permalink] [raw]
Subject: [PATCH 7/7] PCI, ACPI: remove obsolete _OSC capability support functions

PCI, ACPI: remove obsolete _OSC capability support functions

The acpi_query_osc, __pci_osc_support_set, pci_osc_support_set, and
pcie_osc_support_set functions have been obsoleted in favor of setting
these capabilities during root bridge discovery with pci_acpi_osc_support.
There are no longer any callers of these functions, so they are removed.

Signed-off-by: Andrew Patterson <[email protected]>
---

diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index f457387..128ce7d 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -171,31 +171,6 @@ out:
return rc;
}

-static acpi_status acpi_query_osc(acpi_handle handle, u32 level,
- void *context, void **retval)
-{
- pci_acpi_osc_support(handle, (unsigned long)context);
- return AE_OK;
-}
-
-/**
- * __pci_osc_support_set - register OS support to Firmware
- * @flags: OS support bits
- * @hid: hardware ID
- *
- * Update OS support fields and doing a _OSC Query to obtain an update
- * from Firmware on supported control bits.
- **/
-acpi_status __pci_osc_support_set(u32 flags, const char *hid)
-{
- if (!(flags & OSC_SUPPORT_MASKS))
- return AE_TYPE;
-
- acpi_get_devices(hid, acpi_query_osc,
- (void *)(unsigned long)flags, NULL);
- return AE_OK;
-}
-
/**
* pci_osc_control_set - commit requested control to Firmware
* @handle: acpi_handle for the target ACPI object
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 424f06f..871e096 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -50,16 +50,7 @@

#ifdef CONFIG_ACPI
extern acpi_status pci_osc_control_set(acpi_handle handle, u32 flags);
-extern acpi_status __pci_osc_support_set(u32 flags, const char *hid);
int pci_acpi_osc_support(acpi_handle handle, u32 flags);
-static inline acpi_status pci_osc_support_set(u32 flags)
-{
- return __pci_osc_support_set(flags, PCI_ROOT_HID_STRING);
-}
-static inline acpi_status pcie_osc_support_set(u32 flags)
-{
- return __pci_osc_support_set(flags, PCI_EXPRESS_ROOT_HID_STRING);
-}
static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
{
/* Find root host bridge */
@@ -76,8 +67,6 @@ typedef u32 acpi_status;
#endif
static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags)
{return AE_ERROR;}
-static inline acpi_status pci_osc_support_set(u32 flags) {return AE_ERROR;}
-static inline acpi_status pcie_osc_support_set(u32 flags) {return AE_ERROR;}
static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
{ return NULL; }
#endif

2008-11-12 20:58:49

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH 2/7] ACPI, PCI: call _OSC support during root bridge discovery

On Monday, November 10, 2008 2:30 pm Andrew Patterson wrote:
> ACPI, PCI: call _OSC support during root bridge discovery
>
> Added pci_acpi_osc_support() which is called when a PCI bridge is
> added, so individual PCI root bridge drivers do not have to call _OSC
> support for every root bridge in their probe functions.
>
> Signed-off-by: Matthew Wilcox <[email protected]>

Applied these first two, I'll be applying the rest shortly.

Thanks,
Jesse

2008-11-12 21:16:00

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH 7/7] PCI, ACPI: remove obsolete _OSC capability support functions

On Monday, November 10, 2008 2:31 pm Andrew Patterson wrote:
> PCI, ACPI: remove obsolete _OSC capability support functions
>
> The acpi_query_osc, __pci_osc_support_set, pci_osc_support_set, and
> pcie_osc_support_set functions have been obsoleted in favor of setting
> these capabilities during root bridge discovery with pci_acpi_osc_support.
> There are no longer any callers of these functions, so they are removed.
>
> Signed-off-by: Andrew Patterson <[email protected]>

Ok, applied the rest too. I'll do a quick test before pushing out the updated
linux-next branch.

Thanks,
Jesse