Skip to content

Commit

Permalink
softirq: Use _RET_IP_
Browse files Browse the repository at this point in the history
Use the already defined macro to pass the function return address.

Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1367347569.1784.3.camel@buesod1.americas.hpqcorp.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Davidlohr Bueso authored and KAGA-KOKO committed Jun 28, 2013
1 parent ccc414f commit d2e0847
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions kernel/softirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ static inline void __local_bh_disable(unsigned long ip, unsigned int cnt)

void local_bh_disable(void)
{
__local_bh_disable((unsigned long)__builtin_return_address(0),
SOFTIRQ_DISABLE_OFFSET);
__local_bh_disable(_RET_IP_, SOFTIRQ_DISABLE_OFFSET);
}

EXPORT_SYMBOL(local_bh_disable);
Expand All @@ -139,7 +138,7 @@ static void __local_bh_enable(unsigned int cnt)
WARN_ON_ONCE(!irqs_disabled());

if (softirq_count() == cnt)
trace_softirqs_on((unsigned long)__builtin_return_address(0));
trace_softirqs_on(_RET_IP_);
sub_preempt_count(cnt);
}

Expand Down Expand Up @@ -184,7 +183,7 @@ static inline void _local_bh_enable_ip(unsigned long ip)

void local_bh_enable(void)
{
_local_bh_enable_ip((unsigned long)__builtin_return_address(0));
_local_bh_enable_ip(_RET_IP_);
}
EXPORT_SYMBOL(local_bh_enable);

Expand Down Expand Up @@ -223,8 +222,7 @@ asmlinkage void __do_softirq(void)
pending = local_softirq_pending();
account_irq_enter_time(current);

__local_bh_disable((unsigned long)__builtin_return_address(0),
SOFTIRQ_OFFSET);
__local_bh_disable(_RET_IP_, SOFTIRQ_OFFSET);
lockdep_softirq_enter();

cpu = smp_processor_id();
Expand Down

0 comments on commit d2e0847

Please sign in to comment.