diff options
author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2008-12-08 22:19:26 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-12 05:59:49 -0500 |
commit | 915b0d0104b72fd36af088ba4b11b5690bc96a6c (patch) | |
tree | 51b9ef993704c89dfd2c882eaa3f0aa6abff953b /arch/x86/kernel/smp.c | |
parent | fd10902797fc9d6abaf55d9c2e3c6698c90b10c7 (diff) |
x86: hardirq: introduce inc_irq_stat()
Impact: cleanup
Introduce inc_irq_stat() macro and unify irq_stat accounting code.
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/smp.c')
-rw-r--r-- | arch/x86/kernel/smp.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 18f9b19f5f8f..d18537ce2c79 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -178,11 +178,7 @@ static void native_smp_send_stop(void) | |||
178 | void smp_reschedule_interrupt(struct pt_regs *regs) | 178 | void smp_reschedule_interrupt(struct pt_regs *regs) |
179 | { | 179 | { |
180 | ack_APIC_irq(); | 180 | ack_APIC_irq(); |
181 | #ifdef CONFIG_X86_32 | 181 | inc_irq_stat(irq_resched_count); |
182 | __get_cpu_var(irq_stat).irq_resched_count++; | ||
183 | #else | ||
184 | add_pda(irq_resched_count, 1); | ||
185 | #endif | ||
186 | } | 182 | } |
187 | 183 | ||
188 | void smp_call_function_interrupt(struct pt_regs *regs) | 184 | void smp_call_function_interrupt(struct pt_regs *regs) |
@@ -190,11 +186,7 @@ void smp_call_function_interrupt(struct pt_regs *regs) | |||
190 | ack_APIC_irq(); | 186 | ack_APIC_irq(); |
191 | irq_enter(); | 187 | irq_enter(); |
192 | generic_smp_call_function_interrupt(); | 188 | generic_smp_call_function_interrupt(); |
193 | #ifdef CONFIG_X86_32 | 189 | inc_irq_stat(irq_call_count); |
194 | __get_cpu_var(irq_stat).irq_call_count++; | ||
195 | #else | ||
196 | add_pda(irq_call_count, 1); | ||
197 | #endif | ||
198 | irq_exit(); | 190 | irq_exit(); |
199 | } | 191 | } |
200 | 192 | ||
@@ -203,11 +195,7 @@ void smp_call_function_single_interrupt(struct pt_regs *regs) | |||
203 | ack_APIC_irq(); | 195 | ack_APIC_irq(); |
204 | irq_enter(); | 196 | irq_enter(); |
205 | generic_smp_call_function_single_interrupt(); | 197 | generic_smp_call_function_single_interrupt(); |
206 | #ifdef CONFIG_X86_32 | 198 | inc_irq_stat(irq_call_count); |
207 | __get_cpu_var(irq_stat).irq_call_count++; | ||
208 | #else | ||
209 | add_pda(irq_call_count, 1); | ||
210 | #endif | ||
211 | irq_exit(); | 199 | irq_exit(); |
212 | } | 200 | } |
213 | 201 | ||