@@ -54,10 +54,10 @@ 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 long arch_irq_stat_cpu(unsigned int cpu);
#define arch_irq_stat_cpu arch_irq_stat_cpu
-extern u64 arch_irq_stat(void);
+extern unsigned long arch_irq_stat(void);
#define arch_irq_stat arch_irq_stat
@@ -189,9 +189,9 @@ int arch_show_interrupts(struct seq_file *p, int prec)
/*
* /proc/stat helpers
*/
-u64 arch_irq_stat_cpu(unsigned int cpu)
+unsigned long arch_irq_stat_cpu(unsigned int cpu)
{
- u64 sum = READ_ONCE(irq_stats(cpu)->__nmi_count);
+ unsigned long sum = READ_ONCE(irq_stats(cpu)->__nmi_count);
#ifdef CONFIG_X86_LOCAL_APIC
sum += READ_ONCE(irq_stats(cpu)->apic_timer_irqs);
@@ -219,10 +219,9 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
return sum;
}
-u64 arch_irq_stat(void)
+unsigned long arch_irq_stat(void)
{
- u64 sum = atomic_long_read(&irq_err_count);
- return sum;
+ return atomic_long_read(&irq_err_count);
}
static __always_inline void handle_irq(struct irq_desc *desc,
Now that all individual counters consistently use unsigned long, use the same type for their sum. This ensures correct handling of wrap-around (which is more important for i386 at this point). Signed-off-by: Alexei Lozovsky <me@ilammy.net> --- arch/x86/include/asm/hardirq.h | 4 ++-- arch/x86/kernel/irq.c | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-)