linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] xen/arm: disable cpuidle and cpufreq when linux is running as dom0
@ 2013-07-19 11:27 Julien Grall
  2013-07-19 13:50 ` Konrad Rzeszutek Wilk
  2013-07-21 14:09 ` Stefano Stabellini
  0 siblings, 2 replies; 4+ messages in thread
From: Julien Grall @ 2013-07-19 11:27 UTC (permalink / raw)
  To: linux-arm-kernel

When linux is running as dom0, Xen doesn't show the physical cpu but a
virtual CPU.
On some ARM SOC (for instance the exynos 5250), linux registers callbacks
for cpuidle and cpufreq. When these callbacks are called, they will modify
directly the physical cpu not the virtual one. It can impact the whole board
instead of only dom0.

Signed-off-by: Julien Grall <julien.grall@linaro.org>

---
    Changes in v2:
        - Disable cpufreq
---
 arch/arm/xen/enlighten.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index 49839d8..af82792 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -24,6 +24,8 @@
 #include <linux/of.h>
 #include <linux/of_irq.h>
 #include <linux/of_address.h>
+#include <linux/cpuidle.h>
+#include <linux/cpufreq.h>
 
 #include <linux/mm.h>
 
@@ -292,6 +294,12 @@ static int __init xen_pm_init(void)
 {
 	pm_power_off = xen_power_off;
 	arm_pm_restart = xen_restart;
+	/*
+	 * Making sure board specific code will not set up ops for
+	 * cpu idle and cpu freq.
+	 */
+	disable_cpuidle();
+	disable_cpufreq();
 
 	return 0;
 }
-- 
1.7.10.4

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

* [PATCH v2] xen/arm: disable cpuidle and cpufreq when linux is running as dom0
  2013-07-19 11:27 [PATCH v2] xen/arm: disable cpuidle and cpufreq when linux is running as dom0 Julien Grall
@ 2013-07-19 13:50 ` Konrad Rzeszutek Wilk
  2013-07-21 14:09 ` Stefano Stabellini
  1 sibling, 0 replies; 4+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-07-19 13:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 19, 2013 at 12:27:00PM +0100, Julien Grall wrote:
> When linux is running as dom0, Xen doesn't show the physical cpu but a
> virtual CPU.
> On some ARM SOC (for instance the exynos 5250), linux registers callbacks
> for cpuidle and cpufreq. When these callbacks are called, they will modify
> directly the physical cpu not the virtual one. It can impact the whole board
> instead of only dom0.
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> 
> ---
>     Changes in v2:
>         - Disable cpufreq
> ---
>  arch/arm/xen/enlighten.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
> index 49839d8..af82792 100644
> --- a/arch/arm/xen/enlighten.c
> +++ b/arch/arm/xen/enlighten.c
> @@ -24,6 +24,8 @@
>  #include <linux/of.h>
>  #include <linux/of_irq.h>
>  #include <linux/of_address.h>
> +#include <linux/cpuidle.h>
> +#include <linux/cpufreq.h>
>  
>  #include <linux/mm.h>
>  
> @@ -292,6 +294,12 @@ static int __init xen_pm_init(void)
>  {
>  	pm_power_off = xen_power_off;
>  	arm_pm_restart = xen_restart;
> +	/*
> +	 * Making sure board specific code will not set up ops for
> +	 * cpu idle and cpu freq.
> +	 */
> +	disable_cpuidle();
> +	disable_cpufreq();
>  
>  	return 0;
>  }
> -- 
> 1.7.10.4
> 

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

* [PATCH v2] xen/arm: disable cpuidle and cpufreq when linux is running as dom0
  2013-07-19 11:27 [PATCH v2] xen/arm: disable cpuidle and cpufreq when linux is running as dom0 Julien Grall
  2013-07-19 13:50 ` Konrad Rzeszutek Wilk
@ 2013-07-21 14:09 ` Stefano Stabellini
  2013-07-21 15:38   ` Stefano Stabellini
  1 sibling, 1 reply; 4+ messages in thread
From: Stefano Stabellini @ 2013-07-21 14:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 19 Jul 2013, Julien Grall wrote:
> When linux is running as dom0, Xen doesn't show the physical cpu but a
> virtual CPU.
> On some ARM SOC (for instance the exynos 5250), linux registers callbacks
> for cpuidle and cpufreq. When these callbacks are called, they will modify
> directly the physical cpu not the virtual one. It can impact the whole board
> instead of only dom0.
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>
> 

Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>


>     Changes in v2:
>         - Disable cpufreq
> ---
>  arch/arm/xen/enlighten.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
> index 49839d8..af82792 100644
> --- a/arch/arm/xen/enlighten.c
> +++ b/arch/arm/xen/enlighten.c
> @@ -24,6 +24,8 @@
>  #include <linux/of.h>
>  #include <linux/of_irq.h>
>  #include <linux/of_address.h>
> +#include <linux/cpuidle.h>
> +#include <linux/cpufreq.h>
>  
>  #include <linux/mm.h>
>  
> @@ -292,6 +294,12 @@ static int __init xen_pm_init(void)
>  {
>  	pm_power_off = xen_power_off;
>  	arm_pm_restart = xen_restart;
> +	/*
> +	 * Making sure board specific code will not set up ops for
> +	 * cpu idle and cpu freq.
> +	 */
> +	disable_cpuidle();
> +	disable_cpufreq();
>  
>  	return 0;
>  }
> -- 
> 1.7.10.4
> 

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

* [PATCH v2] xen/arm: disable cpuidle and cpufreq when linux is running as dom0
  2013-07-21 14:09 ` Stefano Stabellini
@ 2013-07-21 15:38   ` Stefano Stabellini
  0 siblings, 0 replies; 4+ messages in thread
From: Stefano Stabellini @ 2013-07-21 15:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 21 Jul 2013, Stefano Stabellini wrote:
> On Fri, 19 Jul 2013, Julien Grall wrote:
> > When linux is running as dom0, Xen doesn't show the physical cpu but a
> > virtual CPU.
> > On some ARM SOC (for instance the exynos 5250), linux registers callbacks
> > for cpuidle and cpufreq. When these callbacks are called, they will modify
> > directly the physical cpu not the virtual one. It can impact the whole board
> > instead of only dom0.
> > 
> > Signed-off-by: Julien Grall <julien.grall@linaro.org>
> > 
> 
> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

I added the patch to my queue

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

end of thread, other threads:[~2013-07-21 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-19 11:27 [PATCH v2] xen/arm: disable cpuidle and cpufreq when linux is running as dom0 Julien Grall
2013-07-19 13:50 ` Konrad Rzeszutek Wilk
2013-07-21 14:09 ` Stefano Stabellini
2013-07-21 15:38   ` Stefano Stabellini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).