Title: [8945] trunk/arch/blackfin/mach-common/smp.c: Fix bug[#5983] smp_processor_id should be called with preempt disabled
Revision
8945
Author
sonicz
Date
2010-06-25 01:55:16 -0400 (Fri, 25 Jun 2010)

Log Message

Fix bug[#5983] smp_processor_id should be called with preempt disabled
in preemption kernel when hardware irq are enabled.

Modified Paths

Diff

Modified: trunk/arch/blackfin/mach-common/smp.c (8944 => 8945)


--- trunk/arch/blackfin/mach-common/smp.c	2010-06-24 13:56:33 UTC (rev 8944)
+++ trunk/arch/blackfin/mach-common/smp.c	2010-06-25 05:55:16 UTC (rev 8945)
@@ -246,12 +246,13 @@
 {
 	cpumask_t callmap;
 
+	preempt_disable();
 	callmap = cpu_online_map;
 	cpu_clear(smp_processor_id(), callmap);
-	if (cpus_empty(callmap))
-		return 0;
+	if (!cpus_empty(callmap))
+		smp_send_message(callmap, BFIN_IPI_CALL_FUNC, func, info, wait);
 
-	smp_send_message(callmap, BFIN_IPI_CALL_FUNC, func, info, wait);
+	preempt_enable();
 
 	return 0;
 }
@@ -288,12 +289,13 @@
 {
 	cpumask_t callmap;
 
+	preempt_disable();
 	callmap = cpu_online_map;
 	cpu_clear(smp_processor_id(), callmap);
-	if (cpus_empty(callmap))
-		return;
+	if (!cpus_empty(callmap))
+		smp_send_message(callmap, BFIN_IPI_CPU_STOP, NULL, NULL, 0);
 
-	smp_send_message(callmap, BFIN_IPI_CPU_STOP, NULL, NULL, 0);
+	preempt_enable();
 
 	return;
 }
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to