Google luky.org euqset.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ACPI] ACPI using smp_processor_id in preemptible code


Li Shaohua wrote:
On Mon, 2005-01-10 at 17:55, Pavel Machek wrote:

I enabled CPU hotplug and preemptible debugging... now I get...

BUG: using smp_processor_id() in preemptible [00000001] code:
swapper/0
caller is acpi_processor_idle+0xb/0x235
[<c020ba28>] smp_processor_id+0xa8/0xc0
[<c02338ce>] acpi_processor_idle+0xb/0x235
[<c02338c3>] acpi_processor_idle+0x0/0x235
[<c02338ce>] acpi_processor_idle+0xb/0x235
[<c02338c3>] acpi_processor_idle+0x0/0x235
[<c02338c3>] acpi_processor_idle+0x0/0x235
[<c02338c3>] acpi_processor_idle+0x0/0x235
[<c0101115>] cpu_idle+0x75/0x110
[<c04f5988>] start_kernel+0x158/0x180
[<c04f5390>] unknown_bootoption+0x0/0x1e0

It doesn't trouble to me. It's in idle thread.

You mean it does not happen to you? On my machine it fills logs very quickly...

What I mean is idle thread can't be migrated so this doesn't impact the correctness. I guess the preemptible debugging can't recognise such situation.

This patch should help. If it's safe to use smp_processor_id() in acpi_processor_idle use the alternative call.


Signed-off-by: Con Kolivas <kernel@xxxxxxxxxxx>
Index: linux-2.6.10-mm2/drivers/acpi/processor_idle.c
===================================================================
--- linux-2.6.10-mm2.orig/drivers/acpi/processor_idle.c	2005-01-11 12:20:31.399070008 +1100
+++ linux-2.6.10-mm2/drivers/acpi/processor_idle.c	2005-01-11 12:22:19.931570560 +1100
@@ -162,7 +162,7 @@
 	int			sleep_ticks = 0;
 	u32			t1, t2 = 0;
 
-	pr = processors[smp_processor_id()];
+	pr = processors[_smp_processor_id()];
 	if (!pr)
 		return;
 

$B$3$N>pJs$,$"$J$?$NC5$7$F$$?$b$N$+$I$&$+A*Br$7$F$/$@$5$!#(B
yes/$B$^$5$K$3$l$@!*(B   no/$B0c$&$J$!(B   part/$B0lIt8+$D$+$C$?(B   try/$B$3$l$G;n$7$F$_$k(B

$B$"$J$?$,C5$7$F$$?>pJs$O$I$N$h$&$J$3$H$+!"$4<+M3$K5-F~2<$5$!#FC$K!V$^$5$K$3$l$@!*!W$H8@$&>l9g$O5-F~$r$*4j$$7$^$9!#(B
$BNc(B:$B!VJ#?t$N%^%7%s$+$i(BCATV$B7PM3$G(Bipmasquerade$B$rMxMQ$7$F(BWeb$B$r;2>H$7$?$>l9g$N@_Dj$K$D$$F!W(B
References: