[PATCH] fix bogus hotplug cpu warning

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Andrew Morton <akpm@...>, <linux-kernel@...>
Date: Monday, August 27, 2007 - 11:06 am

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>

--- 2.6.23-rc3-git10/kernel/workqueue.c	2007-07-26 19:49:58.000000000 +0100
+++ linux/kernel/workqueue.c	2007-08-26 18:59:16.000000000 +0100
@@ -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);
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] fix bogus hotplug cpu warning, Hugh Dickins, (Mon Aug 27, 11:06 am)
Re: [PATCH] fix bogus hotplug cpu warning, Andrew Morton, (Mon Aug 27, 2:18 pm)
Re: [PATCH] fix bogus hotplug cpu warning, Hugh Dickins, (Mon Aug 27, 4:37 pm)
Re: [PATCH] fix bogus hotplug cpu warning, Andrew Morton, (Mon Aug 27, 4:52 pm)
Re: [PATCH] fix bogus hotplug cpu warning, Hugh Dickins, (Mon Aug 27, 5:09 pm)