Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32963
b: refs/heads/master
c: 3c829c3
h: refs/heads/master
i:
  32961: ba8912b
  32959: 659ed8e
v: v3
  • Loading branch information
Tim Chen authored and Linus Torvalds committed Jul 31, 2006
1 parent c9264e0 commit c4c1ab0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 953a7f20667a8b6217ea2ac49c0877e957a0130a
refs/heads/master: 3c829c367a1a52550378584a657768217971e587
18 changes: 18 additions & 0 deletions trunk/kernel/softirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ static inline void wakeup_softirqd(void)
* This one is for softirq.c-internal use,
* where hardirqs are disabled legitimately:
*/
#ifdef CONFIG_TRACE_IRQFLAGS
static void __local_bh_disable(unsigned long ip)
{
unsigned long flags;
Expand All @@ -80,6 +81,13 @@ static void __local_bh_disable(unsigned long ip)
trace_softirqs_off(ip);
raw_local_irq_restore(flags);
}
#else /* !CONFIG_TRACE_IRQFLAGS */
static inline void __local_bh_disable(unsigned long ip)
{
add_preempt_count(SOFTIRQ_OFFSET);
barrier();
}
#endif /* CONFIG_TRACE_IRQFLAGS */

void local_bh_disable(void)
{
Expand Down Expand Up @@ -121,12 +129,16 @@ EXPORT_SYMBOL(_local_bh_enable);

void local_bh_enable(void)
{
#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);
#endif
/*
* Are softirqs going to be turned on now:
*/
Expand All @@ -142,18 +154,22 @@ void local_bh_enable(void)
do_softirq();

dec_preempt_count();
#ifdef CONFIG_TRACE_IRQFLAGS
local_irq_restore(flags);
#endif
preempt_check_resched();
}
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:
*/
Expand All @@ -169,7 +185,9 @@ void local_bh_enable_ip(unsigned long ip)
do_softirq();

dec_preempt_count();
#ifdef CONFIG_TRACE_IRQFLAGS
local_irq_restore(flags);
#endif
preempt_check_resched();
}
EXPORT_SYMBOL(local_bh_enable_ip);
Expand Down

0 comments on commit c4c1ab0

Please sign in to comment.