@@ -54,7 +54,7 @@ DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
extern void ack_bad_irq(unsigned int irq);
-extern u64 arch_irq_stat_cpu(unsigned int cpu);
+extern unsigned int arch_irq_stat_cpu(unsigned int cpu);
#define arch_irq_stat_cpu arch_irq_stat_cpu
extern u64 arch_irq_stat(void);
@@ -188,9 +188,9 @@ int arch_show_interrupts(struct seq_file *p, int prec)
/*
* /proc/stat helpers
*/
-u64 arch_irq_stat_cpu(unsigned int cpu)
+unsigned int arch_irq_stat_cpu(unsigned int cpu)
{
- u64 sum = irq_stats(cpu)->__nmi_count;
+ unsigned int sum = irq_stats(cpu)->__nmi_count;
#ifdef CONFIG_X86_LOCAL_APIC
sum += irq_stats(cpu)->apic_timer_irqs;
Like with PowerPC's version, on x86 the interrupt counters that are added here are all unsigned int too (see irq_cpustat_t for x86) as well as mce_exception_count and mce_poll_count. Summing up unsigned int values into u64 does not "handle" overflows, but if any of the individual counters overflows then the computed sum is inaccurate. Signed-off-by: Alexei Lozovsky <me@ilammy.net> --- arch/x86/include/asm/hardirq.h | 2 +- arch/x86/kernel/irq.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)