LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] powerpc/eeh: Handle functional reset on non-PCIe device
From: Richard A Lary @ 2011-04-22 20:00 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: antonb

From: Richard A Lary <rlary@linux.vnet.ibm.com>

  Fundamental reset is an optional reset type supported only by PCIe adapters.
  Handle the unexpected case where a non-PCIe device has requested a
  fundamental reset. Try hot-reset as a fallback to handle this case.

Signed-off-by: Richard A Lary <rlary@linux.vnet.ibm.com>
---
  arch/powerpc/platforms/pseries/eeh.c |   21 	16 +	5 -	0 !
  1 file changed, 16 insertions(+), 5 deletions(-)

Index: b/arch/powerpc/platforms/pseries/eeh.c
===================================================================
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -725,15 +725,26 @@ rtas_pci_slot_reset(struct pci_dn *pdn,
  	if (pdn->eeh_pe_config_addr)
  		config_addr = pdn->eeh_pe_config_addr;

-	rc = rtas_call(ibm_set_slot_reset,4,1, NULL,
+	rc = rtas_call(ibm_set_slot_reset, 4, 1, NULL,
  	               config_addr,
  	               BUID_HI(pdn->phb->buid),
  	               BUID_LO(pdn->phb->buid),
  	               state);
-	if (rc)
-		printk (KERN_WARNING "EEH: Unable to reset the failed slot,"
-		        " (%d) #RST=%d dn=%s\n",
-		        rc, state, pdn->node->full_name);
+
+	/* Fundamental-reset not supported on this PE, try hot-reset */
+	if (rc == -8 && state == 3) {
+		state = 1;
+		rc = rtas_call(ibm_set_slot_reset, 4, 1, NULL,
+			       config_addr,
+			       BUID_HI(pdn->phb->buid),
+			       BUID_LO(pdn->phb->buid),
+			       state);
+		if (rc)
+			printk(KERN_WARNING
+				"EEH: Unable to reset the failed slot,"
+				" (%d) #RST=%d dn=%s\n",
+				rc, state, pdn->node->full_name);
+	}
  }

  /**

^ permalink raw reply

* [PATCH 3/3] powerpc/eeh: Handle functional reset on non-PCIe device
From: Richard A Lary @ 2011-04-22 20:00 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: antonb

From: Richard A Lary <rlary@linux.vnet.ibm.com>

  For adapters which have devices under a PCIe switch/bridge it is informative
  to display information for both the PCIe switch/bridge and the device on
  which the bus error was detected.

Signed-off-by: Richard A Lary <rlary@linux.vnet.ibm.com>
---
  arch/powerpc/platforms/pseries/eeh_driver.c |   24 	14 +	10 -	0 !
  1 file changed, 14 insertions(+), 10 deletions(-)

Index: b/arch/powerpc/platforms/pseries/eeh_driver.c
===================================================================
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -328,7 +328,7 @@ struct pci_dn * handle_eeh_events (struc
  	struct pci_bus *frozen_bus;
  	int rc = 0;
  	enum pci_ers_result result = PCI_ERS_RESULT_NONE;
-	const char *location, *pci_str, *drv_str;
+	const char *location, *pci_str, *drv_str, *bus_pci_str, *bus_drv_str;

  	frozen_dn = find_device_pe(event->dn);
  	if (!frozen_dn) {
@@ -364,22 +364,26 @@ struct pci_dn * handle_eeh_events (struc
  	frozen_pdn = PCI_DN(frozen_dn);
  	frozen_pdn->eeh_freeze_count++;

-	if (frozen_pdn->pcidev) {
-		pci_str = pci_name (frozen_pdn->pcidev);
-		drv_str = pcid_name (frozen_pdn->pcidev);
-	} else {
-		pci_str = eeh_pci_name(event->dev);
-		drv_str = pcid_name (event->dev);
-	}
-	
+	pci_str = eeh_pci_name(event->dev);
+	drv_str = pcid_name(event->dev);
+
  	if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
  		goto excess_failures;

  	printk(KERN_WARNING
  	   "EEH: This PCI device has failed %d times in the last hour:\n",
  		frozen_pdn->eeh_freeze_count);
+
+	if (frozen_pdn->pcidev) {
+		bus_pci_str = pci_name(frozen_pdn->pcidev);
+		bus_drv_str = pcid_name(frozen_pdn->pcidev);
+		printk(KERN_WARNING
+			"EEH: Bus location=%s driver=%s pci addr=%s\n",
+			location, bus_drv_str, bus_pci_str);
+	}
+
  	printk(KERN_WARNING
-		"EEH: location=%s driver=%s pci addr=%s\n",
+		"EEH: Device location=%s driver=%s pci addr=%s\n",
  		location, drv_str, pci_str);

  	/* Walk the various device drivers attached to this slot through

^ permalink raw reply

* [PATCH 3/3] powerpc/eeh: Display eeh error location for bus and device (resend)
From: Richard A Lary @ 2011-04-22 20:08 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: antonb

From: Richard A Lary <rlary@linux.vnet.ibm.com>

  For adapters which have devices under a PCIe switch/bridge it is informative
  to display information for both the PCIe switch/bridge and the device on
  which the bus error was detected.

Signed-off-by: Richard A Lary <rlary@linux.vnet.ibm.com>
---
  arch/powerpc/platforms/pseries/eeh_driver.c |   24 	14 +	10 -	0 !
  1 file changed, 14 insertions(+), 10 deletions(-)

Index: b/arch/powerpc/platforms/pseries/eeh_driver.c
===================================================================
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -328,7 +328,7 @@ struct pci_dn * handle_eeh_events (struc
  	struct pci_bus *frozen_bus;
  	int rc = 0;
  	enum pci_ers_result result = PCI_ERS_RESULT_NONE;
-	const char *location, *pci_str, *drv_str;
+	const char *location, *pci_str, *drv_str, *bus_pci_str, *bus_drv_str;

  	frozen_dn = find_device_pe(event->dn);
  	if (!frozen_dn) {
@@ -364,22 +364,26 @@ struct pci_dn * handle_eeh_events (struc
  	frozen_pdn = PCI_DN(frozen_dn);
  	frozen_pdn->eeh_freeze_count++;

-	if (frozen_pdn->pcidev) {
-		pci_str = pci_name (frozen_pdn->pcidev);
-		drv_str = pcid_name (frozen_pdn->pcidev);
-	} else {
-		pci_str = eeh_pci_name(event->dev);
-		drv_str = pcid_name (event->dev);
-	}
-	
+	pci_str = eeh_pci_name(event->dev);
+	drv_str = pcid_name(event->dev);
+
  	if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
  		goto excess_failures;

  	printk(KERN_WARNING
  	   "EEH: This PCI device has failed %d times in the last hour:\n",
  		frozen_pdn->eeh_freeze_count);
+
+	if (frozen_pdn->pcidev) {
+		bus_pci_str = pci_name(frozen_pdn->pcidev);
+		bus_drv_str = pcid_name(frozen_pdn->pcidev);
+		printk(KERN_WARNING
+			"EEH: Bus location=%s driver=%s pci addr=%s\n",
+			location, bus_drv_str, bus_pci_str);
+	}
+
  	printk(KERN_WARNING
-		"EEH: location=%s driver=%s pci addr=%s\n",
+		"EEH: Device location=%s driver=%s pci addr=%s\n",
  		location, drv_str, pci_str);

  	/* Walk the various device drivers attached to this slot through

^ permalink raw reply

* [PATCH 1/1] powerpc: Add page coalescing support
From: Brian King @ 2011-04-22 21:08 UTC (permalink / raw)
  To: benh; +Cc: brking, linuxppc-dev


Adds support for page coalescing, which is a feature on IBM Power servers
which allows for coalescing identical pages between logical partitions.
Hint text pages as coalesce candidates, since they are the most likely
pages to be able to be coalesced between partitions. This patch also
exports some page coalescing statistics available from firmware via
lparcfg.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---

 arch/powerpc/include/asm/firmware.h         |    3 +-
 arch/powerpc/include/asm/hvcall.h           |   12 ++++++++
 arch/powerpc/include/asm/pSeries_reconfig.h |    6 ++++
 arch/powerpc/kernel/lparcfg.c               |   40 ++++++++++++++++++++++++++++
 arch/powerpc/kernel/prom_init.c             |    4 ++
 arch/powerpc/kernel/rtas.c                  |    2 +
 arch/powerpc/platforms/pseries/lpar.c       |    2 +
 arch/powerpc/platforms/pseries/setup.c      |   11 +++++++
 8 files changed, 78 insertions(+), 2 deletions(-)

diff -puN arch/powerpc/include/asm/hvcall.h~powerpc_coalesce arch/powerpc/include/asm/hvcall.h
--- linux-2.6/arch/powerpc/include/asm/hvcall.h~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
+++ linux-2.6-bjking1/arch/powerpc/include/asm/hvcall.h	2011-04-20 08:38:42.000000000 -0500
@@ -102,6 +102,7 @@
 #define H_ANDCOND		(1UL<<(63-33))
 #define H_ICACHE_INVALIDATE	(1UL<<(63-40))	/* icbi, etc.  (ignored for IO pages) */
 #define H_ICACHE_SYNCHRONIZE	(1UL<<(63-41))	/* dcbst, icbi, etc (ignored for IO pages */
+#define H_COALESCE_CAND	(1UL<<(63-42))	/* page is a good candidate for coalescing */
 #define H_ZERO_PAGE		(1UL<<(63-48))	/* zero the page before mapping (ignored for IO pages) */
 #define H_COPY_PAGE		(1UL<<(63-49))
 #define H_N			(1UL<<(63-61))
@@ -234,6 +235,7 @@
 #define H_GET_MPP		0x2D4
 #define H_HOME_NODE_ASSOCIATIVITY 0x2EC
 #define H_BEST_ENERGY		0x2F4
+#define H_GET_MPP_X		0x314
 #define MAX_HCALL_OPCODE	H_BEST_ENERGY
 
 #ifndef __ASSEMBLY__
@@ -312,6 +314,16 @@ struct hvcall_mpp_data {
 
 int h_get_mpp(struct hvcall_mpp_data *);
 
+struct hvcall_mpp_x_data {
+	unsigned long coalesced_bytes;
+	unsigned long pool_coalesced_bytes;
+	unsigned long pool_purr_cycles;
+	unsigned long pool_spurr_cycles;
+	unsigned long reserved[3];
+};
+
+int h_get_mpp_x(struct hvcall_mpp_x_data *mpp_x_data);
+
 #ifdef CONFIG_PPC_PSERIES
 extern int CMO_PrPSP;
 extern int CMO_SecPSP;
diff -puN arch/powerpc/platforms/pseries/setup.c~powerpc_coalesce arch/powerpc/platforms/pseries/setup.c
--- linux-2.6/arch/powerpc/platforms/pseries/setup.c~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
+++ linux-2.6-bjking1/arch/powerpc/platforms/pseries/setup.c	2011-04-20 08:38:42.000000000 -0500
@@ -403,6 +403,16 @@ static int pseries_set_xdabr(unsigned lo
 #define CMO_CHARACTERISTICS_TOKEN 44
 #define CMO_MAXLENGTH 1026
 
+void pSeries_coalesce_init(void)
+{
+	struct hvcall_mpp_x_data mpp_x_data;
+
+	if (firmware_has_feature(FW_FEATURE_CMO) && !h_get_mpp_x(&mpp_x_data))
+		powerpc_firmware_features |= FW_FEATURE_XCMO;
+	else
+		powerpc_firmware_features &= ~FW_FEATURE_XCMO;
+}
+
 /**
  * fw_cmo_feature_init - FW_FEATURE_CMO is not stored in ibm,hypertas-functions,
  * handle that here. (Stolen from parse_system_parameter_string)
@@ -472,6 +482,7 @@ void pSeries_cmo_feature_init(void)
 		pr_debug("CMO enabled, PrPSP=%d, SecPSP=%d\n", CMO_PrPSP,
 		         CMO_SecPSP);
 		powerpc_firmware_features |= FW_FEATURE_CMO;
+		pSeries_coalesce_init();
 	} else
 		pr_debug("CMO not enabled, PrPSP=%d, SecPSP=%d\n", CMO_PrPSP,
 		         CMO_SecPSP);
diff -puN arch/powerpc/kernel/prom_init.c~powerpc_coalesce arch/powerpc/kernel/prom_init.c
--- linux-2.6/arch/powerpc/kernel/prom_init.c~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
+++ linux-2.6-bjking1/arch/powerpc/kernel/prom_init.c	2011-04-20 08:38:42.000000000 -0500
@@ -676,8 +676,10 @@ static void __init early_cmdline_parse(v
 #endif /* CONFIG_PCI_MSI */
 #ifdef CONFIG_PPC_SMLPAR
 #define OV5_CMO			0x80	/* Cooperative Memory Overcommitment */
+#define OV5_XCMO			0x40	/* Page Coalescing */
 #else
 #define OV5_CMO			0x00
+#define OV5_XCMO			0x00
 #endif
 #define OV5_TYPE1_AFFINITY	0x80	/* Type 1 NUMA affinity */
 
@@ -732,7 +734,7 @@ static unsigned char ibm_architecture_ve
 	OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY |
 	OV5_DONATE_DEDICATE_CPU | OV5_MSI,
 	0,
-	OV5_CMO,
+	OV5_CMO | OV5_XCMO,
 	OV5_TYPE1_AFFINITY,
 	0,
 	0,
diff -puN arch/powerpc/kernel/lparcfg.c~powerpc_coalesce arch/powerpc/kernel/lparcfg.c
--- linux-2.6/arch/powerpc/kernel/lparcfg.c~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
+++ linux-2.6-bjking1/arch/powerpc/kernel/lparcfg.c	2011-04-20 08:38:42.000000000 -0500
@@ -161,6 +161,21 @@ int h_get_mpp(struct hvcall_mpp_data *mp
 }
 EXPORT_SYMBOL(h_get_mpp);
 
+int h_get_mpp_x(struct hvcall_mpp_x_data *mpp_x_data)
+{
+	int rc;
+	unsigned long retbuf[PLPAR_HCALL9_BUFSIZE] = { 0 };
+
+	rc = plpar_hcall9(H_GET_MPP_X, retbuf);
+
+	mpp_x_data->coalesced_bytes = retbuf[0];
+	mpp_x_data->pool_coalesced_bytes = retbuf[1];
+	mpp_x_data->pool_purr_cycles = retbuf[2];
+	mpp_x_data->pool_spurr_cycles = retbuf[3];
+
+	return rc;
+}
+
 struct hvcall_ppp_data {
 	u64	entitlement;
 	u64	unallocated_entitlement;
@@ -345,6 +360,30 @@ static void parse_mpp_data(struct seq_fi
 	seq_printf(m, "backing_memory=%ld bytes\n", mpp_data.backing_mem);
 }
 
+/**
+ * parse_mpp_x_data
+ * Parse out data returned from h_get_mpp_x
+ */
+static void parse_mpp_x_data(struct seq_file *m)
+{
+	struct hvcall_mpp_x_data mpp_x_data;
+
+	if (!firmware_has_feature(FW_FEATURE_XCMO))
+		return;
+	if (h_get_mpp_x(&mpp_x_data))
+		return;
+
+	seq_printf(m, "coalesced_bytes=%ld\n", mpp_x_data.coalesced_bytes);
+
+	if (mpp_x_data.pool_coalesced_bytes)
+		seq_printf(m, "pool_coalesced_bytes=%ld\n",
+			   mpp_x_data.pool_coalesced_bytes);
+	if (mpp_x_data.pool_purr_cycles)
+		seq_printf(m, "coalesce_pool_purr=%ld\n", mpp_x_data.pool_purr_cycles);
+	if (mpp_x_data.pool_spurr_cycles)
+		seq_printf(m, "coalesce_pool_spurr=%ld\n", mpp_x_data.pool_spurr_cycles);
+}
+
 #define SPLPAR_CHARACTERISTICS_TOKEN 20
 #define SPLPAR_MAXLENGTH 1026*(sizeof(char))
 
@@ -520,6 +559,7 @@ static int pseries_lparcfg_data(struct s
 		parse_system_parameter_string(m);
 		parse_ppp_data(m);
 		parse_mpp_data(m);
+		parse_mpp_x_data(m);
 		pseries_cmo_data(m);
 		splpar_dispatch_data(m);
 
diff -puN arch/powerpc/include/asm/firmware.h~powerpc_coalesce arch/powerpc/include/asm/firmware.h
--- linux-2.6/arch/powerpc/include/asm/firmware.h~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
+++ linux-2.6-bjking1/arch/powerpc/include/asm/firmware.h	2011-04-20 08:38:42.000000000 -0500
@@ -47,6 +47,7 @@
 #define FW_FEATURE_BEAT		ASM_CONST(0x0000000001000000)
 #define FW_FEATURE_CMO		ASM_CONST(0x0000000002000000)
 #define FW_FEATURE_VPHN		ASM_CONST(0x0000000004000000)
+#define FW_FEATURE_XCMO		ASM_CONST(0x0000000008000000)
 
 #ifndef __ASSEMBLY__
 
@@ -60,7 +61,7 @@ enum {
 		FW_FEATURE_VIO | FW_FEATURE_RDMA | FW_FEATURE_LLAN |
 		FW_FEATURE_BULK_REMOVE | FW_FEATURE_XDABR |
 		FW_FEATURE_MULTITCE | FW_FEATURE_SPLPAR | FW_FEATURE_LPAR |
-		FW_FEATURE_CMO | FW_FEATURE_VPHN,
+		FW_FEATURE_CMO | FW_FEATURE_VPHN | FW_FEATURE_XCMO,
 	FW_FEATURE_PSERIES_ALWAYS = 0,
 	FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES | FW_FEATURE_LPAR,
 	FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES | FW_FEATURE_LPAR,
diff -puN arch/powerpc/platforms/pseries/lpar.c~powerpc_coalesce arch/powerpc/platforms/pseries/lpar.c
--- linux-2.6/arch/powerpc/platforms/pseries/lpar.c~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
+++ linux-2.6-bjking1/arch/powerpc/platforms/pseries/lpar.c	2011-04-20 08:38:42.000000000 -0500
@@ -329,6 +329,8 @@ static long pSeries_lpar_hpte_insert(uns
 	/* Make pHyp happy */
 	if ((rflags & _PAGE_NO_CACHE) & !(rflags & _PAGE_WRITETHRU))
 		hpte_r &= ~_PAGE_COHERENT;
+	if (firmware_has_feature(FW_FEATURE_XCMO) && !(hpte_r & HPTE_R_N))
+		flags |= H_COALESCE_CAND;
 
 	lpar_rc = plpar_pte_enter(flags, hpte_group, hpte_v, hpte_r, &slot);
 	if (unlikely(lpar_rc == H_PTEG_FULL)) {
diff -puN arch/powerpc/include/asm/pSeries_reconfig.h~powerpc_coalesce arch/powerpc/include/asm/pSeries_reconfig.h
--- linux-2.6/arch/powerpc/include/asm/pSeries_reconfig.h~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
+++ linux-2.6-bjking1/arch/powerpc/include/asm/pSeries_reconfig.h	2011-04-20 08:38:42.000000000 -0500
@@ -14,6 +14,12 @@
 #define PSERIES_DRCONF_MEM_ADD		0x0003
 #define PSERIES_DRCONF_MEM_REMOVE	0x0004
 
+#ifdef CONFIG_PPC_SMLPAR
+extern void pSeries_coalesce_init(void);
+#else
+static inline void pSeries_coalesce_init(void) { }
+#endif
+
 #ifdef CONFIG_PPC_PSERIES
 extern int pSeries_reconfig_notifier_register(struct notifier_block *);
 extern void pSeries_reconfig_notifier_unregister(struct notifier_block *);
diff -puN arch/powerpc/kernel/rtas.c~powerpc_coalesce arch/powerpc/kernel/rtas.c
--- linux-2.6/arch/powerpc/kernel/rtas.c~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
+++ linux-2.6-bjking1/arch/powerpc/kernel/rtas.c	2011-04-20 08:38:42.000000000 -0500
@@ -42,6 +42,7 @@
 #include <asm/time.h>
 #include <asm/mmu.h>
 #include <asm/topology.h>
+#include <asm/pSeries_reconfig.h>
 
 struct rtas_t rtas = {
 	.lock = __ARCH_SPIN_LOCK_UNLOCKED
@@ -731,6 +732,7 @@ static int __rtas_suspend_last_cpu(struc
 
 	atomic_set(&data->error, rc);
 	start_topology_update();
+	pSeries_coalesce_init();
 
 	if (wake_when_done) {
 		atomic_set(&data->done, 1);
_

^ permalink raw reply

* Re: [PATCH 1/1] powerpc: Add page coalescing support
From: Benjamin Herrenschmidt @ 2011-04-22 22:59 UTC (permalink / raw)
  To: Brian King; +Cc: linuxppc-dev
In-Reply-To: <201104222108.p3ML8WQt002094@d03av05.boulder.ibm.com>

On Fri, 2011-04-22 at 16:08 -0500, Brian King wrote:
> Adds support for page coalescing, which is a feature on IBM Power servers
> which allows for coalescing identical pages between logical partitions.
> Hint text pages as coalesce candidates, since they are the most likely
> pages to be able to be coalesced between partitions. This patch also
> exports some page coalescing statistics available from firmware via
> lparcfg.

Hi Brian !

Is this patch different from the version you posted previously which is
already on Patchwork ? I'm in the process of putting together
powerpc-next and your previous variant is in my queue.

Cheers,
Ben.
 
> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
> ---
> 
>  arch/powerpc/include/asm/firmware.h         |    3 +-
>  arch/powerpc/include/asm/hvcall.h           |   12 ++++++++
>  arch/powerpc/include/asm/pSeries_reconfig.h |    6 ++++
>  arch/powerpc/kernel/lparcfg.c               |   40 ++++++++++++++++++++++++++++
>  arch/powerpc/kernel/prom_init.c             |    4 ++
>  arch/powerpc/kernel/rtas.c                  |    2 +
>  arch/powerpc/platforms/pseries/lpar.c       |    2 +
>  arch/powerpc/platforms/pseries/setup.c      |   11 +++++++
>  8 files changed, 78 insertions(+), 2 deletions(-)
> 
> diff -puN arch/powerpc/include/asm/hvcall.h~powerpc_coalesce arch/powerpc/include/asm/hvcall.h
> --- linux-2.6/arch/powerpc/include/asm/hvcall.h~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
> +++ linux-2.6-bjking1/arch/powerpc/include/asm/hvcall.h	2011-04-20 08:38:42.000000000 -0500
> @@ -102,6 +102,7 @@
>  #define H_ANDCOND		(1UL<<(63-33))
>  #define H_ICACHE_INVALIDATE	(1UL<<(63-40))	/* icbi, etc.  (ignored for IO pages) */
>  #define H_ICACHE_SYNCHRONIZE	(1UL<<(63-41))	/* dcbst, icbi, etc (ignored for IO pages */
> +#define H_COALESCE_CAND	(1UL<<(63-42))	/* page is a good candidate for coalescing */
>  #define H_ZERO_PAGE		(1UL<<(63-48))	/* zero the page before mapping (ignored for IO pages) */
>  #define H_COPY_PAGE		(1UL<<(63-49))
>  #define H_N			(1UL<<(63-61))
> @@ -234,6 +235,7 @@
>  #define H_GET_MPP		0x2D4
>  #define H_HOME_NODE_ASSOCIATIVITY 0x2EC
>  #define H_BEST_ENERGY		0x2F4
> +#define H_GET_MPP_X		0x314
>  #define MAX_HCALL_OPCODE	H_BEST_ENERGY
>  
>  #ifndef __ASSEMBLY__
> @@ -312,6 +314,16 @@ struct hvcall_mpp_data {
>  
>  int h_get_mpp(struct hvcall_mpp_data *);
>  
> +struct hvcall_mpp_x_data {
> +	unsigned long coalesced_bytes;
> +	unsigned long pool_coalesced_bytes;
> +	unsigned long pool_purr_cycles;
> +	unsigned long pool_spurr_cycles;
> +	unsigned long reserved[3];
> +};
> +
> +int h_get_mpp_x(struct hvcall_mpp_x_data *mpp_x_data);
> +
>  #ifdef CONFIG_PPC_PSERIES
>  extern int CMO_PrPSP;
>  extern int CMO_SecPSP;
> diff -puN arch/powerpc/platforms/pseries/setup.c~powerpc_coalesce arch/powerpc/platforms/pseries/setup.c
> --- linux-2.6/arch/powerpc/platforms/pseries/setup.c~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
> +++ linux-2.6-bjking1/arch/powerpc/platforms/pseries/setup.c	2011-04-20 08:38:42.000000000 -0500
> @@ -403,6 +403,16 @@ static int pseries_set_xdabr(unsigned lo
>  #define CMO_CHARACTERISTICS_TOKEN 44
>  #define CMO_MAXLENGTH 1026
>  
> +void pSeries_coalesce_init(void)
> +{
> +	struct hvcall_mpp_x_data mpp_x_data;
> +
> +	if (firmware_has_feature(FW_FEATURE_CMO) && !h_get_mpp_x(&mpp_x_data))
> +		powerpc_firmware_features |= FW_FEATURE_XCMO;
> +	else
> +		powerpc_firmware_features &= ~FW_FEATURE_XCMO;
> +}
> +
>  /**
>   * fw_cmo_feature_init - FW_FEATURE_CMO is not stored in ibm,hypertas-functions,
>   * handle that here. (Stolen from parse_system_parameter_string)
> @@ -472,6 +482,7 @@ void pSeries_cmo_feature_init(void)
>  		pr_debug("CMO enabled, PrPSP=%d, SecPSP=%d\n", CMO_PrPSP,
>  		         CMO_SecPSP);
>  		powerpc_firmware_features |= FW_FEATURE_CMO;
> +		pSeries_coalesce_init();
>  	} else
>  		pr_debug("CMO not enabled, PrPSP=%d, SecPSP=%d\n", CMO_PrPSP,
>  		         CMO_SecPSP);
> diff -puN arch/powerpc/kernel/prom_init.c~powerpc_coalesce arch/powerpc/kernel/prom_init.c
> --- linux-2.6/arch/powerpc/kernel/prom_init.c~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
> +++ linux-2.6-bjking1/arch/powerpc/kernel/prom_init.c	2011-04-20 08:38:42.000000000 -0500
> @@ -676,8 +676,10 @@ static void __init early_cmdline_parse(v
>  #endif /* CONFIG_PCI_MSI */
>  #ifdef CONFIG_PPC_SMLPAR
>  #define OV5_CMO			0x80	/* Cooperative Memory Overcommitment */
> +#define OV5_XCMO			0x40	/* Page Coalescing */
>  #else
>  #define OV5_CMO			0x00
> +#define OV5_XCMO			0x00
>  #endif
>  #define OV5_TYPE1_AFFINITY	0x80	/* Type 1 NUMA affinity */
>  
> @@ -732,7 +734,7 @@ static unsigned char ibm_architecture_ve
>  	OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY |
>  	OV5_DONATE_DEDICATE_CPU | OV5_MSI,
>  	0,
> -	OV5_CMO,
> +	OV5_CMO | OV5_XCMO,
>  	OV5_TYPE1_AFFINITY,
>  	0,
>  	0,
> diff -puN arch/powerpc/kernel/lparcfg.c~powerpc_coalesce arch/powerpc/kernel/lparcfg.c
> --- linux-2.6/arch/powerpc/kernel/lparcfg.c~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
> +++ linux-2.6-bjking1/arch/powerpc/kernel/lparcfg.c	2011-04-20 08:38:42.000000000 -0500
> @@ -161,6 +161,21 @@ int h_get_mpp(struct hvcall_mpp_data *mp
>  }
>  EXPORT_SYMBOL(h_get_mpp);
>  
> +int h_get_mpp_x(struct hvcall_mpp_x_data *mpp_x_data)
> +{
> +	int rc;
> +	unsigned long retbuf[PLPAR_HCALL9_BUFSIZE] = { 0 };
> +
> +	rc = plpar_hcall9(H_GET_MPP_X, retbuf);
> +
> +	mpp_x_data->coalesced_bytes = retbuf[0];
> +	mpp_x_data->pool_coalesced_bytes = retbuf[1];
> +	mpp_x_data->pool_purr_cycles = retbuf[2];
> +	mpp_x_data->pool_spurr_cycles = retbuf[3];
> +
> +	return rc;
> +}
> +
>  struct hvcall_ppp_data {
>  	u64	entitlement;
>  	u64	unallocated_entitlement;
> @@ -345,6 +360,30 @@ static void parse_mpp_data(struct seq_fi
>  	seq_printf(m, "backing_memory=%ld bytes\n", mpp_data.backing_mem);
>  }
>  
> +/**
> + * parse_mpp_x_data
> + * Parse out data returned from h_get_mpp_x
> + */
> +static void parse_mpp_x_data(struct seq_file *m)
> +{
> +	struct hvcall_mpp_x_data mpp_x_data;
> +
> +	if (!firmware_has_feature(FW_FEATURE_XCMO))
> +		return;
> +	if (h_get_mpp_x(&mpp_x_data))
> +		return;
> +
> +	seq_printf(m, "coalesced_bytes=%ld\n", mpp_x_data.coalesced_bytes);
> +
> +	if (mpp_x_data.pool_coalesced_bytes)
> +		seq_printf(m, "pool_coalesced_bytes=%ld\n",
> +			   mpp_x_data.pool_coalesced_bytes);
> +	if (mpp_x_data.pool_purr_cycles)
> +		seq_printf(m, "coalesce_pool_purr=%ld\n", mpp_x_data.pool_purr_cycles);
> +	if (mpp_x_data.pool_spurr_cycles)
> +		seq_printf(m, "coalesce_pool_spurr=%ld\n", mpp_x_data.pool_spurr_cycles);
> +}
> +
>  #define SPLPAR_CHARACTERISTICS_TOKEN 20
>  #define SPLPAR_MAXLENGTH 1026*(sizeof(char))
>  
> @@ -520,6 +559,7 @@ static int pseries_lparcfg_data(struct s
>  		parse_system_parameter_string(m);
>  		parse_ppp_data(m);
>  		parse_mpp_data(m);
> +		parse_mpp_x_data(m);
>  		pseries_cmo_data(m);
>  		splpar_dispatch_data(m);
>  
> diff -puN arch/powerpc/include/asm/firmware.h~powerpc_coalesce arch/powerpc/include/asm/firmware.h
> --- linux-2.6/arch/powerpc/include/asm/firmware.h~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
> +++ linux-2.6-bjking1/arch/powerpc/include/asm/firmware.h	2011-04-20 08:38:42.000000000 -0500
> @@ -47,6 +47,7 @@
>  #define FW_FEATURE_BEAT		ASM_CONST(0x0000000001000000)
>  #define FW_FEATURE_CMO		ASM_CONST(0x0000000002000000)
>  #define FW_FEATURE_VPHN		ASM_CONST(0x0000000004000000)
> +#define FW_FEATURE_XCMO		ASM_CONST(0x0000000008000000)
>  
>  #ifndef __ASSEMBLY__
>  
> @@ -60,7 +61,7 @@ enum {
>  		FW_FEATURE_VIO | FW_FEATURE_RDMA | FW_FEATURE_LLAN |
>  		FW_FEATURE_BULK_REMOVE | FW_FEATURE_XDABR |
>  		FW_FEATURE_MULTITCE | FW_FEATURE_SPLPAR | FW_FEATURE_LPAR |
> -		FW_FEATURE_CMO | FW_FEATURE_VPHN,
> +		FW_FEATURE_CMO | FW_FEATURE_VPHN | FW_FEATURE_XCMO,
>  	FW_FEATURE_PSERIES_ALWAYS = 0,
>  	FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES | FW_FEATURE_LPAR,
>  	FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES | FW_FEATURE_LPAR,
> diff -puN arch/powerpc/platforms/pseries/lpar.c~powerpc_coalesce arch/powerpc/platforms/pseries/lpar.c
> --- linux-2.6/arch/powerpc/platforms/pseries/lpar.c~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
> +++ linux-2.6-bjking1/arch/powerpc/platforms/pseries/lpar.c	2011-04-20 08:38:42.000000000 -0500
> @@ -329,6 +329,8 @@ static long pSeries_lpar_hpte_insert(uns
>  	/* Make pHyp happy */
>  	if ((rflags & _PAGE_NO_CACHE) & !(rflags & _PAGE_WRITETHRU))
>  		hpte_r &= ~_PAGE_COHERENT;
> +	if (firmware_has_feature(FW_FEATURE_XCMO) && !(hpte_r & HPTE_R_N))
> +		flags |= H_COALESCE_CAND;
>  
>  	lpar_rc = plpar_pte_enter(flags, hpte_group, hpte_v, hpte_r, &slot);
>  	if (unlikely(lpar_rc == H_PTEG_FULL)) {
> diff -puN arch/powerpc/include/asm/pSeries_reconfig.h~powerpc_coalesce arch/powerpc/include/asm/pSeries_reconfig.h
> --- linux-2.6/arch/powerpc/include/asm/pSeries_reconfig.h~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
> +++ linux-2.6-bjking1/arch/powerpc/include/asm/pSeries_reconfig.h	2011-04-20 08:38:42.000000000 -0500
> @@ -14,6 +14,12 @@
>  #define PSERIES_DRCONF_MEM_ADD		0x0003
>  #define PSERIES_DRCONF_MEM_REMOVE	0x0004
>  
> +#ifdef CONFIG_PPC_SMLPAR
> +extern void pSeries_coalesce_init(void);
> +#else
> +static inline void pSeries_coalesce_init(void) { }
> +#endif
> +
>  #ifdef CONFIG_PPC_PSERIES
>  extern int pSeries_reconfig_notifier_register(struct notifier_block *);
>  extern void pSeries_reconfig_notifier_unregister(struct notifier_block *);
> diff -puN arch/powerpc/kernel/rtas.c~powerpc_coalesce arch/powerpc/kernel/rtas.c
> --- linux-2.6/arch/powerpc/kernel/rtas.c~powerpc_coalesce	2011-04-20 08:38:42.000000000 -0500
> +++ linux-2.6-bjking1/arch/powerpc/kernel/rtas.c	2011-04-20 08:38:42.000000000 -0500
> @@ -42,6 +42,7 @@
>  #include <asm/time.h>
>  #include <asm/mmu.h>
>  #include <asm/topology.h>
> +#include <asm/pSeries_reconfig.h>
>  
>  struct rtas_t rtas = {
>  	.lock = __ARCH_SPIN_LOCK_UNLOCKED
> @@ -731,6 +732,7 @@ static int __rtas_suspend_last_cpu(struc
>  
>  	atomic_set(&data->error, rc);
>  	start_topology_update();
> +	pSeries_coalesce_init();
>  
>  	if (wake_when_done) {
>  		atomic_set(&data->done, 1);
> _

^ permalink raw reply

* [PATCH] powerpc/85xx: ULPI PHY support for P101x platforms
From: Ramneek Mehresh @ 2011-04-23 12:33 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Ramneek Mehresh

Add support for USB ULPI (external) PHY for P101x platforms
 - for both USB Host and Peripheral modes

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
---
Applies on git://git.am.freescale.net/mirrors/linux-2.6.git
(branch master)

 drivers/usb/gadget/fsl_udc_core.c |    6 ++++++
 drivers/usb/gadget/fsl_usb2_udc.h |    1 +
 drivers/usb/host/ehci-fsl.c       |    5 +++++
 drivers/usb/host/ehci-fsl.h       |    1 +
 4 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index c669600..4f7578a 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -189,6 +189,12 @@ static int dr_controller_setup(struct fsl_udc *udc)
 	portctrl &= ~(PORTSCX_PHY_TYPE_SEL | PORTSCX_PORT_WIDTH);
 	switch (udc->phy_mode) {
 	case FSL_USB2_PHY_ULPI:
+#ifdef CONFIG_PPC_85xx
+		ctrl = __raw_readl(&usb_sys_regs->control);
+		ctrl &= ~USB_CTRL_UTMI_PHY_EN;
+		ctrl |= USB_CTRL_ULPI_PHY_CLK_SEL;
+		__raw_writel(ctrl, &usb_sys_regs->control);
+#endif
 		portctrl |= PORTSCX_PTS_ULPI;
 		break;
 	case FSL_USB2_PHY_UTMI_WIDE:
diff --git a/drivers/usb/gadget/fsl_usb2_udc.h b/drivers/usb/gadget/fsl_usb2_udc.h
index d489c62..031c256 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.h
+++ b/drivers/usb/gadget/fsl_usb2_udc.h
@@ -365,6 +365,7 @@ struct usb_sys_interface {
 #define  USB_CTRL_ULPI_INT0EN                 0x00000001
 #define USB_CTRL_UTMI_PHY_EN		      0x00000200
 #define USB_CTRL_USB_EN			      0x00000004
+#define USB_CTRL_ULPI_PHY_CLK_SEL		0x00000400
 
 /* Endpoint Queue Head data struct
  * Rem: all the variables of qh are LittleEndian Mode
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 55f4ab5..a755b9d 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -190,6 +190,11 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci,
 	portsc &= ~(PORT_PTS_MSK | PORT_PTS_PTW);
 	switch (phy_mode) {
 	case FSL_USB2_PHY_ULPI:
+#ifdef CONFIG_PPC_85xx
+		temp = in_be32(non_ehci + FSL_SOC_USB_CTRL);
+		out_be32(non_ehci + FSL_SOC_USB_CTRL, temp | USB_CTRL_USB_EN |
+				ULPI_PHY_CLK_SEL);
+#endif
 		portsc |= PORT_PTS_ULPI;
 		break;
 	case FSL_USB2_PHY_SERIAL:
diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h
index 06a94e9..6ed589c 100644
--- a/drivers/usb/host/ehci-fsl.h
+++ b/drivers/usb/host/ehci-fsl.h
@@ -52,4 +52,5 @@
 #define OTG_PORT		(1<<5)
 #define PLL_RESET		(1<<8)
 #define UTMI_PHY_EN		(1<<9)
+#define ULPI_PHY_CLK_SEL	(1<<10)
 #endif				/* _EHCI_FSL_H */
-- 
1.6.1

^ permalink raw reply related

* [PATCH] powerpc/85xx: Add UTMI PHY support for 85xx platforms
From: Ramneek Mehresh @ 2011-04-23 12:33 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Ramneek Mehresh

Add UTMI internal PHY support for P5020/P3041/P101x platforms.
 - for both USB Host and Peripheral modes

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
---
Applies on git://git.am.freescale.net/mirrors/linux-2.6.git
(branch master)

 drivers/usb/gadget/fsl_udc_core.c |    7 ++++++-
 drivers/usb/gadget/fsl_usb2_udc.h |   19 +++++++++++++++++++
 drivers/usb/host/ehci-fsl.c       |   10 ++++++++--
 drivers/usb/host/ehci-fsl.h       |   12 +++++++++++-
 4 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index 07499c1..c669600 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004-2007 Freescale Semicondutor, Inc. All rights reserved.
+ * Copyright (C) 2004-2011 Freescale Semiconductor, Inc.
  *
  * Author: Li Yang <leoli@freescale.com>
  *         Jiang Bo <tanya.jiang@freescale.com>
@@ -195,6 +195,11 @@ static int dr_controller_setup(struct fsl_udc *udc)
 		portctrl |= PORTSCX_PTW_16BIT;
 		/* fall through */
 	case FSL_USB2_PHY_UTMI:
+#ifdef CONFIG_PPC_85xx
+		setbits32(&usb_sys_regs->control, USB_CTRL_UTMI_PHY_EN |
+				USB_CTRL_USB_EN);
+		udelay(10*1000);  /* delay for PHY clk to ready */
+#endif
 		portctrl |= PORTSCX_PTS_UTMI;
 		break;
 	case FSL_USB2_PHY_SERIAL:
diff --git a/drivers/usb/gadget/fsl_usb2_udc.h b/drivers/usb/gadget/fsl_usb2_udc.h
index e88cce5..d489c62 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.h
+++ b/drivers/usb/gadget/fsl_usb2_udc.h
@@ -1,3 +1,20 @@
+/* Copyright (C) 2011 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the  GNU General Public License along
+ * with this program; if not, write  to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
 /*
  * Freescale USB device/endpoint management registers
  */
@@ -346,6 +363,8 @@ struct usb_sys_interface {
 /* control Register Bit Masks */
 #define  USB_CTRL_IOENB                       0x00000004
 #define  USB_CTRL_ULPI_INT0EN                 0x00000001
+#define USB_CTRL_UTMI_PHY_EN		      0x00000200
+#define USB_CTRL_USB_EN			      0x00000004
 
 /* Endpoint Queue Head data struct
  * Rem: all the variables of qh are LittleEndian Mode
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 5c761df..55f4ab5 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -1,6 +1,6 @@
 /*
  * Copyright 2005-2009 MontaVista Software, Inc.
- * Copyright 2008      Freescale Semiconductor, Inc.
+ * Copyright 2011      Freescale Semiconductor, Inc.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -183,10 +183,11 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci,
 			       unsigned int port_offset)
 {
 	u32 portsc;
+	struct usb_hcd *hcd = ehci_to_hcd(ehci);
+	void __iomem *non_ehci = hcd->regs;
 
 	portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]);
 	portsc &= ~(PORT_PTS_MSK | PORT_PTS_PTW);
-
 	switch (phy_mode) {
 	case FSL_USB2_PHY_ULPI:
 		portsc |= PORT_PTS_ULPI;
@@ -198,6 +199,11 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci,
 		portsc |= PORT_PTS_PTW;
 		/* fall through */
 	case FSL_USB2_PHY_UTMI:
+#ifdef CONFIG_PPC_85xx
+		setbits32(non_ehci + FSL_SOC_USB_CTRL, UTMI_PHY_EN |
+				USB_CTRL_USB_EN);
+		udelay(10*1000);  /* delay for PHY clk to ready */
+#endif
 		portsc |= PORT_PTS_UTMI;
 		break;
 	case FSL_USB2_PHY_NONE:
diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h
index 3fabed3..06a94e9 100644
--- a/drivers/usb/host/ehci-fsl.h
+++ b/drivers/usb/host/ehci-fsl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2010 Freescale Semiconductor, Inc.
+/* Copyright (C) 2005-2011 Freescale Semiconductor, Inc.
  * Copyright (c) 2005 MontaVista Software
  *
  * This program is free software; you can redistribute  it and/or modify it
@@ -42,4 +42,14 @@
 #define FSL_SOC_USB_SICTRL	0x410	/* NOTE: big-endian */
 #define FSL_SOC_USB_CTRL	0x500	/* NOTE: big-endian */
 #define SNOOP_SIZE_2GB		0x1e
+
+/* control Register Bit Masks */
+#define ULPI_INT_EN		(1<<0)
+#define WU_INT_EN		(1<<1)
+#define USB_CTRL_USB_EN		(1<<2)
+#define LINE_STATE_FILTER__EN	(1<<3)
+#define KEEP_OTG_ON		(1<<4)
+#define OTG_PORT		(1<<5)
+#define PLL_RESET		(1<<8)
+#define UTMI_PHY_EN		(1<<9)
 #endif				/* _EHCI_FSL_H */
-- 
1.6.1

^ permalink raw reply related

* [PATCH] [v1] powerpc/85xx: Add ULPI PHY support for P101x platforms
From: Ramneek Mehresh @ 2011-04-23 13:48 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Ramneek Mehresh

Add support for USB ULPI (external) PHY for P101x platforms
 - for both USB Host and Peripheral modes

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
---
Changes for v1:
	- removing the usage of variable temp

Applies on git://git.am.freescale.net/mirrors/linux-2.6.git
(branch master)

 drivers/usb/gadget/fsl_udc_core.c |    6 ++++++
 drivers/usb/gadget/fsl_usb2_udc.h |    1 +
 drivers/usb/host/ehci-fsl.c       |    5 +++++
 drivers/usb/host/ehci-fsl.h       |    1 +
 4 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index c669600..4f7578a 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -189,6 +189,12 @@ static int dr_controller_setup(struct fsl_udc *udc)
 	portctrl &= ~(PORTSCX_PHY_TYPE_SEL | PORTSCX_PORT_WIDTH);
 	switch (udc->phy_mode) {
 	case FSL_USB2_PHY_ULPI:
+#ifdef CONFIG_PPC_85xx
+		ctrl = __raw_readl(&usb_sys_regs->control);
+		ctrl &= ~USB_CTRL_UTMI_PHY_EN;
+		ctrl |= USB_CTRL_ULPI_PHY_CLK_SEL;
+		__raw_writel(ctrl, &usb_sys_regs->control);
+#endif
 		portctrl |= PORTSCX_PTS_ULPI;
 		break;
 	case FSL_USB2_PHY_UTMI_WIDE:
diff --git a/drivers/usb/gadget/fsl_usb2_udc.h b/drivers/usb/gadget/fsl_usb2_udc.h
index d489c62..78e55ba 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.h
+++ b/drivers/usb/gadget/fsl_usb2_udc.h
@@ -365,6 +365,7 @@ struct usb_sys_interface {
 #define  USB_CTRL_ULPI_INT0EN                 0x00000001
 #define USB_CTRL_UTMI_PHY_EN		      0x00000200
 #define USB_CTRL_USB_EN			      0x00000004
+#define USB_CTRL_ULPI_PHY_CLK_SEL	      0x00000400
 
 /* Endpoint Queue Head data struct
  * Rem: all the variables of qh are LittleEndian Mode
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 55f4ab5..d698ac8 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -190,6 +190,11 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci,
 	portsc &= ~(PORT_PTS_MSK | PORT_PTS_PTW);
 	switch (phy_mode) {
 	case FSL_USB2_PHY_ULPI:
+#ifdef CONFIG_PPC_85xx
+		out_be32(non_ehci + FSL_SOC_USB_CTRL,
+			in_be32(non_ehci + FSL_SOC_USB_CTRL) |
+			USB_CTRL_USB_EN | ULPI_PHY_CLK_SEL);
+#endif
 		portsc |= PORT_PTS_ULPI;
 		break;
 	case FSL_USB2_PHY_SERIAL:
diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h
index 06a94e9..6ed589c 100644
--- a/drivers/usb/host/ehci-fsl.h
+++ b/drivers/usb/host/ehci-fsl.h
@@ -52,4 +52,5 @@
 #define OTG_PORT		(1<<5)
 #define PLL_RESET		(1<<8)
 #define UTMI_PHY_EN		(1<<9)
+#define ULPI_PHY_CLK_SEL	(1<<10)
 #endif				/* _EHCI_FSL_H */
-- 
1.6.1

^ permalink raw reply related

* Re: [PATCH] powerpc: Add Initiate Coprocessor Store Word (icswx) support
From: Benjamin Herrenschmidt @ 2011-04-24  6:05 UTC (permalink / raw)
  To: Anton Blanchard; +Cc: tsenglin, linuxppc-dev
In-Reply-To: <20110418113638.29c0bc85@kryten>

On Mon, 2011-04-18 at 11:36 +1000, Anton Blanchard wrote:
> - By including linux/spinlock_types.h we can remove the dynamic
> allocation
>   of the spinlock hack and simplify things a lot.

Causes all sort of hell for me on some configs. Lockdep is not happy for
example and there's some nasty include dependency circles. Not sure
that's fixable at least not without some important cleanup of how
mmu_context_t is defined.

Ben.

^ permalink raw reply

* Re: [PATCH 3/5] powerpc, hw_breakpoints: Fix racy access to ptrace breakpoints
From: K.Prasad @ 2011-04-24  8:04 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: Peter Zijlstra, Will Deacon, LKML, Oleg Nesterov, Paul Mundt,
	Ingo Molnar, LPPC, v2.6.33..
In-Reply-To: <1303478187-2367-1-git-send-email-fweisbec@gmail.com>

On Fri, Apr 22, 2011 at 03:16:27PM +0200, Frederic Weisbecker wrote:
> (resend with ppc list in cc)
> 
> While the tracer accesses ptrace breakpoints, the child task may
> concurrently exit due to a SIGKILL and thus release its breakpoints
> at the same time. We can then dereference some freed pointers.
> 
> To fix this, hold a reference on the child breakpoints before
> manipulating them.
> 
> Reported-by: Oleg Nesterov <oleg@redhat.com>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Prasad <prasad@linux.vnet.ibm.com>
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: v2.6.33.. <stable@kernel.org>
> ---
>  arch/powerpc/kernel/ptrace.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
> index 55613e3..4edeeb3 100644
> --- a/arch/powerpc/kernel/ptrace.c
> +++ b/arch/powerpc/kernel/ptrace.c
> @@ -1591,7 +1591,10 @@ long arch_ptrace(struct task_struct *child, long request,
>  	}
> 
>  	case PTRACE_SET_DEBUGREG:
> +		if (ptrace_get_breakpoints(child) < 0)
> +			return -ESRCH;
>  		ret = ptrace_set_debugreg(child, addr, data);
> +		ptrace_put_breakpoints(child);
>  		break;
> 
>  #ifdef CONFIG_PPC64
> -- 
> 1.7.3.2
>

Hi Frederic,
	Looks fine to me.

Acked-by: K.Prasad <prasad@linux.vnet.ibm.com>

Thanks,
K.Prasad 

^ permalink raw reply

* [PATCH] powerpc/kexec: Fix build failure on 32-bit SMP
From: Ben Hutchings @ 2011-04-25  1:04 UTC (permalink / raw)
  To: Paul Gortmaker, Benjamin Herrenschmidt; +Cc: linuxppc-dev

Commit b987812b3fcaf70fdf0037589e5d2f5f2453e6ce left
crash_kexec_wait_realmode() undefined for UP.

Commit 7c7a81b53e581d727d069cc45df5510516faac31 defined it for UP but
left it undefined for 32-bit SMP.

Seems like people are getting confused by nested #ifdef's, so move the
definitions of crash_kexec_wait_realmode() after the #ifdef CONFIG_SMP
section.

Compile-tested with 32-bit UP, 32-bit SMP and 64-bit SMP configurations.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -162,34 +162,6 @@
 	/* Leave the IPI callback set */
 }
=20
-/* wait for all the CPUs to hit real mode but timeout if they don't come i=
n */
-#ifdef CONFIG_PPC_STD_MMU_64
-static void crash_kexec_wait_realmode(int cpu)
-{
-	unsigned int msecs;
-	int i;
-
-	msecs =3D 10000;
-	for (i=3D0; i < NR_CPUS && msecs > 0; i++) {
-		if (i =3D=3D cpu)
-			continue;
-
-		while (paca[i].kexec_state < KEXEC_STATE_REAL_MODE) {
-			barrier();
-			if (!cpu_possible(i)) {
-				break;
-			}
-			if (!cpu_online(i)) {
-				break;
-			}
-			msecs--;
-			mdelay(1);
-		}
-	}
-	mb();
-}
-#endif	/* CONFIG_PPC_STD_MMU_64 */
-
 /*
  * This function will be called by secondary cpus or by kexec cpu
  * if soft-reset is activated to stop some CPUs.
@@ -234,7 +206,6 @@
 }
=20
 #else	/* ! CONFIG_SMP */
-static inline void crash_kexec_wait_realmode(int cpu) {}
=20
 static void crash_kexec_prepare_cpus(int cpu)
 {
@@ -257,6 +228,36 @@
 }
 #endif	/* CONFIG_SMP */
=20
+/* wait for all the CPUs to hit real mode but timeout if they don't come i=
n */
+#if defined(CONFIG_SMP) && defined(CONFIG_PPC_STD_MMU_64)
+static void crash_kexec_wait_realmode(int cpu)
+{
+	unsigned int msecs;
+	int i;
+
+	msecs =3D 10000;
+	for (i=3D0; i < NR_CPUS && msecs > 0; i++) {
+		if (i =3D=3D cpu)
+			continue;
+
+		while (paca[i].kexec_state < KEXEC_STATE_REAL_MODE) {
+			barrier();
+			if (!cpu_possible(i)) {
+				break;
+			}
+			if (!cpu_online(i)) {
+				break;
+			}
+			msecs--;
+			mdelay(1);
+		}
+	}
+	mb();
+}
+#else
+static inline void crash_kexec_wait_realmode(int cpu) {}
+#endif	/* CONFIG_SMP && CONFIG_PPC_STD_MMU_64 */
+
 /*
  * Register a function to be called on shutdown.  Only use this if you
  * can't reset your device in the second kernel.

--=20
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

^ permalink raw reply

* Re: [PATCH 1/1] powerpc: Add page coalescing support
From: Brian King @ 2011-04-25 14:03 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1303513178.2513.92.camel@pasglop>

On 04/22/2011 05:59 PM, Benjamin Herrenschmidt wrote:
> On Fri, 2011-04-22 at 16:08 -0500, Brian King wrote:
>> Adds support for page coalescing, which is a feature on IBM Power servers
>> which allows for coalescing identical pages between logical partitions.
>> Hint text pages as coalesce candidates, since they are the most likely
>> pages to be able to be coalesced between partitions. This patch also
>> exports some page coalescing statistics available from firmware via
>> lparcfg.
> 
> Hi Brian !
> 
> Is this patch different from the version you posted previously which is
> already on Patchwork ? I'm in the process of putting together
> powerpc-next and your previous variant is in my queue.

Its the same, just a repost.

Thanks,

Brian

-- 
Brian King
Linux on Power Virtualization
IBM Linux Technology Center

^ permalink raw reply

* device not available because of BAR 0 collisions
From: Steven A. Falco @ 2011-04-25 20:10 UTC (permalink / raw)
  To: linuxppc-dev

I'm getting an error message when trying to talk to some custom hardware:

dx83xx 0001:43:00.0: device not available because of BAR 0 [0xa1000000-0xa1ffffff] collisions

I see in setup-res.c that this message comes out when there is no parent for
a device resource.

I've been digging around in the code, and I confess that I cannot figure out
where the parent member is assigned.  Can someone please give me a hint as to
where the assignment happens?

The hardware consists of a pair of ASICs attached to a PPC405EX via a PCIe switch.
The device tree is based on the Kilauea evaluation board.  The device tree does not
specify the PCIe switch or ASICs.

Do I need to add something to the device tree to represent the PCIe switch, or
should it be automatically discovered and configured?

U-Boot reports the PCI hardware as:

PCIE0: successfully set as root-complex
        01  00  1172  0004  ff00  00
PCIE1: successfully set as root-complex
        05  00  1b03  7000  0000  ff
        04  01  10b5  8613  0604  00
        06  00  1b03  7000  0000  ff
        04  02  10b5  8613  0604  00
        03  00  10b5  8613  0604  00

The PCIe switch shows up as 03:00, 04:01, and 04:02.  The ASICs show up as 05:00 and
06:00, so there is no problem with config-space that I can see.

Similar hardware (an evaluation board for the ASICs) works ok on an x86 PC.  The
PCIe switch is recognized, and the ASIC driver probes and enables the device
without any problems.  Sadly, I cannot plug it into the Kilauea because it needs a
PCIe x16 slot.

Guidance gratefully accepted!

	Steve


-- 
A: Because it makes the logic of the discussion difficult to follow.
Q: Why shouldn't I top post?
A: No.
Q: Should I top post?

^ permalink raw reply

* Re: device not available because of BAR 0 collisions
From: Benjamin Herrenschmidt @ 2011-04-26  0:01 UTC (permalink / raw)
  To: Steven A. Falco; +Cc: linuxppc-dev
In-Reply-To: <4DB5D548.7020303@harris.com>

On Mon, 2011-04-25 at 16:10 -0400, Steven A. Falco wrote:
> I'm getting an error message when trying to talk to some custom
> hardware:
> 
> dx83xx 0001:43:00.0: device not available because of BAR 0
> [0xa1000000-0xa1ffffff] collisions
> 
> I see in setup-res.c that this message comes out when there is no
> parent for
> a device resource.

 .../...

It mostly happens in arch/powerpc/kernel/pci-common.c and the generic
setup-res.c

Try #define DEBUG at the top (before the #includes) of pci-common.c and
pci_32.c (remove the exiting #undef in the last one) and send us the
full dmesg log, along with the output of cat /proc/iomem

Cheers,
Ben.

^ permalink raw reply

* [PATCH] powerpc/44x: Add multiple chip select support to NDFC driver
From: Felix Radensky @ 2011-04-26  9:36 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Felix Radensky, sr, linux-mtd

This patch extends NDFC driver to support all 4 chip selects
available in NDFC NAND controller. Tested on custom 460EX board
with 2 chip select NAND device.

Signed-off-by: Felix Radensky <felix@embedded-sol.com>
---

I'd appreciate some testing on 44x boards with multiple NAND
devices, like bamboo or DU440, as I don't have access to these 
boards.

 drivers/mtd/nand/ndfc.c |   52 +++++++++++++++++++++++++++++++---------------
 1 files changed, 35 insertions(+), 17 deletions(-)

diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index bbe6d45..5e0be1e 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -33,6 +33,7 @@
 #include <linux/of_platform.h>
 #include <asm/io.h>
 
+#define NDFC_MAX_CS    4
 
 struct ndfc_controller {
 	struct platform_device *ofdev;
@@ -46,12 +47,13 @@ struct ndfc_controller {
 #endif
 };
 
-static struct ndfc_controller ndfc_ctrl;
+static struct ndfc_controller ndfc_ctrl[NDFC_MAX_CS];
 
 static void ndfc_select_chip(struct mtd_info *mtd, int chip)
 {
 	uint32_t ccr;
-	struct ndfc_controller *ndfc = &ndfc_ctrl;
+	struct nand_chip *nchip = mtd->priv;
+	struct ndfc_controller *ndfc = nchip->priv;
 
 	ccr = in_be32(ndfc->ndfcbase + NDFC_CCR);
 	if (chip >= 0) {
@@ -64,7 +66,8 @@ static void ndfc_select_chip(struct mtd_info *mtd, int chip)
 
 static void ndfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
-	struct ndfc_controller *ndfc = &ndfc_ctrl;
+	struct nand_chip *chip = mtd->priv;
+	struct ndfc_controller *ndfc = chip->priv;
 
 	if (cmd == NAND_CMD_NONE)
 		return;
@@ -77,7 +80,8 @@ static void ndfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 
 static int ndfc_ready(struct mtd_info *mtd)
 {
-	struct ndfc_controller *ndfc = &ndfc_ctrl;
+	struct nand_chip *chip = mtd->priv;
+	struct ndfc_controller *ndfc = chip->priv;
 
 	return in_be32(ndfc->ndfcbase + NDFC_STAT) & NDFC_STAT_IS_READY;
 }
@@ -85,7 +89,8 @@ static int ndfc_ready(struct mtd_info *mtd)
 static void ndfc_enable_hwecc(struct mtd_info *mtd, int mode)
 {
 	uint32_t ccr;
-	struct ndfc_controller *ndfc = &ndfc_ctrl;
+	struct nand_chip *chip = mtd->priv;
+	struct ndfc_controller *ndfc = chip->priv;
 
 	ccr = in_be32(ndfc->ndfcbase + NDFC_CCR);
 	ccr |= NDFC_CCR_RESET_ECC;
@@ -96,7 +101,8 @@ static void ndfc_enable_hwecc(struct mtd_info *mtd, int mode)
 static int ndfc_calculate_ecc(struct mtd_info *mtd,
 			      const u_char *dat, u_char *ecc_code)
 {
-	struct ndfc_controller *ndfc = &ndfc_ctrl;
+	struct nand_chip *chip = mtd->priv;
+	struct ndfc_controller *ndfc = chip->priv;
 	uint32_t ecc;
 	uint8_t *p = (uint8_t *)&ecc;
 
@@ -119,7 +125,8 @@ static int ndfc_calculate_ecc(struct mtd_info *mtd,
  */
 static void ndfc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
 {
-	struct ndfc_controller *ndfc = &ndfc_ctrl;
+	struct nand_chip *chip = mtd->priv;
+	struct ndfc_controller *ndfc = chip->priv;
 	uint32_t *p = (uint32_t *) buf;
 
 	for(;len > 0; len -= 4)
@@ -128,7 +135,8 @@ static void ndfc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
 
 static void ndfc_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
 {
-	struct ndfc_controller *ndfc = &ndfc_ctrl;
+	struct nand_chip *chip = mtd->priv;
+	struct ndfc_controller *ndfc = chip->priv;
 	uint32_t *p = (uint32_t *) buf;
 
 	for(;len > 0; len -= 4)
@@ -137,7 +145,8 @@ static void ndfc_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
 
 static int ndfc_verify_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
 {
-	struct ndfc_controller *ndfc = &ndfc_ctrl;
+	struct nand_chip *chip = mtd->priv;
+	struct ndfc_controller *ndfc = chip->priv;
 	uint32_t *p = (uint32_t *) buf;
 
 	for(;len > 0; len -= 4)
@@ -179,6 +188,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
 	chip->ecc.mode = NAND_ECC_HW;
 	chip->ecc.size = 256;
 	chip->ecc.bytes = 3;
+	chip->priv = ndfc;
 
 	ndfc->mtd.priv = chip;
 	ndfc->mtd.owner = THIS_MODULE;
@@ -227,15 +237,10 @@ err:
 
 static int __devinit ndfc_probe(struct platform_device *ofdev)
 {
-	struct ndfc_controller *ndfc = &ndfc_ctrl;
+	struct ndfc_controller *ndfc;
 	const __be32 *reg;
 	u32 ccr;
-	int err, len;
-
-	spin_lock_init(&ndfc->ndfc_control.lock);
-	init_waitqueue_head(&ndfc->ndfc_control.wq);
-	ndfc->ofdev = ofdev;
-	dev_set_drvdata(&ofdev->dev, ndfc);
+	int err, len, cs;
 
 	/* Read the reg property to get the chip select */
 	reg = of_get_property(ofdev->dev.of_node, "reg", &len);
@@ -243,8 +248,21 @@ static int __devinit ndfc_probe(struct platform_device *ofdev)
 		dev_err(&ofdev->dev, "unable read reg property (%d)\n", len);
 		return -ENOENT;
 	}
-	ndfc->chip_select = be32_to_cpu(reg[0]);
 
+	cs = be32_to_cpu(reg[0]);
+	if (cs >= NDFC_MAX_CS) {
+		dev_err(&ofdev->dev, "invalid CS number (%d)\n", cs);
+		return -EINVAL;
+	}
+
+	ndfc = &ndfc_ctrl[cs];
+	ndfc->chip_select = cs;
+
+	spin_lock_init(&ndfc->ndfc_control.lock);
+	init_waitqueue_head(&ndfc->ndfc_control.wq);
+	ndfc->ofdev = ofdev;
+	dev_set_drvdata(&ofdev->dev, ndfc);
+	
 	ndfc->ndfcbase = of_iomap(ofdev->dev.of_node, 0);
 	if (!ndfc->ndfcbase) {
 		dev_err(&ofdev->dev, "failed to get memory\n");
-- 
1.7.4.4

^ permalink raw reply related

* Re: [PATCH 11/14] PM / AVR32: Use struct syscore_ops instead of sysdevs for PM
From: Hans-Christian Egtvedt @ 2011-04-26 12:22 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Kevin Hilman, Guan Xuetao, Russell King, Konrad Rzeszutek Wilk,
	Greg KH, LKML, Ralf Baechle, Jeremy Fitzhardinge, Ben Dooks,
	Jiri Kosina, Kay Sievers, Mike Frysinger, Linux PM mailing list,
	linux-omap, linuxppc-dev, linux-arm-kernel
In-Reply-To: <201104172313.09712.rjw@sisk.pl>

On Sun, 2011-04-17 at 23:13 +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl>
> 
> Convert some AVR32 architecture's code to using struct syscore_ops
> objects for power management instead of sysdev classes and sysdevs.
> 
> This simplifies the code and reduces the kernel's memory footprint.
> It also is necessary for removing sysdevs from the kernel entirely in
> the future.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

Acked-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

Thanks, nice work. Tested and run on hardware.

<snipp>

-- 
Hans-Christian Egtvedt

^ permalink raw reply

* Re: device not available because of BAR 0 collisions
From: Steven A. Falco @ 2011-04-26 13:38 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1303776114.2513.152.camel@pasglop>

On 04/25/2011 08:01 PM, Benjamin Herrenschmidt wrote:
> On Mon, 2011-04-25 at 16:10 -0400, Steven A. Falco wrote:
>> I'm getting an error message when trying to talk to some custom
>> hardware:
>>
>> dx83xx 0001:43:00.0: device not available because of BAR 0
>> [0xa1000000-0xa1ffffff] collisions
>>
>> I see in setup-res.c that this message comes out when there is no
>> parent for
>> a device resource.
> 
>  .../...
> 
> It mostly happens in arch/powerpc/kernel/pci-common.c and the generic
> setup-res.c
> 
> Try #define DEBUG at the top (before the #includes) of pci-common.c and
> pci_32.c (remove the exiting #undef in the last one) and send us the
> full dmesg log, along with the output of cat /proc/iomem
> 
> Cheers,
> Ben.
> 
> 
> 

Thanks for the help!

PCIe 0 has an FPGA connected - it is behaving as expected.  PCIe 1 has the
PLX PCIe switch followed by a pair of ASICs - they are the ones generating
the error.

Here is /proc/iomem:

90000000-9fffffff : /plb/pciex@0c0000000
  90000000-93ffffff : PCI Bus 0001:41
    90000000-93ffffff : PCI Bus 0001:42
      90000000-91ffffff : PCI Bus 0001:43
      92000000-93ffffff : PCI Bus 0001:44
  94000000-940fffff : PCI Bus 0001:41
    94000000-9401ffff : 0001:41:00.0
e0000000-e7ffffff : /plb/pciex@0a0000000
  e0000000-e5ffffff : PCI Bus 0000:01
    e0000000-e3ffffff : 0000:01:00.0
    e4000000-e40fffff : 0000:01:00.0
    e4100000-e41fffff : 0000:01:00.0
ef600200-ef600207 : serial
ef600300-ef600307 : serial
ef600600-ef600606 : spi_ppc4xx_of
ef6c0000-ef6cffff : dwc_otg.0
  ef6c0000-ef6cffff : dwc_otg
fc000000-ffffffff : fc000000.nor_flash

And here is dmesg, captured after the failed modprobe, so you can see
those error messages (DEBUG enabled in pci-common.c and pci_32.c):

Using Flex-AM machine description
Linux version 2.6.30.3-00063-g0af2edc-dirty (sfalco@hw1.cs.myharris.net) (gcc version 4.2.2) #35 Tue Apr 26 09:20:23 EDT 2011
Found initrd at 0xcfba0000:0xcfea1872
Found legacy serial port 0 for /plb/opb/serial@ef600200
  mem=ef600200, taddr=ef600200, irq=0, clk=33333333, speed=0
Found legacy serial port 1 for /plb/opb/serial@ef600300
  mem=ef600300, taddr=ef600300, irq=0, clk=33333333, speed=0
Top of RAM: 0x10000000, Total RAM: 0x10000000
Memory hole size: 0MB
Zone PFN ranges:
  DMA      0x00000000 -> 0x00010000
  Normal   0x00010000 -> 0x00010000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00010000
On node 0 totalpages: 65536
free_area_init_node: node 0, pgdat c0406bdc, node_mem_map c0443000
  DMA zone: 512 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 65024 pages, LIFO batch:15
MMU: Allocated 1088 bytes of context maps for 255 contexts
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
Kernel command line: root=/dev/sda2 rw ip=137.237.178.150:137.237.178.9:137.237.178.1:255.255.255.0:flx-am:eth0:off panic=1 console=ttyS1,115200 debug
NR_IRQS:512
UIC0 (32 IRQ sources) at DCR 0xc0
UIC1 (32 IRQ sources) at DCR 0xd0
irq: irq 30 on host /interrupt-controller mapped to virtual irq 30
UIC2 (32 IRQ sources) at DCR 0xe0
irq: irq 28 on host /interrupt-controller mapped to virtual irq 28
PID hash table entries: 1024 (order: 10, 4096 bytes)
time_init: decrementer frequency = 400.000000 MHz
time_init: processor frequency   = 400.000000 MHz
clocksource: timebase mult[a00000] shift[22] registered
clockevent: decrementer mult[6666] shift[16] cpu[0]
I-pipe 2.7-02: pipeline enabled.
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 252092k/262144k available (3944k kernel code, 9744k reserved, 184k data, 204k bss, 164k init)
Kernel virtual memory layout:
  * 0xffffe000..0xfffff000  : fixmap
  * 0xfde00000..0xfe000000  : consistent mem
  * 0xfde00000..0xfde00000  : early ioremap
  * 0xd1000000..0xfde00000  : vmalloc & ioremap
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 798.72 BogoMIPS (lpj=1597440)
Mount-cache hash table entries: 512
net_namespace: 520 bytes
NET: Registered protocol family 16
PCIE0: Checking link...
PCIE0: Device detected, waiting for link...
PCIE0: link is up !
PCI host bridge /plb/pciex@0a0000000 (primary) ranges:
 MEM 0x00000000e0000000..0x00000000e7ffffff -> 0x0000000080000000
  IO 0x00000000e8000000..0x00000000e800ffff -> 0x0000000000000000
4xx PCI DMA offset set to 0x00000000
PCIE0: successfully set as root-complex
PCIE1: Checking link...
PCIE1: Device detected, waiting for link...
PCIE1: link is up !
PCI host bridge /plb/pciex@0c0000000 (primary) ranges:
 MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000080000000
  IO 0x00000000e8010000..0x00000000e801ffff -> 0x0000000000000000
4xx PCI DMA offset set to 0x00000000
PCIE1: successfully set as root-complex
PCI: Probing PCI hardware
PCI: Scanning PHB /plb/pciex@0a0000000
PCI: PHB IO resource    = 00000000fffe0000-00000000fffeffff [100]
PCI: PHB MEM resource 0 = 00000000e0000000-00000000e7ffffff [200]
PCI: PHB MEM offset     = 0000000060000000
PCI: PHB IO  offset     = fffe0000
pci 0000:00:00.0: reg 10 32bit mmio: [0x000000-0x7fffffff]
PCI:0000:00:00.0 Resource 0 0000000000000000-000000007fffffff [21208] is unassigned
PCI: Hiding 4xx host bridge resources 0000:00:00.0
PCI: Fixup bus devices 0 (PHB)
pci_busdev_to_OF_node(0,0x0)
 parent is /plb/pciex@0a0000000
 result is <NULL>
PCI: Try to map irq for 0000:00:00.0...
pci_busdev_to_OF_node(0,0x0)
 parent is /plb/pciex@0a0000000
 result is <NULL>
pci 0000:01:00.0: reg 10 32bit mmio: [0x80000000-0x800fffff]
pci 0000:01:00.0: reg 14 32bit mmio: [0x80100000-0x801fffff]
pci 0000:01:00.0: reg 18 32bit mmio: [0x84000000-0x87ffffff]
PCI:0000:01:00.0 Resource 0 0000000080000000-00000000800fffff [20200] fixup...
PCI:0000:01:00.0            00000000e0000000-00000000e00fffff
PCI:0000:01:00.0 Resource 1 0000000080100000-00000000801fffff [20200] fixup...
PCI:0000:01:00.0            00000000e0100000-00000000e01fffff
PCI:0000:01:00.0 Resource 2 0000000084000000-0000000087ffffff [20200] fixup...
PCI:0000:01:00.0            00000000e4000000-00000000e7ffffff
pci 0000:00:00.0: bridge io port: [0x00-0xfff]
pci 0000:00:00.0: bridge 32bit mmio: [0x80000000-0x87ffffff]
PCI:0000:00:00.0 Bus rsrc 0 0000000000000000-0000000000000fff [101] fixup...
PCI:0000:00:00.0            00000000fffe0000-00000000fffe0fff
PCI:0000:00:00.0 Bus rsrc 1 0000000080000000-0000000087ffffff [200] fixup...
PCI:0000:00:00.0            00000000e0000000-00000000e7ffffff
PCI: Fixup bus devices 1 (0000:00:00.0)
pci_busdev_to_OF_node(1,0x0)
PCI: Try to map irq for 0000:01:00.0...
pci_busdev_to_OF_node(1,0x0)
pci_busdev_to_OF_node(0,0x0)
 parent is /plb/pciex@0a0000000
 result is <NULL>
 Got one, spec 2 cells (0x00000000 0x00000004...) on /interrupt-controller2
irq: irq 0 on host /interrupt-controller2 mapped to virtual irq 16
 Mapped to linux irq 16
PCI: Scanning PHB /plb/pciex@0c0000000
PCI: PHB IO resource    = 0000000000000000-000000000000ffff [100]
PCI: PHB MEM resource 0 = 0000000090000000-000000009fffffff [200]
PCI: PHB MEM offset     = 0000000010000000
PCI: PHB IO  offset     = 00000000
pci 0001:40:00.0: reg 10 32bit mmio: [0x000000-0x7fffffff]
PCI:0001:40:00.0 Resource 0 0000000000000000-000000007fffffff [21208] is unassigned
PCI: Hiding 4xx host bridge resources 0001:40:00.0
PCI: Fixup bus devices 64 (PHB)
pci_busdev_to_OF_node(64,0x0)
 parent is /plb/pciex@0c0000000
 result is <NULL>
PCI: Try to map irq for 0001:40:00.0...
pci_busdev_to_OF_node(64,0x0)
 parent is /plb/pciex@0c0000000
 result is <NULL>
pci 0001:41:00.0: reg 10 32bit mmio: [0x90000000-0x9001ffff]
PCI:0001:41:00.0 Resource 0 0000000090000000-000000009001ffff [20200] fixup...
PCI:0001:41:00.0            00000000a0000000-00000000a001ffff
pci 0001:41:00.0: PME# supported from D0 D3hot D3cold
pci 0001:41:00.0: PME# disabled
pci 0001:40:00.0: bridge io port: [0x00-0xfff]
pci 0001:40:00.0: bridge 32bit mmio: [0x90000000-0x94ffffff]
PCI:0001:40:00.0 Bus rsrc 0 0000000000000000-0000000000000fff [101] fixup...
PCI:0001:40:00.0            0000000000000000-0000000000000fff
PCI:0001:40:00.0 Bus rsrc 1 0000000090000000-0000000094ffffff [200] fixup...
PCI:0001:40:00.0            00000000a0000000-00000000a4ffffff
PCI: Fixup bus devices 65 (0001:40:00.0)
pci_busdev_to_OF_node(65,0x0)
PCI: Try to map irq for 0001:41:00.0...
pci_busdev_to_OF_node(65,0x0)
pci_busdev_to_OF_node(64,0x0)
 parent is /plb/pciex@0c0000000
 result is <NULL>
 Got one, spec 2 cells (0x0000000b 0x00000004...) on /interrupt-controller2
irq: irq 11 on host /interrupt-controller2 mapped to virtual irq 17
 Mapped to linux irq 17
pci 0001:42:01.0: PME# supported from D0 D3hot D3cold
pci 0001:42:01.0: PME# disabled
pci 0001:42:02.0: PME# supported from D0 D3hot D3cold
pci 0001:42:02.0: PME# disabled
pci 0001:41:00.0: bridge 32bit mmio: [0x90100000-0x94ffffff]
PCI:0001:41:00.0 Bus rsrc 1 0000000090100000-0000000094ffffff [200] fixup...
PCI:0001:41:00.0            00000000a0100000-00000000a4ffffff
PCI: Fixup bus devices 66 (0001:41:00.0)
pci_busdev_to_OF_node(66,0x8)
PCI: Try to map irq for 0001:42:01.0...
pci_busdev_to_OF_node(66,0x8)
pci_busdev_to_OF_node(65,0x0)
pci_busdev_to_OF_node(64,0x0)
 parent is /plb/pciex@0c0000000
 result is <NULL>
 Got one, spec 2 cells (0x0000000c 0x00000004...) on /interrupt-controller2
irq: irq 12 on host /interrupt-controller2 mapped to virtual irq 18
 Mapped to linux irq 18
pci_busdev_to_OF_node(66,0x10)
PCI: Try to map irq for 0001:42:02.0...
pci_busdev_to_OF_node(66,0x10)
pci_busdev_to_OF_node(65,0x0)
pci_busdev_to_OF_node(64,0x0)
 parent is /plb/pciex@0c0000000
 result is <NULL>
 Got one, spec 2 cells (0x0000000d 0x00000004...) on /interrupt-controller2
irq: irq 13 on host /interrupt-controller2 mapped to virtual irq 19
 Mapped to linux irq 19
pci 0001:43:00.0: reg 10 32bit mmio: [0x91000000-0x91ffffff]
pci 0001:43:00.0: reg 14 32bit mmio: [0x92000000-0x92ffffff]
PCI:0001:43:00.0 Resource 0 0000000091000000-0000000091ffffff [21208] fixup...
PCI:0001:43:00.0            00000000a1000000-00000000a1ffffff
PCI:0001:43:00.0 Resource 1 0000000092000000-0000000092ffffff [21208] fixup...
PCI:0001:43:00.0            00000000a2000000-00000000a2ffffff
pci 0001:42:01.0: bridge 32bit mmio: [0x90100000-0x92ffffff]
PCI:0001:42:01.0 Bus rsrc 1 0000000090100000-0000000092ffffff [200] fixup...
PCI:0001:42:01.0            00000000a0100000-00000000a2ffffff
PCI: Fixup bus devices 67 (0001:42:01.0)
pci_busdev_to_OF_node(67,0x0)
PCI: Try to map irq for 0001:43:00.0...
pci_busdev_to_OF_node(67,0x0)
pci_busdev_to_OF_node(66,0x8)
pci_busdev_to_OF_node(65,0x0)
pci_busdev_to_OF_node(64,0x0)
 parent is /plb/pciex@0c0000000
 result is <NULL>
 Got one, spec 2 cells (0x0000000c 0x00000004...) on /interrupt-controller2
 Mapped to linux irq 18
pci 0001:44:00.0: reg 10 32bit mmio: [0x93000000-0x93ffffff]
pci 0001:44:00.0: reg 14 32bit mmio: [0x94000000-0x94ffffff]
PCI:0001:44:00.0 Resource 0 0000000093000000-0000000093ffffff [21208] fixup...
PCI:0001:44:00.0            00000000a3000000-00000000a3ffffff
PCI:0001:44:00.0 Resource 1 0000000094000000-0000000094ffffff [21208] fixup...
PCI:0001:44:00.0            00000000a4000000-00000000a4ffffff
pci 0001:42:02.0: bridge 32bit mmio: [0x93000000-0x94ffffff]
PCI:0001:42:02.0 Bus rsrc 1 0000000093000000-0000000094ffffff [200] fixup...
PCI:0001:42:02.0            00000000a3000000-00000000a4ffffff
PCI: Fixup bus devices 68 (0001:42:02.0)
pci_busdev_to_OF_node(68,0x0)
PCI: Try to map irq for 0001:44:00.0...
pci_busdev_to_OF_node(68,0x0)
pci_busdev_to_OF_node(66,0x10)
pci_busdev_to_OF_node(65,0x0)
pci_busdev_to_OF_node(64,0x0)
 parent is /plb/pciex@0c0000000
 result is <NULL>
 Got one, spec 2 cells (0x0000000d 0x00000004...) on /interrupt-controller2
 Mapped to linux irq 19
PCI: Allocating bus resources for 0000:00...
PCI: PHB (bus 0) bridge rsrc 0: 00000000fffe0000-00000000fffeffff [0x100], parent c03de440 (PCI IO)
PCI: PHB (bus 0) bridge rsrc 1: 00000000e0000000-00000000e7ffffff [0x200], parent c03de424 (PCI mem)
PCI: Allocating bus resources for 0000:01...
PCI: Allocating bus resources for 0001:40...
PCI: PHB (bus 64) bridge rsrc 0: 0000000000000000-000000000000ffff [0x100], parent c03de440 (PCI IO)
PCI: PHB (bus 64) bridge rsrc 1: 0000000090000000-000000009fffffff [0x200], parent c03de424 (PCI mem)
PCI: Allocating bus resources for 0001:41...
PCI: Allocating bus resources for 0001:42...
PCI: Allocating bus resources for 0001:43...
PCI: Allocating bus resources for 0001:44...
Reserving legacy ranges for domain 0000
Candidate legacy IO: [0xfffe0000-0xfffe0fff]
hose mem offset: 0000000060000000
hose mem res: [0xe0000000-0xe7ffffff]
Reserving legacy ranges for domain 0001
Candidate legacy IO: [0x00-0xfff]
hose mem offset: 0000000010000000
hose mem res: [0x90000000-0x9fffffff]
PCI: Assigning unassigned resources...
pci 0000:00:00.0: PCI bridge, secondary bus 0000:01
pci 0000:00:00.0:   IO window: disabled
pci 0000:00:00.0:   MEM window: 0x80000000-0x85ffffff
pci 0000:00:00.0:   PREFETCH window: disabled
pci 0001:42:01.0: PCI bridge, secondary bus 0001:43
pci 0001:42:01.0:   IO window: disabled
pci 0001:42:01.0:   MEM window: disabled
pci 0001:42:01.0:   PREFETCH window: 0x00000080000000-0x00000081ffffff
pci 0001:42:02.0: PCI bridge, secondary bus 0001:44
pci 0001:42:02.0:   IO window: disabled
pci 0001:42:02.0:   MEM window: disabled
pci 0001:42:02.0:   PREFETCH window: 0x00000082000000-0x00000083ffffff
pci 0001:41:00.0: PCI bridge, secondary bus 0001:42
pci 0001:41:00.0:   IO window: disabled
pci 0001:41:00.0:   MEM window: disabled
pci 0001:41:00.0:   PREFETCH window: 0x00000080000000-0x00000083ffffff
pci 0001:40:00.0: PCI bridge, secondary bus 0001:41
pci 0001:40:00.0:   IO window: disabled
pci 0001:40:00.0:   MEM window: 0x84000000-0x840fffff
pci 0001:40:00.0:   PREFETCH window: 0x00000080000000-0x00000083ffffff
pci_bus 0000:00: resource 0 io:  [0xfffe0000-0xfffeffff]
pci_bus 0000:00: resource 1 mem: [0xe0000000-0xe7ffffff]
pci_bus 0000:01: resource 0 mem: [0xfffe0000-0xfffe0fff]
pci_bus 0000:01: resource 1 mem: [0xe0000000-0xe5ffffff]
pci_bus 0001:40: resource 0 io:  [0x00-0xffff]
pci_bus 0001:40: resource 1 mem: [0x90000000-0x9fffffff]
pci_bus 0001:41: resource 0 mem: [0x0-0xfff]
pci_bus 0001:41: resource 1 mem: [0x94000000-0x940fffff]
pci_bus 0001:41: resource 2 pref mem [0x90000000-0x93ffffff]
pci_bus 0001:42: resource 1 mem: [0xa0100000-0xa4ffffff]
pci_bus 0001:42: resource 2 pref mem [0x90000000-0x93ffffff]
pci_bus 0001:43: resource 1 mem: [0xa0100000-0xa2ffffff]
pci_bus 0001:43: resource 2 pref mem [0x90000000-0x91ffffff]
pci_bus 0001:44: resource 1 mem: [0xa3000000-0xa4ffffff]
pci_bus 0001:44: resource 2 pref mem [0x92000000-0x93ffffff]
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switched to high resolution mode on CPU 0
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
NET: Registered protocol family 1
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 3078k freed
irq: irq 26 on host /interrupt-controller mapped to virtual irq 26
irq: irq 1 on host /interrupt-controller mapped to virtual irq 20
irq: irq 30 on host /interrupt-controller2 mapped to virtual irq 21
irq: irq 26 on host /interrupt-controller1 mapped to virtual irq 22
irq: irq 12 on host /interrupt-controller mapped to virtual irq 23
I-pipe: Domain Xenomai registered.
Xenomai: hal/powerpc started.
Xenomai: real-time nucleus v2.4.10 (Flavor Crystal 7) loaded.
Xenomai: starting native API services.
Xenomai: starting POSIX services.
Xenomai: starting RTDM services.
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
fuse init (API version 7.11)
msgmni has been set to 498
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
aer 0001:41:00.0:pcie12: service driver aer loaded
aer 0001:42:01.0:pcie22: service driver aer loaded
aer 0001:42:02.0:pcie22: service driver aer loaded
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0xef600200 (irq = 26) is a 16550A
serial8250.0: ttyS1 at MMIO 0xef600300 (irq = 20) is a 16550A
console [ttyS1] enabled
ef600200.serial: ttyS0 at MMIO 0xef600200 (irq = 26) is a 16550A
ef600300.serial: ttyS1 at MMIO 0xef600300 (irq = 20) is a 16550A
brd: module loaded
Driver 'sd' needs updating - please use bus_type methods
PPC 4xx OCP EMAC driver, version 3.54
irq: irq 10 on host /interrupt-controller mapped to virtual irq 24
irq: irq 11 on host /interrupt-controller mapped to virtual irq 25
irq: irq 0 on host /interrupt-controller1 mapped to virtual irq 27
irq: irq 1 on host /interrupt-controller1 mapped to virtual irq 29
irq: irq 2 on host /interrupt-controller1 mapped to virtual irq 31
MAL v2 /plb/mcmal, 2 TX channels, 2 RX channels
RGMII /plb/opb/emac-rgmii@ef600b00 initialized with MDIO support
irq: irq 24 on host /interrupt-controller mapped to virtual irq 32
irq: irq 29 on host /interrupt-controller1 mapped to virtual irq 33
/plb/opb/emac-rgmii@ef600b00: input 0 in RGMII mode
eth0: EMAC-0 /plb/opb/ethernet@ef600900, MAC 00:90:f9:10:1a:08
eth0: found Marvell 88E1111 Ethernet PHY (0x04)
irq: irq 25 on host /interrupt-controller mapped to virtual irq 34
irq: irq 31 on host /interrupt-controller1 mapped to virtual irq 35
/plb/opb/emac-rgmii@ef600b00: input 1 in RGMII mode
eth1: EMAC-1 /plb/opb/ethernet@ef600a00, MAC 00:90:f9:10:1a:09
eth1: found Marvell 88E1111 Ethernet PHY (0x05)
fc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
erase region 0: offset=0x0,size=0x8000,blocks=4
erase region 1: offset=0x20000,size=0x20000,blocks=511
RedBoot partition parsing not available
Creating 7 MTD partitions on "fc000000.nor_flash":
0x000000000000-0x000000800000 : "kernel0"
0x000000800000-0x000001000000 : "kernel1"
0x000001000000-0x000001800000 : "kernel2"
0x000001800000-0x000003f40000 : "install"
0x000003f40000-0x000003f60000 : "env0"
0x000003f60000-0x000003f80000 : "env1"
0x000003f80000-0x000004000000 : "u-boot"
irq: irq 8 on host /interrupt-controller mapped to virtual irq 36
spi_ppc4xx_of ef600600.spi: driver initialized
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
dwc_otg: version 2.60a 22-NOV-2006
dwc_otg: Shared Tx FIFO mode
dwc_otg: Using DMA mode
dwc_otg dwc_otg.0: DWC OTG Controller
dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 1
dwc_otg dwc_otg.0: irq 21, io mem 0x00000000
dwc_otg: Init: Port Power? op_state=1
dwc_otg: Init: Power Port (0)
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: DWC OTG Controller
usb usb1: Manufacturer: Linux 2.6.30.3-00063-g0af2edc-dirty dwc_otg_hcd
usb usb1: SerialNumber: dwc_otg.0
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
i2c /dev entries driver
irq: irq 2 on host /interrupt-controller mapped to virtual irq 37
ibm-iic ef600400.i2c: using standard (100 kHz) mode
irq: irq 7 on host /interrupt-controller mapped to virtual irq 38
ibm-iic ef600500.i2c: using standard (100 kHz) mode
lm75: probe of 0-0048 failed with error -121
hwmon-vid: Unknown VRM version of your CPU
PowerPC Book-E Watchdog Timer Loaded
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 17
NET: Registered protocol family 15
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
usb 1-1: new high speed USB device using dwc_otg and address 2
usb 1-1: New USB device found, idVendor=0634, idProduct=0655
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: Real SSD eUSB 2GB
usb 1-1: Manufacturer: Micron Technology
usb 1-1: SerialNumber: 4BF0022700035321
usb 1-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
eth0: link is down
eth0: link is up, 100 HDX
IP-Config: Complete:
     device=eth0, addr=137.237.178.150, mask=255.255.255.0, gw=137.237.178.1,
     host=flx-am, domain=, nis-domain=(none),
     bootserver=137.237.178.9, rootserver=137.237.178.9, rootpath=
Freeing unused kernel memory: 164k init
at24 0-0050: 512 byte 24c04 EEPROM (writable)
at24 0-0052: 512 byte 24c04 EEPROM (writable)
scsi 0:0:0:0: Direct-Access     MICRON   eUSB DISK        1110 PQ: 0 ANSI: 0 CCS
sd 0:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete
sd 0:0:0:0: [sda] 3964928 512-byte hardware sectors: (2.03 GB/1.89 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: [sda] Attached SCSI disk
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda2, internal journal
EXT3-fs: mounted filesystem with journal data mode.
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with journal data mode.
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda3, internal journal
EXT3-fs: mounted filesystem with journal data mode.
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda4, internal journal
EXT3-fs: mounted filesystem with journal data mode.
at24 0-0050: 512 byte 24c04 EEPROM (writable)
at24 0-0052: 512 byte 24c04 EEPROM (writable)
dx83xx 0001:43:00.0: device not available because of BAR 0 [0xa1000000-0xa1ffffff] collisions
dx83xx: probe of 0001:43:00.0 failed with error -22
dx83xx 0001:44:00.0: device not available because of BAR 0 [0xa3000000-0xa3ffffff] collisions
dx83xx: probe of 0001:44:00.0 failed with error -22

^ permalink raw reply

* Re: [PATCH 11/14] PM / AVR32: Use struct syscore_ops instead of sysdevs for PM
From: Rafael J. Wysocki @ 2011-04-26 17:14 UTC (permalink / raw)
  To: Hans-Christian Egtvedt
  Cc: Kevin Hilman, Guan Xuetao, Russell King, Konrad Rzeszutek Wilk,
	Greg KH, LKML, Ralf Baechle, Jeremy Fitzhardinge, Ben Dooks,
	Jiri Kosina, Kay Sievers, Mike Frysinger, Linux PM mailing list,
	linux-omap, linuxppc-dev, linux-arm-kernel
In-Reply-To: <1303820532.3125.12.camel@hcegtvedt>

On Tuesday, April 26, 2011, Hans-Christian Egtvedt wrote:
> On Sun, 2011-04-17 at 23:13 +0200, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> > 
> > Convert some AVR32 architecture's code to using struct syscore_ops
> > objects for power management instead of sysdev classes and sysdevs.
> > 
> > This simplifies the code and reduces the kernel's memory footprint.
> > It also is necessary for removing sysdevs from the kernel entirely in
> > the future.
> > 
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> 
> Acked-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
> 
> Thanks, nice work. Tested and run on hardware.

Thanks!

Rafael

^ permalink raw reply

* Re: [PATCH] powerpc/kexec: Fix build failure on 32-bit SMP
From: Paul Gortmaker @ 2011-04-26 18:25 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: linuxppc-dev
In-Reply-To: <1303693471.3032.212.camel@localhost>

On 11-04-24 09:04 PM, Ben Hutchings wrote:
> Commit b987812b3fcaf70fdf0037589e5d2f5f2453e6ce left
> crash_kexec_wait_realmode() undefined for UP.
> 
> Commit 7c7a81b53e581d727d069cc45df5510516faac31 defined it for UP but
> left it undefined for 32-bit SMP.

Crap,  I'd originally tested it for 32-SMP too, but not retested after
fixing the UP regression.  I'm resolving to not touch this file again. :)

> 
> Seems like people are getting confused by nested #ifdef's, so move the

So true.

> definitions of crash_kexec_wait_realmode() after the #ifdef CONFIG_SMP
> section.

I probably should have done this from the get-go as well.  Oh well.
At least we are progressing towards a more readable file.

> 
> Compile-tested with 32-bit UP, 32-bit SMP and 64-bit SMP configurations.

Since it seems I always get bit by the one combo I skip testing on,
I also tested 64-bit UP as well - just to be extra sure.  Thanks for
fixing my brown paper bag moment.

> 
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Paul.

> ---
> --- a/arch/powerpc/kernel/crash.c
> +++ b/arch/powerpc/kernel/crash.c
> @@ -162,34 +162,6 @@
>  	/* Leave the IPI callback set */
>  }
>  
> -/* wait for all the CPUs to hit real mode but timeout if they don't come in */
> -#ifdef CONFIG_PPC_STD_MMU_64
> -static void crash_kexec_wait_realmode(int cpu)
> -{
> -	unsigned int msecs;
> -	int i;
> -
> -	msecs = 10000;
> -	for (i=0; i < NR_CPUS && msecs > 0; i++) {
> -		if (i == cpu)
> -			continue;
> -
> -		while (paca[i].kexec_state < KEXEC_STATE_REAL_MODE) {
> -			barrier();
> -			if (!cpu_possible(i)) {
> -				break;
> -			}
> -			if (!cpu_online(i)) {
> -				break;
> -			}
> -			msecs--;
> -			mdelay(1);
> -		}
> -	}
> -	mb();
> -}
> -#endif	/* CONFIG_PPC_STD_MMU_64 */
> -
>  /*
>   * This function will be called by secondary cpus or by kexec cpu
>   * if soft-reset is activated to stop some CPUs.
> @@ -234,7 +206,6 @@
>  }
>  
>  #else	/* ! CONFIG_SMP */
> -static inline void crash_kexec_wait_realmode(int cpu) {}
>  
>  static void crash_kexec_prepare_cpus(int cpu)
>  {
> @@ -257,6 +228,36 @@
>  }
>  #endif	/* CONFIG_SMP */
>  
> +/* wait for all the CPUs to hit real mode but timeout if they don't come in */
> +#if defined(CONFIG_SMP) && defined(CONFIG_PPC_STD_MMU_64)
> +static void crash_kexec_wait_realmode(int cpu)
> +{
> +	unsigned int msecs;
> +	int i;
> +
> +	msecs = 10000;
> +	for (i=0; i < NR_CPUS && msecs > 0; i++) {
> +		if (i == cpu)
> +			continue;
> +
> +		while (paca[i].kexec_state < KEXEC_STATE_REAL_MODE) {
> +			barrier();
> +			if (!cpu_possible(i)) {
> +				break;
> +			}
> +			if (!cpu_online(i)) {
> +				break;
> +			}
> +			msecs--;
> +			mdelay(1);
> +		}
> +	}
> +	mb();
> +}
> +#else
> +static inline void crash_kexec_wait_realmode(int cpu) {}
> +#endif	/* CONFIG_SMP && CONFIG_PPC_STD_MMU_64 */
> +
>  /*
>   * Register a function to be called on shutdown.  Only use this if you
>   * can't reset your device in the second kernel.
> 

^ permalink raw reply

* Re: device not available because of BAR 0 collisions
From: Benjamin Herrenschmidt @ 2011-04-26 23:39 UTC (permalink / raw)
  To: Steven A. Falco; +Cc: linuxppc-dev
In-Reply-To: <4DB6CAD0.5030102@harris.com>

On Tue, 2011-04-26 at 09:38 -0400, Steven A. Falco wrote:
> On 04/25/2011 08:01 PM, Benjamin Herrenschmidt wrote:
> > On Mon, 2011-04-25 at 16:10 -0400, Steven A. Falco wrote:
> >> I'm getting an error message when trying to talk to some custom
> >> hardware:
> >>
> >> dx83xx 0001:43:00.0: device not available because of BAR 0
> >> [0xa1000000-0xa1ffffff] collisions
> >>
> >> I see in setup-res.c that this message comes out when there is no
> >> parent for
> >> a device resource.
> > 
> >  .../...
> > 
> > It mostly happens in arch/powerpc/kernel/pci-common.c and the generic
> > setup-res.c
> > 
> > Try #define DEBUG at the top (before the #includes) of pci-common.c and
> > pci_32.c (remove the exiting #undef in the last one) and send us the
> > full dmesg log, along with the output of cat /proc/iomem

Have you set any specific flags ? IE. Modified the value of
ppc_pci_flags from what the 4xx code sets originally ?

It does look to me like some of your device BARs have been setup already
by the firmware in a way that conflict with the way you configure your
ranges, and the kernel doesn't appear to detect nor try to remap that
which would happen if you have the "probe only" flag set.

IE. On your c0000000 bus, you have memory at 90000000 CPU space mapped
to 80000000 PCI space. However, when probing, the kernel finds:

pci 0001:41:00.0: reg 10 32bit mmio: [0x90000000-0x9001ffff]

IE. A BAR was already set with a value of 90000000 PCI-side which is out
of the bounds you have for your bus.

Maybe you really want to configure that second bus to have CPU 90000000
mapped to 90000000 PCI-side ? (IE. a 1:1 mapping). That would be
something to fix in your "ranges" property.

Cheers,
Ben.

> > Cheers,
> > Ben.
> > 
> > 
> > 
> 
> Thanks for the help!
> 
> PCIe 0 has an FPGA connected - it is behaving as expected.  PCIe 1 has the
> PLX PCIe switch followed by a pair of ASICs - they are the ones generating
> the error.
> 
> Here is /proc/iomem:
> 
> 90000000-9fffffff : /plb/pciex@0c0000000
>   90000000-93ffffff : PCI Bus 0001:41
>     90000000-93ffffff : PCI Bus 0001:42
>       90000000-91ffffff : PCI Bus 0001:43
>       92000000-93ffffff : PCI Bus 0001:44
>   94000000-940fffff : PCI Bus 0001:41
>     94000000-9401ffff : 0001:41:00.0
> e0000000-e7ffffff : /plb/pciex@0a0000000
>   e0000000-e5ffffff : PCI Bus 0000:01
>     e0000000-e3ffffff : 0000:01:00.0
>     e4000000-e40fffff : 0000:01:00.0
>     e4100000-e41fffff : 0000:01:00.0
> ef600200-ef600207 : serial
> ef600300-ef600307 : serial
> ef600600-ef600606 : spi_ppc4xx_of
> ef6c0000-ef6cffff : dwc_otg.0
>   ef6c0000-ef6cffff : dwc_otg
> fc000000-ffffffff : fc000000.nor_flash
> 
> And here is dmesg, captured after the failed modprobe, so you can see
> those error messages (DEBUG enabled in pci-common.c and pci_32.c):
> 
> Using Flex-AM machine description
> Linux version 2.6.30.3-00063-g0af2edc-dirty (sfalco@hw1.cs.myharris.net) (gcc version 4.2.2) #35 Tue Apr 26 09:20:23 EDT 2011
> Found initrd at 0xcfba0000:0xcfea1872
> Found legacy serial port 0 for /plb/opb/serial@ef600200
>   mem=ef600200, taddr=ef600200, irq=0, clk=33333333, speed=0
> Found legacy serial port 1 for /plb/opb/serial@ef600300
>   mem=ef600300, taddr=ef600300, irq=0, clk=33333333, speed=0
> Top of RAM: 0x10000000, Total RAM: 0x10000000
> Memory hole size: 0MB
> Zone PFN ranges:
>   DMA      0x00000000 -> 0x00010000
>   Normal   0x00010000 -> 0x00010000
> Movable zone start PFN for each node
> early_node_map[1] active PFN ranges
>     0: 0x00000000 -> 0x00010000
> On node 0 totalpages: 65536
> free_area_init_node: node 0, pgdat c0406bdc, node_mem_map c0443000
>   DMA zone: 512 pages used for memmap
>   DMA zone: 0 pages reserved
>   DMA zone: 65024 pages, LIFO batch:15
> MMU: Allocated 1088 bytes of context maps for 255 contexts
> Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
> Kernel command line: root=/dev/sda2 rw ip=137.237.178.150:137.237.178.9:137.237.178.1:255.255.255.0:flx-am:eth0:off panic=1 console=ttyS1,115200 debug
> NR_IRQS:512
> UIC0 (32 IRQ sources) at DCR 0xc0
> UIC1 (32 IRQ sources) at DCR 0xd0
> irq: irq 30 on host /interrupt-controller mapped to virtual irq 30
> UIC2 (32 IRQ sources) at DCR 0xe0
> irq: irq 28 on host /interrupt-controller mapped to virtual irq 28
> PID hash table entries: 1024 (order: 10, 4096 bytes)
> time_init: decrementer frequency = 400.000000 MHz
> time_init: processor frequency   = 400.000000 MHz
> clocksource: timebase mult[a00000] shift[22] registered
> clockevent: decrementer mult[6666] shift[16] cpu[0]
> I-pipe 2.7-02: pipeline enabled.
> Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
> Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
> Memory: 252092k/262144k available (3944k kernel code, 9744k reserved, 184k data, 204k bss, 164k init)
> Kernel virtual memory layout:
>   * 0xffffe000..0xfffff000  : fixmap
>   * 0xfde00000..0xfe000000  : consistent mem
>   * 0xfde00000..0xfde00000  : early ioremap
>   * 0xd1000000..0xfde00000  : vmalloc & ioremap
> SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> Calibrating delay loop... 798.72 BogoMIPS (lpj=1597440)
> Mount-cache hash table entries: 512
> net_namespace: 520 bytes
> NET: Registered protocol family 16
> PCIE0: Checking link...
> PCIE0: Device detected, waiting for link...
> PCIE0: link is up !
> PCI host bridge /plb/pciex@0a0000000 (primary) ranges:
>  MEM 0x00000000e0000000..0x00000000e7ffffff -> 0x0000000080000000
>   IO 0x00000000e8000000..0x00000000e800ffff -> 0x0000000000000000
> 4xx PCI DMA offset set to 0x00000000
> PCIE0: successfully set as root-complex
> PCIE1: Checking link...
> PCIE1: Device detected, waiting for link...
> PCIE1: link is up !
> PCI host bridge /plb/pciex@0c0000000 (primary) ranges:
>  MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000080000000
>   IO 0x00000000e8010000..0x00000000e801ffff -> 0x0000000000000000
> 4xx PCI DMA offset set to 0x00000000
> PCIE1: successfully set as root-complex
> PCI: Probing PCI hardware
> PCI: Scanning PHB /plb/pciex@0a0000000
> PCI: PHB IO resource    = 00000000fffe0000-00000000fffeffff [100]
> PCI: PHB MEM resource 0 = 00000000e0000000-00000000e7ffffff [200]
> PCI: PHB MEM offset     = 0000000060000000
> PCI: PHB IO  offset     = fffe0000
> pci 0000:00:00.0: reg 10 32bit mmio: [0x000000-0x7fffffff]
> PCI:0000:00:00.0 Resource 0 0000000000000000-000000007fffffff [21208] is unassigned
> PCI: Hiding 4xx host bridge resources 0000:00:00.0
> PCI: Fixup bus devices 0 (PHB)
> pci_busdev_to_OF_node(0,0x0)
>  parent is /plb/pciex@0a0000000
>  result is <NULL>
> PCI: Try to map irq for 0000:00:00.0...
> pci_busdev_to_OF_node(0,0x0)
>  parent is /plb/pciex@0a0000000
>  result is <NULL>
> pci 0000:01:00.0: reg 10 32bit mmio: [0x80000000-0x800fffff]
> pci 0000:01:00.0: reg 14 32bit mmio: [0x80100000-0x801fffff]
> pci 0000:01:00.0: reg 18 32bit mmio: [0x84000000-0x87ffffff]
> PCI:0000:01:00.0 Resource 0 0000000080000000-00000000800fffff [20200] fixup...
> PCI:0000:01:00.0            00000000e0000000-00000000e00fffff
> PCI:0000:01:00.0 Resource 1 0000000080100000-00000000801fffff [20200] fixup...
> PCI:0000:01:00.0            00000000e0100000-00000000e01fffff
> PCI:0000:01:00.0 Resource 2 0000000084000000-0000000087ffffff [20200] fixup...
> PCI:0000:01:00.0            00000000e4000000-00000000e7ffffff
> pci 0000:00:00.0: bridge io port: [0x00-0xfff]
> pci 0000:00:00.0: bridge 32bit mmio: [0x80000000-0x87ffffff]
> PCI:0000:00:00.0 Bus rsrc 0 0000000000000000-0000000000000fff [101] fixup...
> PCI:0000:00:00.0            00000000fffe0000-00000000fffe0fff
> PCI:0000:00:00.0 Bus rsrc 1 0000000080000000-0000000087ffffff [200] fixup...
> PCI:0000:00:00.0            00000000e0000000-00000000e7ffffff
> PCI: Fixup bus devices 1 (0000:00:00.0)
> pci_busdev_to_OF_node(1,0x0)
> PCI: Try to map irq for 0000:01:00.0...
> pci_busdev_to_OF_node(1,0x0)
> pci_busdev_to_OF_node(0,0x0)
>  parent is /plb/pciex@0a0000000
>  result is <NULL>
>  Got one, spec 2 cells (0x00000000 0x00000004...) on /interrupt-controller2
> irq: irq 0 on host /interrupt-controller2 mapped to virtual irq 16
>  Mapped to linux irq 16
> PCI: Scanning PHB /plb/pciex@0c0000000
> PCI: PHB IO resource    = 0000000000000000-000000000000ffff [100]
> PCI: PHB MEM resource 0 = 0000000090000000-000000009fffffff [200]
> PCI: PHB MEM offset     = 0000000010000000
> PCI: PHB IO  offset     = 00000000
> pci 0001:40:00.0: reg 10 32bit mmio: [0x000000-0x7fffffff]
> PCI:0001:40:00.0 Resource 0 0000000000000000-000000007fffffff [21208] is unassigned
> PCI: Hiding 4xx host bridge resources 0001:40:00.0
> PCI: Fixup bus devices 64 (PHB)
> pci_busdev_to_OF_node(64,0x0)
>  parent is /plb/pciex@0c0000000
>  result is <NULL>
> PCI: Try to map irq for 0001:40:00.0...
> pci_busdev_to_OF_node(64,0x0)
>  parent is /plb/pciex@0c0000000
>  result is <NULL>
> pci 0001:41:00.0: reg 10 32bit mmio: [0x90000000-0x9001ffff]
> PCI:0001:41:00.0 Resource 0 0000000090000000-000000009001ffff [20200] fixup...
> PCI:0001:41:00.0            00000000a0000000-00000000a001ffff
> pci 0001:41:00.0: PME# supported from D0 D3hot D3cold
> pci 0001:41:00.0: PME# disabled
> pci 0001:40:00.0: bridge io port: [0x00-0xfff]
> pci 0001:40:00.0: bridge 32bit mmio: [0x90000000-0x94ffffff]
> PCI:0001:40:00.0 Bus rsrc 0 0000000000000000-0000000000000fff [101] fixup...
> PCI:0001:40:00.0            0000000000000000-0000000000000fff
> PCI:0001:40:00.0 Bus rsrc 1 0000000090000000-0000000094ffffff [200] fixup...
> PCI:0001:40:00.0            00000000a0000000-00000000a4ffffff
> PCI: Fixup bus devices 65 (0001:40:00.0)
> pci_busdev_to_OF_node(65,0x0)
> PCI: Try to map irq for 0001:41:00.0...
> pci_busdev_to_OF_node(65,0x0)
> pci_busdev_to_OF_node(64,0x0)
>  parent is /plb/pciex@0c0000000
>  result is <NULL>
>  Got one, spec 2 cells (0x0000000b 0x00000004...) on /interrupt-controller2
> irq: irq 11 on host /interrupt-controller2 mapped to virtual irq 17
>  Mapped to linux irq 17
> pci 0001:42:01.0: PME# supported from D0 D3hot D3cold
> pci 0001:42:01.0: PME# disabled
> pci 0001:42:02.0: PME# supported from D0 D3hot D3cold
> pci 0001:42:02.0: PME# disabled
> pci 0001:41:00.0: bridge 32bit mmio: [0x90100000-0x94ffffff]
> PCI:0001:41:00.0 Bus rsrc 1 0000000090100000-0000000094ffffff [200] fixup...
> PCI:0001:41:00.0            00000000a0100000-00000000a4ffffff
> PCI: Fixup bus devices 66 (0001:41:00.0)
> pci_busdev_to_OF_node(66,0x8)
> PCI: Try to map irq for 0001:42:01.0...
> pci_busdev_to_OF_node(66,0x8)
> pci_busdev_to_OF_node(65,0x0)
> pci_busdev_to_OF_node(64,0x0)
>  parent is /plb/pciex@0c0000000
>  result is <NULL>
>  Got one, spec 2 cells (0x0000000c 0x00000004...) on /interrupt-controller2
> irq: irq 12 on host /interrupt-controller2 mapped to virtual irq 18
>  Mapped to linux irq 18
> pci_busdev_to_OF_node(66,0x10)
> PCI: Try to map irq for 0001:42:02.0...
> pci_busdev_to_OF_node(66,0x10)
> pci_busdev_to_OF_node(65,0x0)
> pci_busdev_to_OF_node(64,0x0)
>  parent is /plb/pciex@0c0000000
>  result is <NULL>
>  Got one, spec 2 cells (0x0000000d 0x00000004...) on /interrupt-controller2
> irq: irq 13 on host /interrupt-controller2 mapped to virtual irq 19
>  Mapped to linux irq 19
> pci 0001:43:00.0: reg 10 32bit mmio: [0x91000000-0x91ffffff]
> pci 0001:43:00.0: reg 14 32bit mmio: [0x92000000-0x92ffffff]
> PCI:0001:43:00.0 Resource 0 0000000091000000-0000000091ffffff [21208] fixup...
> PCI:0001:43:00.0            00000000a1000000-00000000a1ffffff
> PCI:0001:43:00.0 Resource 1 0000000092000000-0000000092ffffff [21208] fixup...
> PCI:0001:43:00.0            00000000a2000000-00000000a2ffffff
> pci 0001:42:01.0: bridge 32bit mmio: [0x90100000-0x92ffffff]
> PCI:0001:42:01.0 Bus rsrc 1 0000000090100000-0000000092ffffff [200] fixup...
> PCI:0001:42:01.0            00000000a0100000-00000000a2ffffff
> PCI: Fixup bus devices 67 (0001:42:01.0)
> pci_busdev_to_OF_node(67,0x0)
> PCI: Try to map irq for 0001:43:00.0...
> pci_busdev_to_OF_node(67,0x0)
> pci_busdev_to_OF_node(66,0x8)
> pci_busdev_to_OF_node(65,0x0)
> pci_busdev_to_OF_node(64,0x0)
>  parent is /plb/pciex@0c0000000
>  result is <NULL>
>  Got one, spec 2 cells (0x0000000c 0x00000004...) on /interrupt-controller2
>  Mapped to linux irq 18
> pci 0001:44:00.0: reg 10 32bit mmio: [0x93000000-0x93ffffff]
> pci 0001:44:00.0: reg 14 32bit mmio: [0x94000000-0x94ffffff]
> PCI:0001:44:00.0 Resource 0 0000000093000000-0000000093ffffff [21208] fixup...
> PCI:0001:44:00.0            00000000a3000000-00000000a3ffffff
> PCI:0001:44:00.0 Resource 1 0000000094000000-0000000094ffffff [21208] fixup...
> PCI:0001:44:00.0            00000000a4000000-00000000a4ffffff
> pci 0001:42:02.0: bridge 32bit mmio: [0x93000000-0x94ffffff]
> PCI:0001:42:02.0 Bus rsrc 1 0000000093000000-0000000094ffffff [200] fixup...
> PCI:0001:42:02.0            00000000a3000000-00000000a4ffffff
> PCI: Fixup bus devices 68 (0001:42:02.0)
> pci_busdev_to_OF_node(68,0x0)
> PCI: Try to map irq for 0001:44:00.0...
> pci_busdev_to_OF_node(68,0x0)
> pci_busdev_to_OF_node(66,0x10)
> pci_busdev_to_OF_node(65,0x0)
> pci_busdev_to_OF_node(64,0x0)
>  parent is /plb/pciex@0c0000000
>  result is <NULL>
>  Got one, spec 2 cells (0x0000000d 0x00000004...) on /interrupt-controller2
>  Mapped to linux irq 19
> PCI: Allocating bus resources for 0000:00...
> PCI: PHB (bus 0) bridge rsrc 0: 00000000fffe0000-00000000fffeffff [0x100], parent c03de440 (PCI IO)
> PCI: PHB (bus 0) bridge rsrc 1: 00000000e0000000-00000000e7ffffff [0x200], parent c03de424 (PCI mem)
> PCI: Allocating bus resources for 0000:01...
> PCI: Allocating bus resources for 0001:40...
> PCI: PHB (bus 64) bridge rsrc 0: 0000000000000000-000000000000ffff [0x100], parent c03de440 (PCI IO)
> PCI: PHB (bus 64) bridge rsrc 1: 0000000090000000-000000009fffffff [0x200], parent c03de424 (PCI mem)
> PCI: Allocating bus resources for 0001:41...
> PCI: Allocating bus resources for 0001:42...
> PCI: Allocating bus resources for 0001:43...
> PCI: Allocating bus resources for 0001:44...
> Reserving legacy ranges for domain 0000
> Candidate legacy IO: [0xfffe0000-0xfffe0fff]
> hose mem offset: 0000000060000000
> hose mem res: [0xe0000000-0xe7ffffff]
> Reserving legacy ranges for domain 0001
> Candidate legacy IO: [0x00-0xfff]
> hose mem offset: 0000000010000000
> hose mem res: [0x90000000-0x9fffffff]
> PCI: Assigning unassigned resources...
> pci 0000:00:00.0: PCI bridge, secondary bus 0000:01
> pci 0000:00:00.0:   IO window: disabled
> pci 0000:00:00.0:   MEM window: 0x80000000-0x85ffffff
> pci 0000:00:00.0:   PREFETCH window: disabled
> pci 0001:42:01.0: PCI bridge, secondary bus 0001:43
> pci 0001:42:01.0:   IO window: disabled
> pci 0001:42:01.0:   MEM window: disabled
> pci 0001:42:01.0:   PREFETCH window: 0x00000080000000-0x00000081ffffff
> pci 0001:42:02.0: PCI bridge, secondary bus 0001:44
> pci 0001:42:02.0:   IO window: disabled
> pci 0001:42:02.0:   MEM window: disabled
> pci 0001:42:02.0:   PREFETCH window: 0x00000082000000-0x00000083ffffff
> pci 0001:41:00.0: PCI bridge, secondary bus 0001:42
> pci 0001:41:00.0:   IO window: disabled
> pci 0001:41:00.0:   MEM window: disabled
> pci 0001:41:00.0:   PREFETCH window: 0x00000080000000-0x00000083ffffff
> pci 0001:40:00.0: PCI bridge, secondary bus 0001:41
> pci 0001:40:00.0:   IO window: disabled
> pci 0001:40:00.0:   MEM window: 0x84000000-0x840fffff
> pci 0001:40:00.0:   PREFETCH window: 0x00000080000000-0x00000083ffffff
> pci_bus 0000:00: resource 0 io:  [0xfffe0000-0xfffeffff]
> pci_bus 0000:00: resource 1 mem: [0xe0000000-0xe7ffffff]
> pci_bus 0000:01: resource 0 mem: [0xfffe0000-0xfffe0fff]
> pci_bus 0000:01: resource 1 mem: [0xe0000000-0xe5ffffff]
> pci_bus 0001:40: resource 0 io:  [0x00-0xffff]
> pci_bus 0001:40: resource 1 mem: [0x90000000-0x9fffffff]
> pci_bus 0001:41: resource 0 mem: [0x0-0xfff]
> pci_bus 0001:41: resource 1 mem: [0x94000000-0x940fffff]
> pci_bus 0001:41: resource 2 pref mem [0x90000000-0x93ffffff]
> pci_bus 0001:42: resource 1 mem: [0xa0100000-0xa4ffffff]
> pci_bus 0001:42: resource 2 pref mem [0x90000000-0x93ffffff]
> pci_bus 0001:43: resource 1 mem: [0xa0100000-0xa2ffffff]
> pci_bus 0001:43: resource 2 pref mem [0x90000000-0x91ffffff]
> pci_bus 0001:44: resource 1 mem: [0xa3000000-0xa4ffffff]
> pci_bus 0001:44: resource 2 pref mem [0x92000000-0x93ffffff]
> bio: create slab <bio-0> at 0
> SCSI subsystem initialized
> usbcore: registered new interface driver usbfs
> usbcore: registered new interface driver hub
> usbcore: registered new device driver usb
> Switched to high resolution mode on CPU 0
> NET: Registered protocol family 2
> IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
> TCP established hash table entries: 8192 (order: 4, 65536 bytes)
> TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
> TCP: Hash tables configured (established 8192 bind 8192)
> TCP reno registered
> NET: Registered protocol family 1
> Trying to unpack rootfs image as initramfs...
> Freeing initrd memory: 3078k freed
> irq: irq 26 on host /interrupt-controller mapped to virtual irq 26
> irq: irq 1 on host /interrupt-controller mapped to virtual irq 20
> irq: irq 30 on host /interrupt-controller2 mapped to virtual irq 21
> irq: irq 26 on host /interrupt-controller1 mapped to virtual irq 22
> irq: irq 12 on host /interrupt-controller mapped to virtual irq 23
> I-pipe: Domain Xenomai registered.
> Xenomai: hal/powerpc started.
> Xenomai: real-time nucleus v2.4.10 (Flavor Crystal 7) loaded.
> Xenomai: starting native API services.
> Xenomai: starting POSIX services.
> Xenomai: starting RTDM services.
> Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
> fuse init (API version 7.11)
> msgmni has been set to 498
> alg: No test for stdrng (krng)
> io scheduler noop registered
> io scheduler anticipatory registered (default)
> io scheduler deadline registered
> io scheduler cfq registered
> aer 0001:41:00.0:pcie12: service driver aer loaded
> aer 0001:42:01.0:pcie22: service driver aer loaded
> aer 0001:42:02.0:pcie22: service driver aer loaded
> pci_hotplug: PCI Hot Plug PCI Core version: 0.5
> Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
> serial8250.0: ttyS0 at MMIO 0xef600200 (irq = 26) is a 16550A
> serial8250.0: ttyS1 at MMIO 0xef600300 (irq = 20) is a 16550A
> console [ttyS1] enabled
> ef600200.serial: ttyS0 at MMIO 0xef600200 (irq = 26) is a 16550A
> ef600300.serial: ttyS1 at MMIO 0xef600300 (irq = 20) is a 16550A
> brd: module loaded
> Driver 'sd' needs updating - please use bus_type methods
> PPC 4xx OCP EMAC driver, version 3.54
> irq: irq 10 on host /interrupt-controller mapped to virtual irq 24
> irq: irq 11 on host /interrupt-controller mapped to virtual irq 25
> irq: irq 0 on host /interrupt-controller1 mapped to virtual irq 27
> irq: irq 1 on host /interrupt-controller1 mapped to virtual irq 29
> irq: irq 2 on host /interrupt-controller1 mapped to virtual irq 31
> MAL v2 /plb/mcmal, 2 TX channels, 2 RX channels
> RGMII /plb/opb/emac-rgmii@ef600b00 initialized with MDIO support
> irq: irq 24 on host /interrupt-controller mapped to virtual irq 32
> irq: irq 29 on host /interrupt-controller1 mapped to virtual irq 33
> /plb/opb/emac-rgmii@ef600b00: input 0 in RGMII mode
> eth0: EMAC-0 /plb/opb/ethernet@ef600900, MAC 00:90:f9:10:1a:08
> eth0: found Marvell 88E1111 Ethernet PHY (0x04)
> irq: irq 25 on host /interrupt-controller mapped to virtual irq 34
> irq: irq 31 on host /interrupt-controller1 mapped to virtual irq 35
> /plb/opb/emac-rgmii@ef600b00: input 1 in RGMII mode
> eth1: EMAC-1 /plb/opb/ethernet@ef600a00, MAC 00:90:f9:10:1a:09
> eth1: found Marvell 88E1111 Ethernet PHY (0x05)
> fc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank
>  Intel/Sharp Extended Query Table at 0x010A
>  Intel/Sharp Extended Query Table at 0x010A
>  Intel/Sharp Extended Query Table at 0x010A
>  Intel/Sharp Extended Query Table at 0x010A
>  Intel/Sharp Extended Query Table at 0x010A
> Using buffer write method
> Using auto-unlock on power-up/resume
> cfi_cmdset_0001: Erase suspend on write enabled
> erase region 0: offset=0x0,size=0x8000,blocks=4
> erase region 1: offset=0x20000,size=0x20000,blocks=511
> RedBoot partition parsing not available
> Creating 7 MTD partitions on "fc000000.nor_flash":
> 0x000000000000-0x000000800000 : "kernel0"
> 0x000000800000-0x000001000000 : "kernel1"
> 0x000001000000-0x000001800000 : "kernel2"
> 0x000001800000-0x000003f40000 : "install"
> 0x000003f40000-0x000003f60000 : "env0"
> 0x000003f60000-0x000003f80000 : "env1"
> 0x000003f80000-0x000004000000 : "u-boot"
> irq: irq 8 on host /interrupt-controller mapped to virtual irq 36
> spi_ppc4xx_of ef600600.spi: driver initialized
> Initializing USB Mass Storage driver...
> usbcore: registered new interface driver usb-storage
> USB Mass Storage support registered.
> dwc_otg: version 2.60a 22-NOV-2006
> dwc_otg: Shared Tx FIFO mode
> dwc_otg: Using DMA mode
> dwc_otg dwc_otg.0: DWC OTG Controller
> dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 1
> dwc_otg dwc_otg.0: irq 21, io mem 0x00000000
> dwc_otg: Init: Port Power? op_state=1
> dwc_otg: Init: Power Port (0)
> usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
> usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> usb usb1: Product: DWC OTG Controller
> usb usb1: Manufacturer: Linux 2.6.30.3-00063-g0af2edc-dirty dwc_otg_hcd
> usb usb1: SerialNumber: dwc_otg.0
> usb usb1: configuration #1 chosen from 1 choice
> hub 1-0:1.0: USB hub found
> hub 1-0:1.0: 1 port detected
> i2c /dev entries driver
> irq: irq 2 on host /interrupt-controller mapped to virtual irq 37
> ibm-iic ef600400.i2c: using standard (100 kHz) mode
> irq: irq 7 on host /interrupt-controller mapped to virtual irq 38
> ibm-iic ef600500.i2c: using standard (100 kHz) mode
> lm75: probe of 0-0048 failed with error -121
> hwmon-vid: Unknown VRM version of your CPU
> PowerPC Book-E Watchdog Timer Loaded
> TCP cubic registered
> Initializing XFRM netlink socket
> NET: Registered protocol family 17
> NET: Registered protocol family 15
> RPC: Registered udp transport module.
> RPC: Registered tcp transport module.
> 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
> All bugs added by David S. Miller <davem@redhat.com>
> usb 1-1: new high speed USB device using dwc_otg and address 2
> usb 1-1: New USB device found, idVendor=0634, idProduct=0655
> usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> usb 1-1: Product: Real SSD eUSB 2GB
> usb 1-1: Manufacturer: Micron Technology
> usb 1-1: SerialNumber: 4BF0022700035321
> usb 1-1: configuration #1 chosen from 1 choice
> scsi0 : SCSI emulation for USB Mass Storage devices
> usb-storage: device found at 2
> usb-storage: waiting for device to settle before scanning
> eth0: link is down
> eth0: link is up, 100 HDX
> IP-Config: Complete:
>      device=eth0, addr=137.237.178.150, mask=255.255.255.0, gw=137.237.178.1,
>      host=flx-am, domain=, nis-domain=(none),
>      bootserver=137.237.178.9, rootserver=137.237.178.9, rootpath=
> Freeing unused kernel memory: 164k init
> at24 0-0050: 512 byte 24c04 EEPROM (writable)
> at24 0-0052: 512 byte 24c04 EEPROM (writable)
> scsi 0:0:0:0: Direct-Access     MICRON   eUSB DISK        1110 PQ: 0 ANSI: 0 CCS
> sd 0:0:0:0: Attached scsi generic sg0 type 0
> usb-storage: device scan complete
> sd 0:0:0:0: [sda] 3964928 512-byte hardware sectors: (2.03 GB/1.89 GiB)
> sd 0:0:0:0: [sda] Write Protect is off
> sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
> sd 0:0:0:0: [sda] Assuming drive cache: write through
> sd 0:0:0:0: [sda] Assuming drive cache: write through
>  sda: sda1 sda2 sda3 sda4
> sd 0:0:0:0: [sda] Attached SCSI disk
> kjournald starting.  Commit interval 5 seconds
> EXT3 FS on sda2, internal journal
> EXT3-fs: mounted filesystem with journal data mode.
> kjournald starting.  Commit interval 5 seconds
> EXT3 FS on sda1, internal journal
> EXT3-fs: mounted filesystem with journal data mode.
> kjournald starting.  Commit interval 5 seconds
> EXT3 FS on sda3, internal journal
> EXT3-fs: mounted filesystem with journal data mode.
> kjournald starting.  Commit interval 5 seconds
> EXT3 FS on sda4, internal journal
> EXT3-fs: mounted filesystem with journal data mode.
> at24 0-0050: 512 byte 24c04 EEPROM (writable)
> at24 0-0052: 512 byte 24c04 EEPROM (writable)
> dx83xx 0001:43:00.0: device not available because of BAR 0 [0xa1000000-0xa1ffffff] collisions
> dx83xx: probe of 0001:43:00.0 failed with error -22
> dx83xx 0001:44:00.0: device not available because of BAR 0 [0xa3000000-0xa3ffffff] collisions
> dx83xx: probe of 0001:44:00.0 failed with error -22

^ permalink raw reply

* linux-next: ibmveth runtime errors
From: Stephen Rothwell @ 2011-04-27  4:49 UTC (permalink / raw)
  To: ppc-dev
  Cc: netdev, LKML, "Michał Mirosław", linux-next,
	Santiago Leon, David Miller

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

Hi all,

For the last couple of days, linux-next booting on a few of our Power
partitions (but not all) have produced this error (over and over):

ibmveth 3000000b: eth0: tx: h_send_logical_lan failed with rc=-4

Linus' tree seems to boot fine on these partitions.  The only commit
directly affecting ibmveth in linux-next is b9367bf3ee6d ("net: ibmveth:
convert to hw_features") which first appeared in next-20110421 which is
also the first one that failed.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: hvc_console: Don't access hvc_task if not initialised
From: Rusty Russell @ 2011-04-27  5:01 UTC (permalink / raw)
  To: Amit Shah, Greg KH; +Cc: linux-kernel, Milton Miller, linuxppc-dev
In-Reply-To: <20110420170610.GA6013@amit-x200.redhat.com>

On Wed, 20 Apr 2011 22:36:10 +0530, Amit Shah <amit.shah@redhat.com> wrote:
> On (Wed) 20 Apr 2011 [07:34:35], Greg KH wrote:
> > Care to either create this patch, or resend your original one, if you
> > want it applied?
> 
> Rusty has the other one queued.  I pinged him about status.

It's merged, but I don't think it had the requisite cc:stable, did it?

Thanks,
Rusty.

^ permalink raw reply

* [PATCH] powerpc/85xx: add host-pci(e) bridge only for RC
From: Prabhakar Kushwaha @ 2011-04-27  5:35 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: meet2prabhu, Vivek Mahajan, Prabhakar Kushwaha

FSL PCIe controller can act as agent(EP) or host(RC).
Under Agent(EP) mode they are configured via Host. So it is not required to add
with the PCI(e) sub-system.

Add and configure PCIe controller only for RC mode.

Signed-off-by: Vivek Mahajan <vivek.mahajan@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
 Based upon git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git(branch master)

 arch/powerpc/sysdev/fsl_pci.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 68ca929..87ac11b 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -323,6 +323,7 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary)
 	struct pci_controller *hose;
 	struct resource rsrc;
 	const int *bus_range;
+	u8 is_agent;
 
 	if (!of_device_is_available(dev)) {
 		pr_warning("%s: disabled\n", dev->full_name);
@@ -353,6 +354,19 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary)
 
 	setup_indirect_pci(hose, rsrc.start, rsrc.start + 0x4,
 		PPC_INDIRECT_TYPE_BIG_ENDIAN);
+
+	early_read_config_byte(hose, 0, 0, PCI_HEADER_TYPE, &is_agent);
+	if ((is_agent & 0x7f) == PCI_HEADER_TYPE_NORMAL) {
+		u32 temp;
+
+		temp = (u32)hose->cfg_data & ~PAGE_MASK;
+		if (((u32)hose->cfg_data & PAGE_MASK) != (u32)hose->cfg_addr)
+			iounmap(hose->cfg_data - temp);
+		iounmap(hose->cfg_addr);
+		pcibios_free_controller(hose);
+		return 0;
+	}
+
 	setup_pci_cmd(hose);
 
 	/* check PCI express link status */
-- 
1.7.3

^ permalink raw reply related

* Re: hvc_console: Don't access hvc_task if not initialised
From: Amit Shah @ 2011-04-27  6:31 UTC (permalink / raw)
  To: Rusty Russell; +Cc: linuxppc-dev, Greg KH, linux-kernel, Milton Miller
In-Reply-To: <87oc3sl23a.fsf@rustcorp.com.au>

On (Wed) 27 Apr 2011 [14:31:29], Rusty Russell wrote:
> On Wed, 20 Apr 2011 22:36:10 +0530, Amit Shah <amit.shah@redhat.com> wrote:
> > On (Wed) 20 Apr 2011 [07:34:35], Greg KH wrote:
> > > Care to either create this patch, or resend your original one, if you
> > > want it applied?
> > 
> > Rusty has the other one queued.  I pinged him about status.
> 
> It's merged, but I don't think it had the requisite cc:stable, did it?

No, because at the point of submitting I didn't know it would solve
this bug as well.  Greg, can you pick
afa2689e19073cd2e762d0f2c1358fab1ab9f18c for stable?

Thanks,

		Amit

^ permalink raw reply

* RE: [PATCH V4] POWER: perf_event: Skip updating kernel counters if register value shrinks
From: David Laight @ 2011-04-27  7:40 UTC (permalink / raw)
  To: Eric B Munson, benh
  Cc: a.p.zijlstra, linux-kernel, paulus, anton, acme, mingo,
	linuxppc-dev, stable
In-Reply-To: <1302891150-8121-1-git-send-email-emunson@mgebm.net>

I keep telling Eric that the code below is incorrect
modulo arithimetic...

> +static u64 check_and_compute_delta(u64 prev, u64 val)
> +{
> +	u64 delta =3D (val - prev) & 0xfffffffful;
> +
> +	/*
> +	 * POWER7 can roll back counter values, if the new value is
smaller
> +	 * than the previous value it will cause the delta and the
counter to
> +	 * have bogus values unless we rolled a counter over.  If a
coutner is
> +	 * rolled back, it will be smaller, but within 256, which is the
maximum
> +	 * number of events to rollback at once.  If we dectect a
rollback
> +	 * return 0.  This can lead to a small lack of precision in the
> +	 * counters.
> +	 */
> +	if (prev > val && (prev - val) < 256)
> +		delta =3D 0;
> +
> +	return delta;

The code should detect rollback by looking at the value of 'delta'
otherwise there are horrid end effects near 2^32-1.

For instance:
	u32 delta =3D val - prev;
	return delta & 0x80000000 ? 0 : delta;


   David

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox