From 15a9e03368d8f186751a432740a5a281f45d712d Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Thu, 23 Aug 2012 17:45:31 -0700 Subject: Wrap smp_processor_id in kpreempt_[dis|en]able After surveying the code, the few places where smp_processor_id is used were deemed to be safe to use with a preempt enabled kernel. As such, no core logic had to be changed. These smp_processor_id call sites are simply are wrapped in kpreempt_disable and kpreempt_enabled to prevent the Linux kernel from emitting scary warnings. Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Signed-off-by: Richard Yao Issue #83 --- include/sys/zfs_context.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/sys/zfs_context.h') diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index 7bcdc9e98..6201214ec 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -61,6 +61,7 @@ #include #include #include +#include #include #else /* _KERNEL */ @@ -228,6 +229,9 @@ extern kthread_t *zk_thread_create(caddr_t stk, size_t stksize, proc_t *pp, int state, pri_t pri); extern void zk_thread_join(kt_did_t tid); +#define kpreempt_disable() ((void)0) +#define kpreempt_enable() ((void)0) + #define PS_NONE -1 #define issig(why) (FALSE) -- cgit v1.2.3