From mboxrd@z Thu Jan 1 00:00:00 1970 From: konrad.wilk@oracle.com (Konrad Rzeszutek Wilk) Date: Fri, 19 Jul 2013 09:50:50 -0400 Subject: [PATCH v2] xen/arm: disable cpuidle and cpufreq when linux is running as dom0 In-Reply-To: <1374233220-13770-1-git-send-email-julien.grall@linaro.org> References: <1374233220-13770-1-git-send-email-julien.grall@linaro.org> Message-ID: <20130719135050.GA12144@localhost.localdomain> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 Reviewed-by: Konrad Rzeszutek Wilk > > --- > 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 > #include > #include > +#include > +#include > > #include > > @@ -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 >