diff --git a/arch/metag/include/asm/irqflags.h b/arch/metag/include/asm/irqflags.h index cba5e135bc9af64d3894bc3e812ea487e84202c5..339b16f062eba90c24cbb47e9ec09c38294ed9b3 100644 --- a/arch/metag/include/asm/irqflags.h +++ b/arch/metag/include/asm/irqflags.h @@ -78,16 +78,15 @@ static inline void arch_local_irq_disable(void) asm volatile("MOV TXMASKI,%0\n" : : "r" (flags) : "memory"); } -static inline void arch_local_irq_enable(void) -{ #ifdef CONFIG_SMP - preempt_disable(); - arch_local_irq_restore(get_trigger_mask()); - preempt_enable_no_resched(); +/* Avoid circular include dependencies through */ +void arch_local_irq_enable(void); #else +static inline void arch_local_irq_enable(void) +{ arch_local_irq_restore(get_trigger_mask()); -#endif } +#endif #endif /* (__ASSEMBLY__) */ diff --git a/arch/metag/kernel/traps.c b/arch/metag/kernel/traps.c index 1ad363ce1ee9d16c9727cd6e7541ed688a875dd0..202be405771ec7a093847816ab8600ea2354782e 100644 --- a/arch/metag/kernel/traps.c +++ b/arch/metag/kernel/traps.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -776,17 +777,30 @@ int traps_restore_context(void) #endif #ifdef CONFIG_SMP -unsigned int get_trigger_mask(void) +static inline unsigned int _get_trigger_mask(void) { unsigned long cpu = smp_processor_id(); return per_cpu(trigger_mask, cpu); } +unsigned int get_trigger_mask(void) +{ + return _get_trigger_mask(); +} + static void set_trigger_mask(unsigned int mask) { unsigned long cpu = smp_processor_id(); per_cpu(trigger_mask, cpu) = mask; } + +void arch_local_irq_enable(void) +{ + preempt_disable(); + arch_local_irq_restore(_get_trigger_mask()); + preempt_enable_no_resched(); +} +EXPORT_SYMBOL(arch_local_irq_enable); #else static void set_trigger_mask(unsigned int mask) {