patch-2.4.20 linux-2.4.20/include/linux/kernel_stat.h

Next file: linux-2.4.20/include/linux/limits.h
Previous file: linux-2.4.20/include/linux/kernel.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/include/linux/kernel_stat.h linux-2.4.20/include/linux/kernel_stat.h
@@ -26,7 +26,9 @@
 	unsigned int dk_drive_wblk[DK_MAX_MAJOR][DK_MAX_DISK];
 	unsigned int pgpgin, pgpgout;
 	unsigned int pswpin, pswpout;
-#if !defined(CONFIG_ARCH_S390)
+#if defined (__hppa__) 
+	unsigned int irqs[NR_IRQ_REGS][IRQ_PER_REGION];
+#elif !defined(CONFIG_ARCH_S390)
 	unsigned int irqs[NR_CPUS][NR_IRQS];
 #endif
 	unsigned int context_swtch;
@@ -34,12 +36,22 @@
 
 extern struct kernel_stat kstat;
 
-#if !defined(CONFIG_ARCH_S390)
+extern unsigned long nr_context_switches(void);
+
+#if defined (__hppa__) 
 /*
  * Number of interrupts per specific IRQ source, since bootup
  */
 static inline int kstat_irqs (int irq)
 {
+	return kstat.irqs[IRQ_REGION(irq)][IRQ_OFFSET(irq)];
+}
+#elif !defined(CONFIG_ARCH_S390)
+/*
+ * Number of interrupts per specific IRQ source, since bootup
+ */
+extern inline int kstat_irqs (int irq)
+{
 	int i, sum=0;
 
 	for (i = 0 ; i < smp_num_cpus ; i++)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)