Re: BUG: using smp_processor_id() during suspend with 2.6.25-rc8

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Pavel Machek
Date: Friday, April 11, 2008 - 3:49 am

On Fri 2008-04-11 01:25:13, Jiri Kosina wrote:

...that is okay in case of just one CPU.


Well, we can discuss it personally.

Yes, it is probably bug that interrupts are enabled there. No, the bug
can't potentially bite the user because there should be just one CPU
"plugged in"... so it is kind of false-positive, too..

Does the warning go away with this?


									Pavel

diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
index 6c90fb9..8195c37 100644
--- a/lib/smp_processor_id.c
+++ b/lib/smp_processor_id.c
@@ -35,6 +35,13 @@ unsigned int debug_smp_processor_id(void
 		goto out;
 
 	/*
+	 * It is valid to assume CPU-locality if there's just one
+	 * CPU active
+	 */
+	if (num_online_cpus() == 1)
+		goto out;
+
+	/*
 	 * Avoid recursion:
 	 */
 	preempt_disable();

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: BUG: using smp_processor_id() during suspend with 2.6. ..., Pavel Machek, (Fri Apr 11, 3:49 am)
Re: BUG: using smp_processor_id() during suspend with 2.6. ..., Rafael J. Wysocki, (Fri Apr 11, 8:27 am)
Re: BUG: using smp_processor_id() during suspend with 2.6. ..., Rafael J. Wysocki, (Fri Apr 11, 8:29 am)