fix bogus hotplug cpu warning
authorHugh Dickins <hugh@veritas.com>
Mon, 27 Aug 2007 15:06:19 +0000 (16:06 +0100)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 27 Aug 2007 17:27:48 +0000 (10:27 -0700)
Fix bogus DEBUG_PREEMPT warning on x86_64, when cpu brought online after
bootup: current_is_keventd is right to note its use of smp_processor_id
is preempt-safe, but should use raw_smp_processor_id to avoid the warning.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/workqueue.c

index 58e5c152a6bb9c2283937a84ec431eac73fc5b87..e080d1d744cce242b587664445888fa23eeb0b9a 100644 (file)
@@ -635,7 +635,7 @@ int keventd_up(void)
 int current_is_keventd(void)
 {
        struct cpu_workqueue_struct *cwq;
-       int cpu = smp_processor_id();   /* preempt-safe: keventd is per-cpu */
+       int cpu = raw_smp_processor_id(); /* preempt-safe: keventd is per-cpu */
        int ret = 0;
 
        BUG_ON(!keventd_wq);