--- include/asm-generic/bits/pod.h | 24 ++++++++++++++++++++++++ include/asm-generic/system.h | 22 ++-------------------- 2 files changed, 26 insertions(+), 20 deletions(-) Index: b/include/asm-generic/bits/pod.h =================================================================== --- a/include/asm-generic/bits/pod.h +++ b/include/asm-generic/bits/pod.h @@ -295,4 +295,28 @@ unsigned long long xnarch_get_cpu_time(v EXPORT_SYMBOL(xnarch_get_cpu_time); +#ifdef CONFIG_SMP +spl_t __xnlock_get_irqsave(xnlock_t *lock XNLOCK_DBG_CONTEXT_ARGS) +{ + unsigned long flags; + + rthal_local_irq_save(flags); + + if (__xnlock_get(lock XNLOCK_DBG_PASS_CONTEXT)) + flags |= 2; + + return flags; +} +EXPORT_SYMBOL(__xnlock_get_irqsave); + +void xnlock_put_irqrestore(xnlock_t *lock, spl_t flags) +{ + if (!(flags & 2)) + xnlock_put(lock); + + rthal_local_irq_restore(flags & 1); +} +EXPORT_SYMBOL(xnlock_put_irqrestore); +#endif /* CONFIG_SMP */ + #endif /* !_XENO_ASM_GENERIC_BITS_POD_H */ Index: b/include/asm-generic/system.h =================================================================== --- a/include/asm-generic/system.h +++ b/include/asm-generic/system.h @@ -332,26 +332,8 @@ static inline void xnlock_put(xnlock_t * atomic_set(&lock->owner, ~0); } -static inline spl_t -__xnlock_get_irqsave(xnlock_t *lock XNLOCK_DBG_CONTEXT_ARGS) -{ - unsigned long flags; - - rthal_local_irq_save(flags); - - if (__xnlock_get(lock XNLOCK_DBG_PASS_CONTEXT)) - flags |= 2; - - return flags; -} - -static inline void xnlock_put_irqrestore(xnlock_t *lock, spl_t flags) -{ - if (!(flags & 2)) - xnlock_put(lock); - - rthal_local_irq_restore(flags & 1); -} +spl_t __xnlock_get_irqsave(xnlock_t *lock XNLOCK_DBG_CONTEXT_ARGS); +void xnlock_put_irqrestore(xnlock_t *lock, spl_t flags); static inline int xnarch_send_ipi(xnarch_cpumask_t cpumask) {