Skip to contentSkip to conversation

perfctr ppc32 driver update

PATCH New Mikael Pettersson 1 participant 1 message Nov 12, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 perfctr ppc32 driver update

ppc32 low-level driver updates:
- 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).

 drivers/perfctr/ppc.c     |    8 ++++++++
 include/asm-ppc/perfctr.h |    4 ++++
 2 files changed, 12 insertions(+)
drivers/perfctr/ppc.c +8 -0
diff -rupN linux-2.6.10-rc1-mm5/drivers/perfctr/ppc.c linux-2.6.10-rc1-mm5.perfctr-ppc32-driver-update/drivers/perfctr/ppc.c
@@ -191,6 +191,8 @@ static inline int perfctr_cstatus_has_mm
  *
  * 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.
@@ -886,7 +888,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;
include/asm-ppc/perfctr.h +4 -0
diff -rupN linux-2.6.10-rc1-mm5/include/asm-ppc/perfctr.h linux-2.6.10-rc1-mm5.perfctr-ppc32-driver-update/include/asm-ppc/perfctr.h
@@ -160,6 +160,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 */