Commit 97679f9c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] additional arch support for per-cpu kernel_stat

Companion to the previous patch: all the support needed for non-ia32
architectures.
parent fd3e6205
......@@ -528,7 +528,7 @@ show_interrupts(struct seq_file *p, void *v)
#else
for (j = 0; j < NR_CPUS; j++)
if (cpu_online(j))
seq_printf(p, "%10u ", kstat.irqs[j][i]);
seq_printf(p, "%10u ", kstat_cpu(i).irqs[j]);
#endif
seq_printf(p, " %14s", irq_desc[i].handler->typename);
seq_printf(p, " %c%s",
......@@ -590,7 +590,7 @@ handle_irq(int irq, struct pt_regs * regs)
}
irq_enter();
kstat.irqs[cpu][irq]++;
kstat_cpu(i).irqs[irq]++;
spin_lock_irq(&desc->lock); /* mask also the higher prio events */
desc->handler->ack(irq);
/*
......
......@@ -59,7 +59,7 @@ do_entInt(unsigned long type, unsigned long vector, unsigned long la_ptr,
smp_percpu_timer_interrupt(&regs);
cpu = smp_processor_id();
if (cpu != boot_cpuid) {
kstat.irqs[cpu][RTC_IRQ]++;
kstat_cpu(cpu).irqs[RTC_IRQ]++;
} else {
handle_irq(RTC_IRQ, &regs);
}
......
......@@ -217,7 +217,7 @@ do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
desc->triggered = 1;
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
action = desc->action;
if (action)
......@@ -253,7 +253,7 @@ do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
*/
desc->running = 1;
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
do {
struct irqaction *action;
......
......@@ -234,7 +234,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!action)
continue;
seq_printf(p, "%2d: %10u %c %s",
i, kstat.irqs[0][i],
i, kstat_cpu(0).irqs[i],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action = action->next; action; action = action->next) {
......@@ -261,7 +261,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
cpu = smp_processor_id();
irq_enter(cpu);
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
action = irq_action[irq];
if (action) {
......
......@@ -172,7 +172,7 @@ int show_interrupts(struct seq_file *p, void *v)
#else
for (j = 0; j < NR_CPUS; j++)
if (cpu_online(j))
seq_printf(p, "%10u ", kstat.irqs[j][i]);
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
#endif
seq_printf(p, " %14s", idesc->handler->typename);
seq_printf(p, " %s", action->name);
......@@ -346,7 +346,7 @@ unsigned int do_IRQ(unsigned long irq, struct pt_regs *regs)
unsigned int status;
irq_enter();
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
if (desc->status & IRQ_PER_CPU) {
/* no locking required for CPU-local interrupts: */
......
......@@ -350,7 +350,7 @@ void amiga_disable_irq(unsigned int irq)
inline void amiga_do_irq(int irq, struct pt_regs *fp)
{
kstat.irqs[0][SYS_IRQS + irq]++;
kstat_cpu(0).irqs[SYS_IRQS + irq]++;
ami_irq_list[irq]->handler(irq, ami_irq_list[irq]->dev_id, fp);
}
......@@ -358,7 +358,7 @@ void amiga_do_irq_list(int irq, struct pt_regs *fp)
{
irq_node_t *node;
kstat.irqs[0][SYS_IRQS + irq]++;
kstat_cpu(0).irqs[SYS_IRQS + irq]++;
custom.intreq = amiga_intena_vals[irq];
......@@ -479,7 +479,7 @@ int show_amiga_interrupts(struct seq_file *p, void *v)
if (!(node = ami_irq_list[i]))
continue;
seq_printf(p, "ami %2d: %10u ", i,
kstat.irqs[0][SYS_IRQS + i]);
kstat_cpu(0).irqs[SYS_IRQS + i]);
do {
if (node->flags & SA_INTERRUPT)
seq_puts(p, "F ");
......
......@@ -131,7 +131,7 @@ static void cia_handler(int irq, void *dev_id, struct pt_regs *fp)
custom.intreq = base->int_mask;
for (i = 0; i < CIA_IRQS; i++, irq++, mach_irq++) {
if (ints & 1) {
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
base->irq_list[i].handler(mach_irq, base->irq_list[i].dev_id, fp);
}
ints >>= 1;
......@@ -166,7 +166,7 @@ int cia_get_irq_list(struct ciabase *base, struct seq_file *p)
j = base->cia_irq;
for (i = 0; i < CIA_IRQS; i++) {
seq_printf(p, "cia %2d: %10d ", j + i,
kstat.irqs[0][SYS_IRQS + j + i]);
kstat_cpu(0).irqs[SYS_IRQS + j + i]);
seq_puts(p, " ");
seq_printf(p, "%s\n", base->irq_list[i].devname);
}
......
......@@ -191,7 +191,7 @@ __asm__ (__ALIGN_STR "\n" \
" andw #0xfeff,%%sr\n" /* set IPL = 6 again */ \
" orb #(1<<(%c3&7)),%a4:w\n" /* now unmask the int again */ \
" jbra ret_from_interrupt\n" \
: : "i" (&kstat.irqs[0][n+8]), "i" (&irq_handler[n+8]), \
: : "i" (&kstat_cpu(0).irqs[n+8]), "i" (&irq_handler[n+8]), \
"n" (PT_OFF_SR), "n" (n), \
"i" (n & 8 ? (n & 16 ? &tt_mfp.int_mk_a : &mfp.int_mk_a) \
: (n & 16 ? &tt_mfp.int_mk_b : &mfp.int_mk_b)), \
......@@ -297,7 +297,7 @@ atari_prio_irq_handler:\t
addql #8,%%sp
addql #4,%%sp
jbra ret_from_interrupt"
: : "i" (&kstat.irqs[0]), "n" (PT_OFF_FORMATVEC),
: : "i" (&kstat_cpu(0).irqs), "n" (PT_OFF_FORMATVEC),
"m" (local_irq_count(0))
);
for (;;);
......@@ -623,11 +623,11 @@ int show_atari_interrupts(struct seq_file *p, void *v)
continue;
if (i < STMFP_SOURCE_BASE)
seq_printf(p, "auto %2d: %10u ",
i, kstat.irqs[0][i]);
i, kstat_cpu(0).irqs[i]);
else
seq_printf(p, "vec $%02x: %10u ",
IRQ_SOURCE_TO_VECTOR(i),
kstat.irqs[0][i]);
kstat_cpu(0).irqs[i]);
if (irq_handler[i].handler != atari_call_irq_list) {
seq_printf(p, "%s\n", irq_param[i].devname);
......
......@@ -231,7 +231,7 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
{
if (vec >= VEC_INT1 && vec <= VEC_INT7 && !MACH_IS_BVME6000) {
vec -= VEC_SPUR;
kstat.irqs[0][vec]++;
kstat_cpu(0).irqs[vec]++;
irq_list[vec].handler(vec, irq_list[vec].dev_id, fp);
} else {
if (mach_process_int)
......@@ -250,7 +250,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (mach_default_handler) {
for (i = 0; i < SYS_IRQS; i++) {
seq_printf(p, "auto %2d: %10u ", i,
i ? kstat.irqs[0][i] : num_spurious);
i ? kstat_cpu(0).irqs[i] : num_spurious);
seq_puts(p, " ");
seq_printf(p, "%s\n", irq_list[i].devname);
}
......
......@@ -345,7 +345,7 @@ void mac_do_irq_list(int irq, struct pt_regs *fp)
irq_node_t *node, *slow_nodes;
unsigned long cpu_flags;
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
#ifdef DEBUG_SPURIOUS
if (!mac_irq_list[irq] && (console_loglevel > 7)) {
......@@ -620,7 +620,7 @@ int show_mac_interrupts(struct seq_file *p, void *v)
case 8: base = "bbn";
break;
}
seq_printf(p, "%4s %2d: %10u ", base, i, kstat.irqs[0][i]);
seq_printf(p, "%4s %2d: %10u ", base, i, kstat_cpu(0).irqs[i]);
do {
if (node->flags & IRQ_FLG_FAST) {
......
......@@ -58,7 +58,7 @@ void sun3_disable_irq(unsigned int irq)
inline void sun3_do_irq(int irq, struct pt_regs *fp)
{
kstat.irqs[0][SYS_IRQS + irq]++;
kstat_cpu(0).irqs[SYS_IRQS + irq]++;
*sun3_intreg &= ~(1<<irq);
*sun3_intreg |= (1<<irq);
}
......@@ -71,13 +71,14 @@ int show_sun3_interrupts(struct seq_file *p, void *v)
static void sun3_int7(int irq, void *dev_id, struct pt_regs *fp)
{
sun3_do_irq(irq,fp);
if(!(kstat.irqs[0][SYS_IRQS + irq] % 2000))
sun3_leds(led_pattern[(kstat.irqs[0][SYS_IRQS+irq]%16000)/2000]);
if(!(kstat_cpu(0).irqs[SYS_IRQS + irq] % 2000))
sun3_leds(led_pattern[(kstat_cpu(0).irqs[SYS_IRQS+irq]%16000)
/2000]);
}
static void sun3_int5(int irq, void *dev_id, struct pt_regs *fp)
{
kstat.irqs[0][SYS_IRQS + irq]++;
kstat_cpu(0).irqs[SYS_IRQS + irq]++;
#ifdef CONFIG_SUN3
intersil_clear();
#endif
......@@ -87,8 +88,8 @@ static void sun3_int5(int irq, void *dev_id, struct pt_regs *fp)
intersil_clear();
#endif
do_timer(fp);
if(!(kstat.irqs[0][SYS_IRQS + irq] % 20))
sun3_leds(led_pattern[(kstat.irqs[0][SYS_IRQS+irq]%160)
if(!(kstat_cpu(0).irqs[SYS_IRQS + irq] % 20))
sun3_leds(led_pattern[(kstat_cpu(0).irqs[SYS_IRQS+irq]%160)
/20]);
}
......@@ -107,7 +108,7 @@ static void sun3_inthandle(int irq, void *dev_id, struct pt_regs *fp)
if(sun3_inthandler[irq] == NULL)
panic ("bad interrupt %d received (id %p)\n",irq, dev_id);
kstat.irqs[0][SYS_IRQS + irq]++;
kstat_cpu(0).irqs[SYS_IRQS + irq]++;
*sun3_intreg &= ~(1<<irq);
sun3_inthandler[irq](irq, dev_ids[irq], fp);
......
......@@ -68,7 +68,7 @@ void mips_timer_interrupt(struct pt_regs *regs)
goto null;
do {
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
do_timer(regs);
r4k_cur += r4k_offset;
ack_r4ktimer(r4k_cur);
......
......@@ -152,7 +152,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!action)
continue;
seq_printf(p, "%2d: %8d %c %s",
i, kstat.irqs[0][i],
i, kstat_cpu(0).irqs[i],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
......@@ -180,7 +180,7 @@ static void do_IRQ(int irq, struct pt_regs * regs)
cpu = smp_processor_id();
irq_enter(cpu, irq);
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
mask_irq(irq);
action = *(irq + irq_action);
......
......@@ -103,7 +103,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!action)
continue;
seq_printf(p, "%2d: %8d %c %s",
i, kstat.irqs[0][i],
i, kstat_cpu(0).irqs[i],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action = action->next; action; action = action->next) {
......@@ -130,7 +130,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
cpu = smp_processor_id();
irq_enter(cpu, irq);
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
mask_irq(irq);
action = *(irq + irq_action);
......
......@@ -256,7 +256,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
cpu = smp_processor_id();
irq_enter(cpu, irq);
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
#if 0
if (irq_desc[irq].handler && irq_desc[irq].handler->ack) {
// printk("invoking ack handler\n");
......
......@@ -244,7 +244,7 @@ asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs)
struct irqaction * action;
unsigned int status;
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
spin_lock(&desc->lock);
desc->handler->ack(irq);
/*
......
......@@ -134,7 +134,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!action)
continue;
seq_printf(p, "%2d: %8d %c %s",
i, kstat.irqs[0][i],
i, kstat_cpu(0).irqs[i],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
......@@ -176,7 +176,7 @@ asmlinkage void i8259_do_irq(int irq, struct pt_regs *regs)
i8259_mask_and_ack_irq(irq);
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
action = *(irq + irq_action);
if (!action)
......@@ -214,7 +214,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
cpu = smp_processor_id();
irq_enter(cpu, irq);
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
action = *(irq + irq_action);
if (action) {
......
......@@ -424,7 +424,7 @@ r4k_timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
*/
write_32bit_cp0_register (CP0_COMPARE,
(unsigned long) (count + r4k_interval));
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
#endif
timer_interrupt(irq, dev_id, regs);
......
......@@ -369,7 +369,7 @@ asmlinkage void ll_timer_interrupt(int irq, struct pt_regs *regs)
int cpu = smp_processor_id();
irq_enter(cpu, irq);
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
/* we keep interrupt disabled all the time */
timer_interrupt(irq, NULL, regs);
......
......@@ -105,7 +105,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!action)
continue;
seq_printf(p, "%2d: %8d %c %s",
num, kstat.irqs[0][num],
num, kstat_cpu(0).irqs[num],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
......@@ -202,7 +202,7 @@ void atlas_hw0_irqdispatch(struct pt_regs *regs)
}
irq_enter(cpu, irq);
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
action->handler(irq, action->dev_id, regs);
irq_exit(cpu, irq);
......
......@@ -139,7 +139,7 @@ void mips_timer_interrupt(struct pt_regs *regs)
goto null;
do {
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
do_timer(regs);
/* Historical comment/code:
......
......@@ -125,7 +125,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!action)
continue;
seq_printf(p, "%2d: %8d %c %s",
i, kstat.irqs[0][i],
i, kstat_cpu(0).irqs[i],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action = action->next; action; action = action->next) {
......@@ -161,7 +161,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
cpu = smp_processor_id();
irq_enter(cpu, irq);
kstat.irqs[cpu][irq]++;
kstat_cpu(0).irqs[irq]++;
if (irq == 20) {
printk("20 %08lx %08lx\n %08lx %08lx\n %08lx\n",
......
......@@ -418,7 +418,7 @@ void indy_buserror_irq(struct pt_regs *regs)
int irq = 6;
irq_enter(cpu, irq);
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
printk("Got a bus error IRQ, shouldn't happen yet\n");
show_regs(regs);
printk("Spinning...\n");
......
......@@ -13,7 +13,7 @@ void indy_8254timer_irq(void)
int irq = 4;
irq_enter(cpu, irq);
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
printk("indy_8254timer_irq: Whoops, should not have gotten this IRQ\n");
prom_getchar();
ArcEnterInteractiveMode();
......
......@@ -101,7 +101,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!action)
continue;
seq_printf(p, "%2d: %8d %c %s",
num, kstat.irqs[0][num],
num, kstat_cpu(0).irqs[num],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
......@@ -198,7 +198,7 @@ void atlas_hw0_irqdispatch(struct pt_regs *regs)
}
irq_enter(cpu, irq);
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
action->handler(irq, action->dev_id, regs);
irq_exit(cpu, irq);
......
......@@ -138,7 +138,7 @@ void mips_timer_interrupt(struct pt_regs *regs)
goto null;
do {
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
do_timer(regs);
/* Historical comment/code:
......
......@@ -131,7 +131,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!action)
continue;
seq_printf(p, "%2d: %8d %c %s",
num, kstat.irqs[0][num],
num, kstat_cpu(0).irqs[num],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
......@@ -146,7 +146,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!action)
continue;
seq_printf(p, "%2d: %8d %c %s",
num, kstat.irqs[0][num],
num, kstat_cpu(0).irqs[num],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
......@@ -322,7 +322,7 @@ void malta_hw0_irqdispatch(struct pt_regs *regs)
return;
irq_enter(cpu, irq);
kstat.irqs[0][irq + 8]++;
kstat_cpu(0).irqs[irq + 8]++;
do {
action->handler(irq, action->dev_id, regs);
action = action->next;
......
......@@ -243,7 +243,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!action)
continue;
seq_printf(p, "%2d: %8d %c %s",
num, kstat.irqs[0][num],
num, kstat_cpu(0).irqs[num],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
......@@ -258,7 +258,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!action)
continue;
seq_printf(p, "%2d: %8d %c %s",
num, kstat.irqs[0][num],
num, kstat_cpu(0).irqs[num],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
......@@ -285,7 +285,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
cpu = smp_processor_id();
irq_enter(cpu, irq);
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
panic(KERN_DEBUG "Got irq %d, press a key.", irq);
......@@ -444,7 +444,7 @@ void indy_local0_irqdispatch(struct pt_regs *regs)
}
irq_enter(cpu, irq);
kstat.irqs[0][irq + 16]++;
kstat_cpu(0).irqs[irq + 16]++;
action->handler(irq, action->dev_id, regs);
irq_exit(cpu, irq);
}
......@@ -468,7 +468,7 @@ void indy_local1_irqdispatch(struct pt_regs *regs)
action = local_irq_action[irq];
}
irq_enter(cpu, irq);
kstat.irqs[0][irq + 24]++;
kstat_cpu(0).irqs[irq + 24]++;
action->handler(irq, action->dev_id, regs);
irq_exit(cpu, irq);
}
......@@ -479,7 +479,7 @@ void indy_buserror_irq(struct pt_regs *regs)
int irq = 6;
irq_enter(cpu, irq);
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
printk("Got a bus error IRQ, shouldn't happen yet\n");
show_regs(regs);
printk("Spinning...\n");
......
......@@ -98,7 +98,7 @@ void indy_timer_interrupt(struct pt_regs *regs)
else
r4k_cur += r4k_offset;
ack_r4ktimer(r4k_cur);
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
do_timer(regs);
/* We update the Dallas time of day approx. every 11 minutes,
......@@ -236,7 +236,7 @@ void indy_8254timer_irq(void)
int irq = 4;
irq_enter(cpu, irq);
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
panic("indy_8254timer_irq: Whoops, should not have gotten this IRQ\n");
irq_exit(cpu, irq);
}
......
......@@ -146,7 +146,7 @@ int show_interrupts(struct seq_file *p, void *v)
action = irq_action[i];
if (!action)
continue;
seq_printf(p, "%2d: %8d %c %s", i, kstat.irqs[0][i],
seq_printf(p, "%2d: %8d %c %s", i, kstat_cpu(0).irqs[i],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
......@@ -170,7 +170,7 @@ static void do_IRQ(cpuid_t thiscpu, int irq, struct pt_regs * regs)
int do_random;
irq_enter(thiscpu, irq);
kstat.irqs[thiscpu][irq]++;
kstat_cpu(thiscpu).irqs[irq]++;
action = *(irq + irq_action);
if (action) {
......
......@@ -103,7 +103,7 @@ void rt_timer_interrupt(struct pt_regs *regs)
if (LOCAL_HUB_L(PI_RT_COUNT) >= ct_cur[cpu])
goto again;
kstat.irqs[cpu][irq]++; /* kstat only for bootcpu? */
kstat_cpu(cpu).irqs[irq]++; /* kstat only for bootcpu? */
if (cpu == 0)
do_timer(regs);
......
......@@ -232,7 +232,7 @@ int show_interrupts(struct seq_file *p, void *v)
#else
for (j = 0; j < smp_num_cpus; j++)
seq_printf(p, "%10u ",
kstat.irqs[cpu_logical_map(j)][irq_no]);
kstat_cpu(cpu_logical_map(j)).irqs[irq_no]);
#endif
seq_printf(p, " %14s",
region->data.name ? region->data.name : "N/A");
......
......@@ -189,7 +189,7 @@ inline void amiga_do_irq(int irq, struct pt_regs *fp)
irq_desc_t *desc = irq_desc + irq;
struct irqaction *action = desc->action;
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
action->handler(irq, action->dev_id, fp);
}
......@@ -198,7 +198,7 @@ void amiga_do_irq_list(int irq, struct pt_regs *fp)
irq_desc_t *desc = irq_desc + irq;
struct irqaction *action;
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
custom.intreq = ami_intena_vals[irq];
......
......@@ -148,7 +148,7 @@ static void cia_handler(int irq, void *dev_id, struct pt_regs *fp)
custom.intreq = base->int_mask;
for (i = 0; i < CIA_IRQS; i++, irq++) {
if (ints & 1) {
kstat.irqs[0][irq]++;
kstat_cpu(0).irqs[irq]++;
action = desc->action;
action->handler(irq, action->dev_id, fp);
}
......
......@@ -130,7 +130,7 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
{
if (vec >= VEC_INT1 && vec <= VEC_INT7 && !MACH_IS_BVME6000) {
vec -= VEC_SPUR;
kstat.irqs[0][vec]++;
kstat_cpu(0).irqs[vec]++;
irq_list[vec].handler(vec, irq_list[vec].dev_id, fp);
} else {
if (mach_process_int)
......@@ -149,7 +149,7 @@ int m68k_get_irq_list(struct seq_file *p, void *v)
if (mach_default_handler) {
for (i = 0; i < SYS_IRQS; i++) {
seq_printf(p, "auto %2d: %10u ", i,
i ? kstat.irqs[0][i] : num_spurious);
i ? kstat_cpu(0).irqs[i] : num_spurious);
seq_puts(p, " ");
seq_printf(p, "%s\n", irq_list[i].devname);
}
......
......@@ -362,7 +362,7 @@ int show_interrupts(struct seq_file *p, void *v)
for (j = 0; j < NR_CPUS; j++)
if (cpu_online(j))
seq_printf(p, "%10u ",
kstat.irqs[j][i]);
kstat_cpu(j).irqs[i]);
#else
seq_printf(p, "%10u ", kstat_irqs(i));
#endif /* CONFIG_SMP */
......@@ -423,7 +423,7 @@ void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq)
int cpu = smp_processor_id();
irq_desc_t *desc = irq_desc + irq;
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
spin_lock(&desc->lock);
ack_irq(irq);
/*
......
......@@ -357,7 +357,7 @@ int show_interrupts(struct seq_file *p, void *v)
#ifdef CONFIG_SMP
for (j = 0; j < NR_CPUS; j++) {
if (cpu_online(j))
seq_printf(p, "%10u ", kstat.irqs[j][i]);
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
}
#else
seq_printf(p, "%10u ", kstat_irqs(i));
......@@ -484,7 +484,7 @@ void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq)
if (naca->interrupt_controller == IC_OPEN_PIC)
balance_irq(irq);
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
spin_lock(&desc->lock);
ack_irq(irq);
/*
......
......@@ -239,7 +239,7 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5,
:"=z" (irq));
irq = irq_demux(irq);
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
desc = irq_desc + irq;
spin_lock(&desc->lock);
desc->handler->ack(irq);
......
......@@ -124,7 +124,7 @@ int show_interrupts(struct seq_file *p, void *v)
for (j = 0; j < NR_CPUS; j++) {
if (cpu_online(j))
seq_printf(p, "%10u ",
kstat.irqs[cpu_logical_map(j)][i]);
kstat_cpu(cpu_logical_map(j)).irqs[i]);
}
#endif
seq_printf(p, " %c %s",
......@@ -424,7 +424,7 @@ void handler_irq(int irq, struct pt_regs * regs)
smp4m_irq_rotate(cpu);
#endif
action = *(irq + irq_action);
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
do {
if (!action || !action->handler)
unexpected_irq(irq, 0, regs);
......@@ -444,7 +444,7 @@ void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
disable_pil_irq(irq);
irq_enter();
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
floppy_interrupt(irq, dev_id, regs);
irq_exit();
enable_pil_irq(irq);
......
......@@ -102,7 +102,7 @@ found_it: seq_printf(p, "%3d: ", i);
for (x = 0; x < NR_CPUS; x++) {
if (cpu_online)
seq_printf(p, "%10u ",
kstat.irqs[cpu_logical_map(x)][i]);
kstat_cpu(cpu_logical_map(x)).irqs[i]);
}
#endif
seq_printf(p, "%c %s",
......@@ -199,7 +199,7 @@ void sun4d_handler_irq(int irq, struct pt_regs * regs)
cc_set_iclr(1 << irq);
irq_enter();
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
if (!sbusl) {
action = *(irq + irq_action);
if (!action)
......
......@@ -135,7 +135,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!cpu_online(j))
continue;
seq_printf(p, "%10u ",
kstat.irqs[j][i]);
kstat_cpu(j).irqs[i]);
}
#endif
seq_printf(p, " %s:%lx", action->name,
......@@ -738,7 +738,7 @@ void handler_irq(int irq, struct pt_regs *regs)
#endif
irq_enter();
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
if (irq == 9)
kbd_pt_regs = regs;
......@@ -813,7 +813,7 @@ void sparc_floppy_irq(int irq, void *dev_cookie, struct pt_regs *regs)
int cpu = smp_processor_id();
irq_enter();
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
*(irq_work(cpu, irq)) = 0;
bucket = get_ino_in_irqaction(action) + ivector_table;
......
......@@ -967,7 +967,7 @@ void smp_percpu_timer_interrupt(struct pt_regs *regs)
if (cpu == boot_cpu_id) {
irq_enter();
kstat.irqs[cpu][0]++;
kstat_cpu(cpu).irqs[0]++;
timer_tick_interrupt(regs);
irq_exit();
......
......@@ -108,7 +108,7 @@ int get_irq_list(char *buf)
#else
for (j = 0; j < num_online_cpus(); j++)
p += sprintf(p, "%10u ",
kstat.irqs[cpu_logical_map(j)][i]);
kstat_cpu(cpu_logical_map(j)).irqs[i]);
#endif
p += sprintf(p, " %14s", irq_desc[i].handler->typename);
p += sprintf(p, " %s", action->name);
......@@ -283,7 +283,7 @@ unsigned int do_IRQ(int irq, struct uml_pt_regs *regs)
unsigned int status;
irq_enter();
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
spin_lock(&desc->lock);
desc->handler->ack(irq);
/*
......
......@@ -151,7 +151,7 @@ int show_interrupts(struct seq_file *p, void *v)
#else
for_each_cpu(j)
seq_printf(p, "%10u ",
kstat.irqs[j][i]);
kstat_cpu(j).irqs[i]);
#endif
seq_printf(p, " %14s", irq_desc[i].handler->typename);
seq_printf(p, " %s", action->name);
......@@ -328,7 +328,7 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
if (irq > 256) BUG();
irq_enter();
kstat.irqs[cpu][irq]++;
kstat_cpu(cpu).irqs[irq]++;
spin_lock(&desc->lock);
desc->handler->ack(irq);
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment