Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1a9c16b authored by Julien Grall's avatar Julien Grall Committed by Stefano Stabellini
Browse files

xen/arm: disable cpuidle and cpufreq when linux is running as dom0



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: default avatarJulien Grall <julien.grall@linaro.org>
Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent d7f8f48d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -21,6 +21,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>

@@ -266,6 +268,13 @@ static int __init xen_guest_init(void)
	if (!xen_initial_domain())
		xenbus_probe(NULL);

	/*
	 * Making sure board specific code will not set up ops for
	 * cpu idle and cpu freq.
	 */
	disable_cpuidle();
	disable_cpufreq();

	return 0;
}
core_initcall(xen_guest_init);