Strange that this has not being noticed before 2.4 define kstat_irqs as
#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++)
sum += kstat.irqs[cpu_logical_map(i)][irq];
return sum;
}
#endif
But smp_num_cpus is only defined for SMP kernels
on the other hand 2.5 defines it as
#if !defined(CONFIG_ARCH_S390)
/*
* Number of interrupts per specific IRQ source, since bootup
*/
static inline int kstat_irqs (int irq)
{
int i, sum=0;
for (i = 0 ; i < NR_CPUS ; i++)
sum += kstat.irqs[i][irq];
return sum;
}
#endif
which seems correct cause NR_CPUS is defined as 1 for UP
is this a correct patch?
diff -uNr include/linux/kernel_stat.h~ include/linux/kernel_stat.h
--- include/linux/kernel_stat.h~ 2002-09-23 16:16:45.000000000 +0200
+++ include/linux/kernel_stat.h 2002-09-23 16:42:42.000000000 +0200
@@ -54,7 +54,7 @@
{
int i, sum=0;
- for (i = 0 ; i < smp_num_cpus ; i++)
+ for (i = 0 ; i < NR_CPUS ; i++)
sum += kstat.irqs[cpu_logical_map(i)][irq];
return sum;
---------------------------------------------
This message was sent using M-Web Airmail.
JUST LIKE THAT
Are you ready for 10-digit dialling?
To find out how this will affect your Internet connection go to www.mweb.co.za/ten
http://airmail.mweb.co.za/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/