All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sparc32,leon: SMP power down implementation
@ 2011-04-26  7:48 Daniel Hellstrom
  2011-04-26  7:53 ` Daniel Hellstrom
  2011-05-16 20:04 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Hellstrom @ 2011-04-26  7:48 UTC (permalink / raw)
  To: sparclinux

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
---
 arch/sparc/kernel/process_32.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
index 1752929..c8cc461 100644
--- a/arch/sparc/kernel/process_32.c
+++ b/arch/sparc/kernel/process_32.c
@@ -128,8 +128,16 @@ void cpu_idle(void)
         set_thread_flag(TIF_POLLING_NRFLAG);
 	/* endless idle loop with no priority at all */
 	while(1) {
-		while (!need_resched())
-			cpu_relax();
+#ifdef CONFIG_SPARC_LEON
+		if (pm_idle) {
+			while (!need_resched())
+				(*pm_idle)();
+		} else
+#endif
+		{
+			while (!need_resched())
+				cpu_relax();
+		}
 		preempt_enable_no_resched();
 		schedule();
 		preempt_disable();
-- 
1.5.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sparc32,leon: SMP power down implementation
  2011-04-26  7:48 [PATCH] sparc32,leon: SMP power down implementation Daniel Hellstrom
@ 2011-04-26  7:53 ` Daniel Hellstrom
  2011-05-16 20:04 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Hellstrom @ 2011-04-26  7:53 UTC (permalink / raw)
  To: sparclinux

Daniel Hellstrom wrote:

>Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
>---
> arch/sparc/kernel/process_32.c |   12 ++++++++++--
> 1 files changed, 10 insertions(+), 2 deletions(-)
>
>diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
>index 1752929..c8cc461 100644
>--- a/arch/sparc/kernel/process_32.c
>+++ b/arch/sparc/kernel/process_32.c
>@@ -128,8 +128,16 @@ void cpu_idle(void)
>         set_thread_flag(TIF_POLLING_NRFLAG);
> 	/* endless idle loop with no priority at all */
> 	while(1) {
>-		while (!need_resched())
>-			cpu_relax();
>+#ifdef CONFIG_SPARC_LEON
>+		if (pm_idle) {
>+			while (!need_resched())
>+				(*pm_idle)();
>+		} else
>+#endif
>+		{
>+			while (!need_resched())
>+				cpu_relax();
>+		}
>  
>

I have made this CONFIG_SPARC_LEON because I'm not sure if other SMP 
SPARC32 supports the pmc idle. One can see from row 109 above that in 
single-processor pmc_idle() is called in the same mannor, however no for 
SMP... perhaps it is a meaning with that? I don't want to break 
anything, if you think is shuold not be ifdeffed I will remove it and 
repost.

Daniel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sparc32,leon: SMP power down implementation
  2011-04-26  7:48 [PATCH] sparc32,leon: SMP power down implementation Daniel Hellstrom
  2011-04-26  7:53 ` Daniel Hellstrom
@ 2011-05-16 20:04 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2011-05-16 20:04 UTC (permalink / raw)
  To: sparclinux

From: Daniel Hellstrom <daniel@gaisler.com>
Date: Tue, 26 Apr 2011 09:48:17 +0200

> Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-16 20:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-26  7:48 [PATCH] sparc32,leon: SMP power down implementation Daniel Hellstrom
2011-04-26  7:53 ` Daniel Hellstrom
2011-05-16 20:04 ` David 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.