From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC PATCH 5/7] cpufreq: cpufreq-cpu0: change cpus data path in devtree for Dom0 kernel Date: Tue, 07 Oct 2014 16:49:28 +0100 Message-ID: <54340B88.5090205@linaro.org> References: <1412691618-7408-1-git-send-email-oleksandr.dmytryshyn@globallogic.com> <1412691618-7408-6-git-send-email-oleksandr.dmytryshyn@globallogic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1412691618-7408-6-git-send-email-oleksandr.dmytryshyn@globallogic.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Oleksandr Dmytryshyn , Ian Campbell , Stefano Stabellini , Tim Deegan , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hi Oleksandr, On 10/07/2014 03:20 PM, Oleksandr Dmytryshyn wrote: > Xen hypervisor creates standard cpus nodes for virtual cpus. > All information needed for this driver about physical cpus > now located in /cpus/cpu@0/private_data node instead of the > /cpus node. > > Signed-off-by: Oleksandr Dmytryshyn > --- > drivers/cpufreq/cpufreq-cpu0.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c > index ef4fbc4..3c4474a 100644 > --- a/drivers/cpufreq/cpufreq-cpu0.c > +++ b/drivers/cpufreq/cpufreq-cpu0.c > @@ -182,7 +182,11 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev) > struct device_node *np; > int ret; > > +#ifdef CONFIG_XEN_DOM0 > + np = of_find_node_by_path("/cpus/cpu@0/private_data/cpu@0"); > +#else > np = of_find_node_by_path("/cpus/cpu@0"); > +#endif A same kernel should be able to run on bare metal and within Xen. Furthermore, this path should only be check for DOM0 and not any guest. Regards, Regards, -- Julien Grall