[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH v2 5/8] cpufreq: cpufreq-cpu0: change cpus data path in devtree for Dom0 kernel
Xen hypervisor creates standard cpus nodes for virtual cpus. All information needed for this driver about physical cpus now located in /hypervisor/pcpus node instead of the /cpus node in case if kernel is running as Dom0 domain. Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@xxxxxxxxxxxxxxx> --- drivers/cpufreq/cpufreq-cpu0.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index ef4fbc4..a83838b 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -21,6 +21,8 @@ #include <linux/regulator/consumer.h> #include <linux/slab.h> +#include <xen/xen.h> + static unsigned int transition_latency; static unsigned int voltage_tolerance; /* in percentage */ @@ -182,7 +184,13 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev) struct device_node *np; int ret; - np = of_find_node_by_path("/cpus/cpu@0"); +#ifdef CONFIG_XEN_DOM0 + if (xen_initial_domain()) + np = of_find_node_by_path("/hypervisor/pcpus/cpu@0"); + else +#endif + np = of_find_node_by_path("/cpus/cpu@0"); + if (!np) { pr_err("failed to find cpu0 node\n"); return -ENOENT; -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |