aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/apic.c
diff options
context:
space:
mode:
authorFernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>2006-09-26 04:52:33 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:33 -0400
commit2b94ab2fd55768030e177a6ec224dedd031ad06b (patch)
tree270ebf8207932190d2ec0b725c82dc8039b24fe7 /arch/x86_64/kernel/apic.c
parent52d522f53f137c7903db22f9196a48ad8658fb2b (diff)
[PATCH] Replace local_save_flags+local_irq_disable with
The combination of "local_save_flags" and "local_irq_disable" seems to be equivalent to "local_irq_save" (see code snips below). Consequently, replace occurrences of local_save_flags+local_irq_disable with local_irq_save. * local_irq_save #define raw_local_irq_save(flags) \ do { (flags) = __raw_local_irq_save(); } while (0) static inline unsigned long __raw_local_irq_save(void) { unsigned long flags = __raw_local_save_flags(); raw_local_irq_disable(); return flags; } * local_save_flags #define raw_local_save_flags(flags) \ do { (flags) = __raw_local_save_flags(); } while (0) Signed-off-by: Fernando Vazquez <fernando@intellilink.co.jp> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel/apic.c')
-rw-r--r--arch/x86_64/kernel/apic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
index 660602c51f51..b95d1e378b96 100644
--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -468,8 +468,7 @@ static int lapic_suspend(struct sys_device *dev, pm_message_t state)
468 apic_pm_state.apic_tmict = apic_read(APIC_TMICT); 468 apic_pm_state.apic_tmict = apic_read(APIC_TMICT);
469 apic_pm_state.apic_tdcr = apic_read(APIC_TDCR); 469 apic_pm_state.apic_tdcr = apic_read(APIC_TDCR);
470 apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR); 470 apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);
471 local_save_flags(flags); 471 local_irq_save(flags);
472 local_irq_disable();
473 disable_local_APIC(); 472 disable_local_APIC();
474 local_irq_restore(flags); 473 local_irq_restore(flags);
475 return 0; 474 return 0;