* Ultra2 poweroff patch
@ 2005-09-24 9:20 Christopher Zimmermann
2005-09-27 22:58 ` David S. Miller
2005-10-14 22:27 ` David S. Miller
0 siblings, 2 replies; 3+ messages in thread
From: Christopher Zimmermann @ 2005-09-24 9:20 UTC (permalink / raw)
To: sparclinux
[-- Attachment #1: Type: text/plain, Size: 86 bytes --]
Hi,
I don't know why, but the following change lets my Ultra2 poweroff.
Christopher
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 540 bytes --]
--- linux-2.6.13.1/arch/sparc64/prom/misc.c 2005-09-10 04:42:58.000000000 +0200
+++ linux-2.6.13.1_patched/arch/sparc64/prom/misc.c 2005-09-24 11:10:46.000000000 +0200
@@ -83,17 +83,17 @@
#endif
again:
p1275_cmd("exit", P1275_INOUT(0, 0));
goto again; /* PROM is out to get me -DaveM */
}
void prom_halt_power_off(void)
{
-#ifdef CONFIG_SMP
+#ifdef 0 /*CONFIG_SMP*/
smp_promstop_others();
udelay(8000);
#endif
p1275_cmd("SUNW,power-off", P1275_INOUT(0, 0));
/* if nothing else helps, we just halt */
prom_halt();
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Ultra2 poweroff patch
2005-09-24 9:20 Ultra2 poweroff patch Christopher Zimmermann
@ 2005-09-27 22:58 ` David S. Miller
2005-10-14 22:27 ` David S. Miller
1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2005-09-27 22:58 UTC (permalink / raw)
To: sparclinux
From: Christopher Zimmermann <madroach@zakweb.de>
Date: Sat, 24 Sep 2005 11:20:14 +0200
> I don't know why, but the following change lets my Ultra2 poweroff.
I'll try to figure out what's going wrong, thanks for
the report and patch.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Ultra2 poweroff patch
2005-09-24 9:20 Ultra2 poweroff patch Christopher Zimmermann
2005-09-27 22:58 ` David S. Miller
@ 2005-10-14 22:27 ` David S. Miller
1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2005-10-14 22:27 UTC (permalink / raw)
To: sparclinux
From: Christopher Zimmermann <madroach@zakweb.de>
Date: Sat, 24 Sep 2005 11:20:14 +0200
> I don't know why, but the following change lets my Ultra2 poweroff.
Calling SUNW,stop-self turns out to be the wrong thing
to do when we're about to power-off or halt.
The best thing to do would be to quiesce the other
processors inside the kernel, and then make them
just spin in a loop.
But the safest fix is to simply kill the smp_promstop_others()
stuff, as in the patch below which I will push upstream.
Thanks.
diff-tree b4d1b825785847cddee6d104113da913f2ca8efb (from f75884d28a6eae5a422d0454b982da3842f777af)
Author: David S. Miller <davem@davemloft.net>
Date: Fri Oct 14 15:26:08 2005 -0700
[SPARC64]: Fix powering off on SMP.
Doing a "SUNW,stop-self" firmware call on the other cpus is not the
correct thing to do when dropping into the firmware for a halt,
reboot, or power-off.
For now, just do nothing to quiet the other cpus, as the system should
be quiescent enough. Later we may decide to implement smp_send_stop()
like the other SMP platforms do.
Based upon a report from Christopher Zimmermann.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 590df5a..b137fd6 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -1001,13 +1001,6 @@ void smp_penguin_jailcell(int irq, struc
preempt_enable();
}
-extern unsigned long xcall_promstop;
-
-void smp_promstop_others(void)
-{
- smp_cross_call(&xcall_promstop, 0, 0, 0);
-}
-
#define prof_multiplier(__cpu) cpu_data(__cpu).multiplier
#define prof_counter(__cpu) cpu_data(__cpu).counter
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S
index 058b812..e4c9151 100644
--- a/arch/sparc64/mm/ultra.S
+++ b/arch/sparc64/mm/ultra.S
@@ -453,22 +453,6 @@ xcall_flush_dcache_page_spitfire: /* %g1
nop
nop
- .globl xcall_promstop
-xcall_promstop:
- rdpr %pstate, %g2
- wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate
- rdpr %pil, %g2
- wrpr %g0, 15, %pil
- sethi %hi(109f), %g7
- b,pt %xcc, etrap_irq
-109: or %g7, %lo(109b), %g7
- flushw
- call prom_stopself
- nop
- /* We should not return, just spin if we do... */
-1: b,a,pt %xcc, 1b
- nop
-
.data
errata32_hwbug:
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c
index 9b895fa..87f5cfc 100644
--- a/arch/sparc64/prom/misc.c
+++ b/arch/sparc64/prom/misc.c
@@ -68,19 +68,11 @@ void prom_cmdline(void)
local_irq_restore(flags);
}
-#ifdef CONFIG_SMP
-extern void smp_promstop_others(void);
-#endif
-
/* Drop into the prom, but completely terminate the program.
* No chance of continuing.
*/
void prom_halt(void)
{
-#ifdef CONFIG_SMP
- smp_promstop_others();
- udelay(8000);
-#endif
again:
p1275_cmd("exit", P1275_INOUT(0, 0));
goto again; /* PROM is out to get me -DaveM */
@@ -88,10 +80,6 @@ again:
void prom_halt_power_off(void)
{
-#ifdef CONFIG_SMP
- smp_promstop_others();
- udelay(8000);
-#endif
p1275_cmd("SUNW,power-off", P1275_INOUT(0, 0));
/* if nothing else helps, we just halt */
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-10-14 22:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-24 9:20 Ultra2 poweroff patch Christopher Zimmermann
2005-09-27 22:58 ` David S. Miller
2005-10-14 22:27 ` David S. Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.