aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pagemap.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2011-06-07 19:13:27 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2011-06-10 09:15:40 -0400
commitbdd4e85dc36cdbcfc1608a5b2a17c80a9db8986a (patch)
tree9cee98e78a5aa6a00f3b7ce805b1e39a0137b4a4 /include/linux/pagemap.h
parent2da8c8bc44b572cbf623629ff736608dc7968436 (diff)
sched: Isolate preempt counting in its own config option
Create a new CONFIG_PREEMPT_COUNT that handles the inc/dec of preempt count offset independently. So that the offset can be updated by preempt_disable() and preempt_enable() even without the need for CONFIG_PREEMPT beeing set. This prepares to make CONFIG_DEBUG_SPINLOCK_SLEEP working with !CONFIG_PREEMPT where it currently doesn't detect code that sleeps inside explicit preemption disabled sections. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Diffstat (limited to 'include/linux/pagemap.h')
-rw-r--r--include/linux/pagemap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 716875e53520..8e38d4c140ff 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -134,7 +134,7 @@ static inline int page_cache_get_speculative(struct page *page)
134 VM_BUG_ON(in_interrupt()); 134 VM_BUG_ON(in_interrupt());
135 135
136#if !defined(CONFIG_SMP) && defined(CONFIG_TREE_RCU) 136#if !defined(CONFIG_SMP) && defined(CONFIG_TREE_RCU)
137# ifdef CONFIG_PREEMPT 137# ifdef CONFIG_PREEMPT_COUNT
138 VM_BUG_ON(!in_atomic()); 138 VM_BUG_ON(!in_atomic());
139# endif 139# endif
140 /* 140 /*
@@ -172,7 +172,7 @@ static inline int page_cache_add_speculative(struct page *page, int count)
172 VM_BUG_ON(in_interrupt()); 172 VM_BUG_ON(in_interrupt());
173 173
174#if !defined(CONFIG_SMP) && defined(CONFIG_TREE_RCU) 174#if !defined(CONFIG_SMP) && defined(CONFIG_TREE_RCU)
175# ifdef CONFIG_PREEMPT 175# ifdef CONFIG_PREEMPT_COUNT
176 VM_BUG_ON(!in_atomic()); 176 VM_BUG_ON(!in_atomic());
177# endif 177# endif
178 VM_BUG_ON(page_count(page) == 0); 178 VM_BUG_ON(page_count(page) == 0);