diff options
author | Peter Zijlstra <peterz@infradead.org> | 2013-09-10 06:15:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-09-25 08:07:54 -0400 |
commit | bdb43806589096ac4272fe1307e789846ac08d7c (patch) | |
tree | c854e7e508193766d5cbdd82e8709cfab5ea3be5 /include/linux/hardirq.h | |
parent | 01028747559ac6c6f642a7bbd2875cc4f66b2feb (diff) |
sched: Extract the basic add/sub preempt_count modifiers
Rewrite the preempt_count macros in order to extract the 3 basic
preempt_count value modifiers:
__preempt_count_add()
__preempt_count_sub()
and the new:
__preempt_count_dec_and_test()
And since we're at it anyway, replace the unconventional
$op_preempt_count names with the more conventional preempt_count_$op.
Since these basic operators are equivalent to the previous _notrace()
variants, do away with the _notrace() versions.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/n/tip-ewbpdbupy9xpsjhg960zwbv8@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/hardirq.h')
-rw-r--r-- | include/linux/hardirq.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 1e041063b226..d9cf963ac832 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -33,7 +33,7 @@ extern void rcu_nmi_exit(void); | |||
33 | #define __irq_enter() \ | 33 | #define __irq_enter() \ |
34 | do { \ | 34 | do { \ |
35 | account_irq_enter_time(current); \ | 35 | account_irq_enter_time(current); \ |
36 | add_preempt_count(HARDIRQ_OFFSET); \ | 36 | preempt_count_add(HARDIRQ_OFFSET); \ |
37 | trace_hardirq_enter(); \ | 37 | trace_hardirq_enter(); \ |
38 | } while (0) | 38 | } while (0) |
39 | 39 | ||
@@ -49,7 +49,7 @@ extern void irq_enter(void); | |||
49 | do { \ | 49 | do { \ |
50 | trace_hardirq_exit(); \ | 50 | trace_hardirq_exit(); \ |
51 | account_irq_exit_time(current); \ | 51 | account_irq_exit_time(current); \ |
52 | sub_preempt_count(HARDIRQ_OFFSET); \ | 52 | preempt_count_sub(HARDIRQ_OFFSET); \ |
53 | } while (0) | 53 | } while (0) |
54 | 54 | ||
55 | /* | 55 | /* |
@@ -62,7 +62,7 @@ extern void irq_exit(void); | |||
62 | lockdep_off(); \ | 62 | lockdep_off(); \ |
63 | ftrace_nmi_enter(); \ | 63 | ftrace_nmi_enter(); \ |
64 | BUG_ON(in_nmi()); \ | 64 | BUG_ON(in_nmi()); \ |
65 | add_preempt_count(NMI_OFFSET + HARDIRQ_OFFSET); \ | 65 | preempt_count_add(NMI_OFFSET + HARDIRQ_OFFSET); \ |
66 | rcu_nmi_enter(); \ | 66 | rcu_nmi_enter(); \ |
67 | trace_hardirq_enter(); \ | 67 | trace_hardirq_enter(); \ |
68 | } while (0) | 68 | } while (0) |
@@ -72,7 +72,7 @@ extern void irq_exit(void); | |||
72 | trace_hardirq_exit(); \ | 72 | trace_hardirq_exit(); \ |
73 | rcu_nmi_exit(); \ | 73 | rcu_nmi_exit(); \ |
74 | BUG_ON(!in_nmi()); \ | 74 | BUG_ON(!in_nmi()); \ |
75 | sub_preempt_count(NMI_OFFSET + HARDIRQ_OFFSET); \ | 75 | preempt_count_sub(NMI_OFFSET + HARDIRQ_OFFSET); \ |
76 | ftrace_nmi_exit(); \ | 76 | ftrace_nmi_exit(); \ |
77 | lockdep_on(); \ | 77 | lockdep_on(); \ |
78 | } while (0) | 78 | } while (0) |