Commit 2b94ab2f authored by Fernando Luis Vzquez Cao's avatar Fernando Luis Vzquez Cao Committed by Andi Kleen

[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: default avatarFernando Vazquez <fernando@intellilink.co.jp>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 52d522f5
...@@ -468,8 +468,7 @@ static int lapic_suspend(struct sys_device *dev, pm_message_t state) ...@@ -468,8 +468,7 @@ static int lapic_suspend(struct sys_device *dev, pm_message_t state)
apic_pm_state.apic_tmict = apic_read(APIC_TMICT); apic_pm_state.apic_tmict = apic_read(APIC_TMICT);
apic_pm_state.apic_tdcr = apic_read(APIC_TDCR); apic_pm_state.apic_tdcr = apic_read(APIC_TDCR);
apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR); apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);
local_save_flags(flags); local_irq_save(flags);
local_irq_disable();
disable_local_APIC(); disable_local_APIC();
local_irq_restore(flags); local_irq_restore(flags);
return 0; return 0;
......
...@@ -49,8 +49,7 @@ static void flat_send_IPI_mask(cpumask_t cpumask, int vector) ...@@ -49,8 +49,7 @@ static void flat_send_IPI_mask(cpumask_t cpumask, int vector)
unsigned long cfg; unsigned long cfg;
unsigned long flags; unsigned long flags;
local_save_flags(flags); local_irq_save(flags);
local_irq_disable();
/* /*
* Wait for idle. * Wait for idle.
......
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