[PATCH 08/18 v2] powerpc: Do not probe PCI buses or eBus devices if CMO is enabled
Robert Jennings
rcj at linux.vnet.ibm.com
Thu Jun 26 06:17:21 EST 2008
From: Brian King <brking at linux.vnet.ibm.com>
The Cooperative Memory Overcommit (CMO) on System p does not currently
support native PCI devices or eBus devices when enabled. Prevent
PCI bus probe and eBus device probe if the feature is enabled.
Signed-off-by: Brian King <brking at linux.vnet.ibm.com>
Signed-off-by: Robert Jennings <rcj at linux.vnet.ibm.com>
---
arch/powerpc/kernel/ibmebus.c | 6 ++++++
arch/powerpc/platforms/pseries/setup.c | 4 ++++
2 files changed, 10 insertions(+)
Index: b/arch/powerpc/kernel/ibmebus.c
===================================================================
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -45,6 +45,7 @@
#include <linux/of_platform.h>
#include <asm/ibmebus.h>
#include <asm/abs_addr.h>
+#include <asm/firmware.h>
static struct device ibmebus_bus_device = { /* fake "parent" device */
.bus_id = "ibmebus",
@@ -332,6 +333,11 @@ static int __init ibmebus_bus_init(void)
{
int err;
+ if (firmware_has_feature(FW_FEATURE_CMO)) {
+ printk(KERN_WARNING "Not probing eBus since CMO is enabled\n");
+ return 0;
+ }
+
printk(KERN_INFO "IBM eBus Device Driver\n");
err = of_bus_type_init(&ibmebus_bus_type, "ibmebus");
Index: b/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -539,6 +539,10 @@ static void pseries_shared_idle_sleep(vo
static int pSeries_pci_probe_mode(struct pci_bus *bus)
{
+ if (firmware_has_feature(FW_FEATURE_CMO)) {
+ dev_warn(&bus->dev, "Not probing PCI bus since CMO is enabled\n");
+ return PCI_PROBE_NONE;
+ }
if (firmware_has_feature(FW_FEATURE_LPAR))
return PCI_PROBE_DEVTREE;
return PCI_PROBE_NORMAL;
More information about the Linuxppc-dev
mailing list