All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PPC: define the conditions where the ePAPR idle hcall can be supported
@ 2013-03-22 19:12 ` Stuart Yoder
  0 siblings, 0 replies; 4+ messages in thread
From: Stuart Yoder @ 2013-03-22 19:12 UTC (permalink / raw)
  To: mikey
  Cc: chen.gang.flying.transformer, galak, gang.chen, benh, sfr,
	paulus, matt, imunsie, linuxppc-dev, linux-kernel, Stuart Yoder

From: Stuart Yoder <stuart.yoder@freescale.com>

For 32-bit, CONFIG_EPAPR_PARAVIRT pulls in both epapr_paravirt.c
and epapr_hcalls.c which contains the 32-bit paravirt idle loop.

For 64-bit, the paravirt idle loop is in idle_book3e.S and that
source file is included only if CONFIG_PPC_BOOK3E_64 defined.

This patch makes that dependency for 64-bit explicit.

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
---
 arch/powerpc/kernel/epapr_paravirt.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/powerpc/kernel/epapr_paravirt.c b/arch/powerpc/kernel/epapr_paravirt.c
index f3eab85..d44a571 100644
--- a/arch/powerpc/kernel/epapr_paravirt.c
+++ b/arch/powerpc/kernel/epapr_paravirt.c
@@ -23,8 +23,10 @@
 #include <asm/code-patching.h>
 #include <asm/machdep.h>
 
+#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
 extern void epapr_ev_idle(void);
 extern u32 epapr_ev_idle_start[];
+#endif
 
 bool epapr_paravirt_enabled;
 
@@ -47,11 +49,15 @@ static int __init epapr_paravirt_init(void)
 
 	for (i = 0; i < (len / 4); i++) {
 		patch_instruction(epapr_hypercall_start + i, insts[i]);
+#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
 		patch_instruction(epapr_ev_idle_start + i, insts[i]);
+#endif
 	}
 
+#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
 	if (of_get_property(hyper_node, "has-idle", NULL))
 		ppc_md.power_save = epapr_ev_idle;
+#endif
 
 	epapr_paravirt_enabled = true;
 
-- 
1.7.9.7



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

* [PATCH] PPC: define the conditions where the ePAPR idle hcall can be supported
@ 2013-03-22 19:12 ` Stuart Yoder
  0 siblings, 0 replies; 4+ messages in thread
From: Stuart Yoder @ 2013-03-22 19:12 UTC (permalink / raw)
  To: mikey
  Cc: sfr, Stuart Yoder, matt, gang.chen, linux-kernel, paulus,
	imunsie, chen.gang.flying.transformer, linuxppc-dev

From: Stuart Yoder <stuart.yoder@freescale.com>

For 32-bit, CONFIG_EPAPR_PARAVIRT pulls in both epapr_paravirt.c
and epapr_hcalls.c which contains the 32-bit paravirt idle loop.

For 64-bit, the paravirt idle loop is in idle_book3e.S and that
source file is included only if CONFIG_PPC_BOOK3E_64 defined.

This patch makes that dependency for 64-bit explicit.

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
---
 arch/powerpc/kernel/epapr_paravirt.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/powerpc/kernel/epapr_paravirt.c b/arch/powerpc/kernel/epapr_paravirt.c
index f3eab85..d44a571 100644
--- a/arch/powerpc/kernel/epapr_paravirt.c
+++ b/arch/powerpc/kernel/epapr_paravirt.c
@@ -23,8 +23,10 @@
 #include <asm/code-patching.h>
 #include <asm/machdep.h>
 
+#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
 extern void epapr_ev_idle(void);
 extern u32 epapr_ev_idle_start[];
+#endif
 
 bool epapr_paravirt_enabled;
 
@@ -47,11 +49,15 @@ static int __init epapr_paravirt_init(void)
 
 	for (i = 0; i < (len / 4); i++) {
 		patch_instruction(epapr_hypercall_start + i, insts[i]);
+#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
 		patch_instruction(epapr_ev_idle_start + i, insts[i]);
+#endif
 	}
 
+#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
 	if (of_get_property(hyper_node, "has-idle", NULL))
 		ppc_md.power_save = epapr_ev_idle;
+#endif
 
 	epapr_paravirt_enabled = true;
 
-- 
1.7.9.7

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

* Re: [PATCH] PPC: define the conditions where the ePAPR idle hcall can be supported
  2013-03-22 19:12 ` Stuart Yoder
@ 2013-03-25  0:34   ` Michael Neuling
  -1 siblings, 0 replies; 4+ messages in thread
From: Michael Neuling @ 2013-03-25  0:34 UTC (permalink / raw)
  To: Stuart Yoder
  Cc: chen.gang.flying.transformer, galak, gang.chen, benh, sfr,
	paulus, matt, imunsie, linuxppc-dev, linux-kernel

Stuart Yoder <stuart.yoder@freescale.com> wrote:

> From: Stuart Yoder <stuart.yoder@freescale.com>
> 
> For 32-bit, CONFIG_EPAPR_PARAVIRT pulls in both epapr_paravirt.c
> and epapr_hcalls.c which contains the 32-bit paravirt idle loop.
> 
> For 64-bit, the paravirt idle loop is in idle_book3e.S and that
> source file is included only if CONFIG_PPC_BOOK3E_64 defined.
> 
> This patch makes that dependency for 64-bit explicit.
> 
> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>

It works for me.  Thanks.


> ---
>  arch/powerpc/kernel/epapr_paravirt.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/powerpc/kernel/epapr_paravirt.c b/arch/powerpc/kernel/epapr_paravirt.c
> index f3eab85..d44a571 100644
> --- a/arch/powerpc/kernel/epapr_paravirt.c
> +++ b/arch/powerpc/kernel/epapr_paravirt.c
> @@ -23,8 +23,10 @@
>  #include <asm/code-patching.h>
>  #include <asm/machdep.h>
>  
> +#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
>  extern void epapr_ev_idle(void);
>  extern u32 epapr_ev_idle_start[];
> +#endif

You don't need this #ifdef

>  
>  bool epapr_paravirt_enabled;
>  
> @@ -47,11 +49,15 @@ static int __init epapr_paravirt_init(void)
>  
>  	for (i = 0; i < (len / 4); i++) {
>  		patch_instruction(epapr_hypercall_start + i, insts[i]);
> +#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
>  		patch_instruction(epapr_ev_idle_start + i, insts[i]);
> +#endif
>  	}
>  
> +#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
>  	if (of_get_property(hyper_node, "has-idle", NULL))
>  		ppc_md.power_save = epapr_ev_idle;
> +#endif
>  
>  	epapr_paravirt_enabled = true;
>  
> -- 
> 1.7.9.7
> 
> 

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

* Re: [PATCH] PPC: define the conditions where the ePAPR idle hcall can be supported
@ 2013-03-25  0:34   ` Michael Neuling
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Neuling @ 2013-03-25  0:34 UTC (permalink / raw)
  To: Stuart Yoder
  Cc: sfr, matt, gang.chen, linux-kernel, paulus, imunsie,
	chen.gang.flying.transformer, linuxppc-dev

Stuart Yoder <stuart.yoder@freescale.com> wrote:

> From: Stuart Yoder <stuart.yoder@freescale.com>
> 
> For 32-bit, CONFIG_EPAPR_PARAVIRT pulls in both epapr_paravirt.c
> and epapr_hcalls.c which contains the 32-bit paravirt idle loop.
> 
> For 64-bit, the paravirt idle loop is in idle_book3e.S and that
> source file is included only if CONFIG_PPC_BOOK3E_64 defined.
> 
> This patch makes that dependency for 64-bit explicit.
> 
> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>

It works for me.  Thanks.


> ---
>  arch/powerpc/kernel/epapr_paravirt.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/powerpc/kernel/epapr_paravirt.c b/arch/powerpc/kernel/epapr_paravirt.c
> index f3eab85..d44a571 100644
> --- a/arch/powerpc/kernel/epapr_paravirt.c
> +++ b/arch/powerpc/kernel/epapr_paravirt.c
> @@ -23,8 +23,10 @@
>  #include <asm/code-patching.h>
>  #include <asm/machdep.h>
>  
> +#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
>  extern void epapr_ev_idle(void);
>  extern u32 epapr_ev_idle_start[];
> +#endif

You don't need this #ifdef

>  
>  bool epapr_paravirt_enabled;
>  
> @@ -47,11 +49,15 @@ static int __init epapr_paravirt_init(void)
>  
>  	for (i = 0; i < (len / 4); i++) {
>  		patch_instruction(epapr_hypercall_start + i, insts[i]);
> +#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
>  		patch_instruction(epapr_ev_idle_start + i, insts[i]);
> +#endif
>  	}
>  
> +#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
>  	if (of_get_property(hyper_node, "has-idle", NULL))
>  		ppc_md.power_save = epapr_ev_idle;
> +#endif
>  
>  	epapr_paravirt_enabled = true;
>  
> -- 
> 1.7.9.7
> 
> 

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

end of thread, other threads:[~2013-03-25  0:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-22 19:12 [PATCH] PPC: define the conditions where the ePAPR idle hcall can be supported Stuart Yoder
2013-03-22 19:12 ` Stuart Yoder
2013-03-25  0:34 ` Michael Neuling
2013-03-25  0:34   ` Michael Neuling

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.