From f9a462474394c9c99491b246245b8286b9c1b63e Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 18 Jun 2008 09:29:37 +0200 Subject: [PATCH] --- yaml --- r: 100685 b: refs/heads/master c: 0f476b6d91a1395bda6464e653ce66ea9bea7167 h: refs/heads/master i: 100683: 90d26e688a1a33e9211d8df8b2b927427ec089db v: v3 --- [refs] | 2 +- trunk/kernel/softirq.c | 48 ++++++++++-------------------------------- 2 files changed, 12 insertions(+), 38 deletions(-) diff --git a/[refs] b/[refs] index eda2bf5a090b..00e15ee55822 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4620b49f76096fa5183eecad7d689faa898a4c82 +refs/heads/master: 0f476b6d91a1395bda6464e653ce66ea9bea7167 diff --git a/trunk/kernel/softirq.c b/trunk/kernel/softirq.c index 86775340ef1d..2cf2502b7c73 100644 --- a/trunk/kernel/softirq.c +++ b/trunk/kernel/softirq.c @@ -131,23 +131,17 @@ void _local_bh_enable(void) EXPORT_SYMBOL(_local_bh_enable); -void local_bh_enable(void) +static inline void _local_bh_enable_ip(unsigned long ip) { + WARN_ON_ONCE(in_irq() || irqs_disabled()); #ifdef CONFIG_TRACE_IRQFLAGS - unsigned long flags; - - WARN_ON_ONCE(in_irq()); -#endif - WARN_ON_ONCE(irqs_disabled()); - -#ifdef CONFIG_TRACE_IRQFLAGS - local_irq_save(flags); + local_irq_disable(); #endif /* * Are softirqs going to be turned on now: */ if (softirq_count() == SOFTIRQ_OFFSET) - trace_softirqs_on((unsigned long)__builtin_return_address(0)); + trace_softirqs_on(ip); /* * Keep preemption disabled until we are done with * softirq processing: @@ -159,40 +153,20 @@ void local_bh_enable(void) dec_preempt_count(); #ifdef CONFIG_TRACE_IRQFLAGS - local_irq_restore(flags); + local_irq_enable(); #endif preempt_check_resched(); } + +void local_bh_enable(void) +{ + _local_bh_enable_ip((unsigned long)__builtin_return_address(0)); +} EXPORT_SYMBOL(local_bh_enable); void local_bh_enable_ip(unsigned long ip) { -#ifdef CONFIG_TRACE_IRQFLAGS - unsigned long flags; - - WARN_ON_ONCE(in_irq()); - - local_irq_save(flags); -#endif - /* - * Are softirqs going to be turned on now: - */ - if (softirq_count() == SOFTIRQ_OFFSET) - trace_softirqs_on(ip); - /* - * Keep preemption disabled until we are done with - * softirq processing: - */ - sub_preempt_count(SOFTIRQ_OFFSET - 1); - - if (unlikely(!in_interrupt() && local_softirq_pending())) - do_softirq(); - - dec_preempt_count(); -#ifdef CONFIG_TRACE_IRQFLAGS - local_irq_restore(flags); -#endif - preempt_check_resched(); + _local_bh_enable_ip(ip); } EXPORT_SYMBOL(local_bh_enable_ip);