
From: Mikael Pettersson <mikpe@csd.uu.se>

- Provide new API function for checking for pending interrupts: on ppc32
  it always returns false.

- Enable performance counter interrupts on the later non-broken IBM 750
  series processors (FX DD2.3, and GX).

Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/perfctr/ppc.c     |    8 ++++++++
 25-akpm/include/asm-ppc/perfctr.h |    4 ++++
 2 files changed, 12 insertions(+)

diff -puN drivers/perfctr/ppc.c~perfctr-ppc32-driver-update drivers/perfctr/ppc.c
--- 25/drivers/perfctr/ppc.c~perfctr-ppc32-driver-update	Fri Nov 12 16:19:41 2004
+++ 25-akpm/drivers/perfctr/ppc.c	Fri Nov 12 16:19:41 2004
@@ -187,6 +187,8 @@ static inline void clear_isuspend_cpu(st
  *
  * 750FX adds dual-PLL support and programmable core frequency switching.
  *
+ * 750FX DD2.3 fixed the DEC/PMI SRR0 corruption erratum.
+ *
  * 74xx
  * ----
  * 7400 adds MMCR2 and BAMR.
@@ -798,7 +800,13 @@ static int __init known_init(void)
 		pll_type = PLL_750;
 		break;
 	case 0x7000: case 0x7001: /* IBM750FX */
+		if ((pvr & 0xFF0F) >= 0x0203)
+			features |= PERFCTR_FEATURE_PCINT;
+		pm_type = PM_750;
+		pll_type = PLL_750FX;
+		break;
 	case 0x7002: /* IBM750GX */
+		features |= PERFCTR_FEATURE_PCINT;
 		pm_type = PM_750;
 		pll_type = PLL_750FX;
 		break;
diff -puN include/asm-ppc/perfctr.h~perfctr-ppc32-driver-update include/asm-ppc/perfctr.h
--- 25/include/asm-ppc/perfctr.h~perfctr-ppc32-driver-update	Fri Nov 12 16:19:41 2004
+++ 25-akpm/include/asm-ppc/perfctr.h	Fri Nov 12 16:19:41 2004
@@ -163,6 +163,10 @@ extern unsigned int perfctr_cpu_identify
 #else
 static inline void perfctr_cpu_set_ihandler(perfctr_ihandler_t x) { }
 #endif
+static inline int perfctr_cpu_has_pending_interrupt(const struct perfctr_cpu_state *state)
+{
+	return 0;
+}
 
 #endif	/* CONFIG_PERFCTR */
 
_
