Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121027
b: refs/heads/master
c: 915b0d0
h: refs/heads/master
i:
  121025: 0ec5e04
  121023: 1013ccd
v: v3
  • Loading branch information
Hiroshi Shimamoto authored and Ingo Molnar committed Dec 12, 2008
1 parent 09e03d8 commit 17e9c25
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd10902797fc9d6abaf55d9c2e3c6698c90b10c7
refs/heads/master: 915b0d0104b72fd36af088ba4b11b5690bc96a6c
2 changes: 2 additions & 0 deletions trunk/arch/x86/include/asm/hardirq_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ DECLARE_PER_CPU(irq_cpustat_t, irq_stat);
#define __ARCH_IRQ_STAT
#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat, cpu).member)

#define inc_irq_stat(member) (__get_cpu_var(irq_stat).member++)

void ack_bad_irq(unsigned int irq);
#include <linux/irq_cpustat.h>

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/include/asm/hardirq_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#define __ARCH_IRQ_STAT 1

#define inc_irq_stat(member) add_pda(member, 1)

#define local_softirq_pending() read_pda(__softirq_pending)

#define __ARCH_SET_SOFTIRQ_PENDING 1
Expand Down
13 changes: 3 additions & 10 deletions trunk/arch/x86/kernel/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,11 +783,7 @@ static void local_apic_timer_interrupt(void)
/*
* the NMI deadlock-detector uses this.
*/
#ifdef CONFIG_X86_64
add_pda(apic_timer_irqs, 1);
#else
per_cpu(irq_stat, cpu).apic_timer_irqs++;
#endif
inc_irq_stat(apic_timer_irqs);

evt->event_handler(evt);
}
Expand Down Expand Up @@ -1695,14 +1691,11 @@ void smp_spurious_interrupt(struct pt_regs *regs)
if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f)))
ack_APIC_irq();

#ifdef CONFIG_X86_64
add_pda(irq_spurious_count, 1);
#else
inc_irq_stat(irq_spurious_count);

/* see sw-dev-man vol 3, chapter 7.4.13.5 */
printk(KERN_INFO "spurious APIC interrupt on CPU#%d, "
"should never happen.\n", smp_processor_id());
__get_cpu_var(irq_stat).irq_spurious_count++;
#endif
irq_exit();
}

Expand Down
18 changes: 3 additions & 15 deletions trunk/arch/x86/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,23 +178,15 @@ static void native_smp_send_stop(void)
void smp_reschedule_interrupt(struct pt_regs *regs)
{
ack_APIC_irq();
#ifdef CONFIG_X86_32
__get_cpu_var(irq_stat).irq_resched_count++;
#else
add_pda(irq_resched_count, 1);
#endif
inc_irq_stat(irq_resched_count);
}

void smp_call_function_interrupt(struct pt_regs *regs)
{
ack_APIC_irq();
irq_enter();
generic_smp_call_function_interrupt();
#ifdef CONFIG_X86_32
__get_cpu_var(irq_stat).irq_call_count++;
#else
add_pda(irq_call_count, 1);
#endif
inc_irq_stat(irq_call_count);
irq_exit();
}

Expand All @@ -203,11 +195,7 @@ void smp_call_function_single_interrupt(struct pt_regs *regs)
ack_APIC_irq();
irq_enter();
generic_smp_call_function_single_interrupt();
#ifdef CONFIG_X86_32
__get_cpu_var(irq_stat).irq_call_count++;
#else
add_pda(irq_call_count, 1);
#endif
inc_irq_stat(irq_call_count);
irq_exit();
}

Expand Down
6 changes: 1 addition & 5 deletions trunk/arch/x86/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,7 @@ do_nmi(struct pt_regs *regs, long error_code)
{
nmi_enter();

#ifdef CONFIG_X86_32
{ int cpu; cpu = smp_processor_id(); ++nmi_count(cpu); }
#else
add_pda(__nmi_count, 1);
#endif
inc_irq_stat(__nmi_count);

if (!ignore_nmis)
default_do_nmi(regs);
Expand Down

0 comments on commit 17e9c25

Please sign in to comment.