Skip to contentSkip to conversation

perfctr x86 driver cleanup

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 perfctr x86 driver cleanup

x86 driver cleanup to be applied on top of yesterday's perfctr interrupt fixes patches:
- Provide API function for checking for pending interrupts. Avoids direct structure access in higher levels, which is required for ppc32.

 include/asm-i386/perfctr.h |    8 ++++++++
 1 files changed, 8 insertions(+)
include/asm-i386/perfctr.h +8 -0
diff -rupN linux-2.6.10-rc1-mm5/include/asm-i386/perfctr.h linux-2.6.10-rc1-mm5.perfctr-x86-driver-update2/include/asm-i386/perfctr.h
@@ -179,8 +179,16 @@ typedef void (*perfctr_ihandler_t)(unsig
 extern void perfctr_cpu_set_ihandler(perfctr_ihandler_t);
 extern void perfctr_cpu_ireload(struct perfctr_cpu_state*);
 extern unsigned int perfctr_cpu_identify_overflow(struct perfctr_cpu_state*);
+static inline int perfctr_cpu_has_pending_interrupt(const struct perfctr_cpu_state *state)
+{
+	return state->pending_interrupt;
+}
 #else
 static inline void perfctr_cpu_set_ihandler(perfctr_ihandler_t x) { }
+static inline int perfctr_cpu_has_pending_interrupt(const struct perfctr_cpu_state *state)
+{
+	return 0;
+}
 #endif
 
 #endif	/* CONFIG_PERFCTR */