diff options
author | Keir Fraser <keir@xen.org> | 2011-03-05 11:35:29 +0000 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2011-03-05 11:35:29 +0000 |
commit | d4be35f81ea395a9cc13a2e55a15d0d7596c9b1d (patch) | |
tree | 232616d9a41890aab0f14e437bec9ae758fd9783 | |
parent | 944c704356e71439b525f425103583d4bf856404 (diff) | |
download | xen-d4be35f81ea395a9cc13a2e55a15d0d7596c9b1d.tar.gz xen-d4be35f81ea395a9cc13a2e55a15d0d7596c9b1d.tar.bz2 xen-d4be35f81ea395a9cc13a2e55a15d0d7596c9b1d.zip |
preempt: Disable preemption support for 4.1.
Preemption support is not needed for 4.1 branch as synchronous yield
(via waitqueues) is not used. Furthermore there are still some
unbalanced rcu_lock/unlock usages on some code paths and the stricter
requirements of the preemption subsystem can cause us to BUG out on
them.
Signed-off-by: Keir Fraser <keir@xen.org>
-rw-r--r-- | xen/include/xen/preempt.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/xen/include/xen/preempt.h b/xen/include/xen/preempt.h index 749bc589cb..fe115f965e 100644 --- a/xen/include/xen/preempt.h +++ b/xen/include/xen/preempt.h @@ -16,6 +16,14 @@ DECLARE_PER_CPU(unsigned int, __preempt_count); +/* + * XXX: Preemption support is not needed for 4.1 branch as synchronous + * yield (via waitqueues) is not used. Furthermore there are still some + * unbalanced rcu_lock/unlock usages on some code paths and the stricter + * requirements of the preemption subsystem can cause us to BUG out on them. + */ +#if 0 + #define preempt_count() (this_cpu(__preempt_count)) #define preempt_disable() do { \ @@ -28,6 +36,14 @@ DECLARE_PER_CPU(unsigned int, __preempt_count); preempt_count()--; \ } while (0) +#else + +#define preempt_count() 0 +#define preempt_disable() ((void)0) +#define preempt_enable() ((void)0) + +#endif + #define in_atomic() (preempt_count() || in_irq() || !local_irq_is_enabled()) #endif /* __XEN_PREEMPT_H__ */ |