Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1552752 > unrolled thread

[PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled

Started bySudeep Holla <sudeep.holla@arm.com>
First post2017-01-06 13:40 +0100
Last post2017-01-10 01:10 +0100
Articles 5 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled Sudeep Holla <sudeep.holla@arm.com> - 2017-01-06 13:40 +0100
    Re: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node  is disabled Michał Zegan <webczat_200@poczta.onet.pl> - 2017-01-07 01:50 +0100
      Re: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node  is disabled Sudeep Holla <sudeep.holla@arm.com> - 2017-01-09 11:00 +0100
        Re: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node  is disabled Michał Zegan <webczat_200@poczta.onet.pl> - 2017-01-09 11:20 +0100
    Re: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs  node is disabled Stephen Boyd <sboyd@codeaurora.org> - 2017-01-10 01:10 +0100

#1552752 — [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled

FromSudeep Holla <sudeep.holla@arm.com>
Date2017-01-06 13:40 +0100
Subject[PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled
Message-ID<sWBYl-1Wp-7@gated-at.bofh.it>
Currently we add the virtual cpufreq device unconditionally even when
the SCPI DVFS clock provider node is disabled. This will cause cpufreq
driver to throw errors when it gets initailised on boot/modprobe and
also when the CPUs are hot-plugged back in.

This patch fixes the issue by adding the virtual cpufreq device only if
the SCPI DVFS clock provider is available and registered.

Fixes: 9490f01e2471 ("clk: scpi: add support for cpufreq virtual device")
Reported-by: Michał Zegan <webczat_200@poczta.onet.pl>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/clk/clk-scpi.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c
index 2a3e9d8e88b0..96d37175d0ad 100644
--- a/drivers/clk/clk-scpi.c
+++ b/drivers/clk/clk-scpi.c
@@ -290,13 +290,15 @@ static int scpi_clocks_probe(struct platform_device *pdev)
 			of_node_put(child);
 			return ret;
 		}
-	}
-	/* Add the virtual cpufreq device */
-	cpufreq_dev = platform_device_register_simple("scpi-cpufreq",
-						      -1, NULL, 0);
-	if (IS_ERR(cpufreq_dev))
-		pr_warn("unable to register cpufreq device");
 
+		if (match->data != &scpi_dvfs_ops)
+			continue;
+		/* Add the virtual cpufreq device if it's DVFS clock provider */
+		cpufreq_dev = platform_device_register_simple("scpi-cpufreq",
+							      -1, NULL, 0);
+		if (IS_ERR(cpufreq_dev))
+			pr_warn("unable to register cpufreq device");
+	}
 	return 0;
 }
 
-- 
2.7.4

[toc] | [next] | [standalone]


#1553517 — Re: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled

FromMichał Zegan <webczat_200@poczta.onet.pl>
Date2017-01-07 01:50 +0100
SubjectRe: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled
Message-ID<sWNmN-1jM-1@gated-at.bofh.it>
In reply to#1552752

[Multipart message — attachments visible in raw view] — view raw

seems the patch works as intended.

W dniu 06.01.2017 o 13:34, Sudeep Holla pisze:
> Currently we add the virtual cpufreq device unconditionally even when
> the SCPI DVFS clock provider node is disabled. This will cause cpufreq
> driver to throw errors when it gets initailised on boot/modprobe and
> also when the CPUs are hot-plugged back in.
> 
> This patch fixes the issue by adding the virtual cpufreq device only if
> the SCPI DVFS clock provider is available and registered.
> 
> Fixes: 9490f01e2471 ("clk: scpi: add support for cpufreq virtual device")
> Reported-by: Michał Zegan <webczat_200@poczta.onet.pl>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/clk/clk-scpi.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c
> index 2a3e9d8e88b0..96d37175d0ad 100644
> --- a/drivers/clk/clk-scpi.c
> +++ b/drivers/clk/clk-scpi.c
> @@ -290,13 +290,15 @@ static int scpi_clocks_probe(struct platform_device *pdev)
>  			of_node_put(child);
>  			return ret;
>  		}
> -	}
> -	/* Add the virtual cpufreq device */
> -	cpufreq_dev = platform_device_register_simple("scpi-cpufreq",
> -						      -1, NULL, 0);
> -	if (IS_ERR(cpufreq_dev))
> -		pr_warn("unable to register cpufreq device");
>  
> +		if (match->data != &scpi_dvfs_ops)
> +			continue;
> +		/* Add the virtual cpufreq device if it's DVFS clock provider */
> +		cpufreq_dev = platform_device_register_simple("scpi-cpufreq",
> +							      -1, NULL, 0);
> +		if (IS_ERR(cpufreq_dev))
> +			pr_warn("unable to register cpufreq device");
> +	}
>  	return 0;
>  }
>  
> 

[toc] | [prev] | [next] | [standalone]


#1554188 — Re: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled

FromSudeep Holla <sudeep.holla@arm.com>
Date2017-01-09 11:00 +0100
SubjectRe: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled
Message-ID<sXEUf-2wC-29@gated-at.bofh.it>
In reply to#1553517

On 07/01/17 00:44, Michał Zegan wrote:
> seems the patch works as intended.
> 

So, can we take this as
Tested-by: Michał Zegan <webczat_200@poczta.onet.pl> ?

> W dniu 06.01.2017 o 13:34, Sudeep Holla pisze:
>> Currently we add the virtual cpufreq device unconditionally even when
>> the SCPI DVFS clock provider node is disabled. This will cause cpufreq
>> driver to throw errors when it gets initailised on boot/modprobe and
>> also when the CPUs are hot-plugged back in.
>>
>> This patch fixes the issue by adding the virtual cpufreq device only if
>> the SCPI DVFS clock provider is available and registered.
>>
>> Fixes: 9490f01e2471 ("clk: scpi: add support for cpufreq virtual device")
>> Reported-by: Michał Zegan <webczat_200@poczta.onet.pl>
>> Cc: Neil Armstrong <narmstrong@baylibre.com>
>> Cc: Michael Turquette <mturquette@baylibre.com>
>> Cc: Stephen Boyd <sboyd@codeaurora.org>
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

[toc] | [prev] | [next] | [standalone]


#1554195 — Re: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled

FromMichał Zegan <webczat_200@poczta.onet.pl>
Date2017-01-09 11:20 +0100
SubjectRe: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled
Message-ID<sXFdv-2U5-5@gated-at.bofh.it>
In reply to#1554188

[Multipart message — attachments visible in raw view] — view raw

Of course.

W dniu 09.01.2017 o 10:58, Sudeep Holla pisze:
> 
> 
> On 07/01/17 00:44, Michał Zegan wrote:
>> seems the patch works as intended.
>>
> 
> So, can we take this as
> Tested-by: Michał Zegan <webczat_200@poczta.onet.pl> ?
> 
>> W dniu 06.01.2017 o 13:34, Sudeep Holla pisze:
>>> Currently we add the virtual cpufreq device unconditionally even when
>>> the SCPI DVFS clock provider node is disabled. This will cause cpufreq
>>> driver to throw errors when it gets initailised on boot/modprobe and
>>> also when the CPUs are hot-plugged back in.
>>>
>>> This patch fixes the issue by adding the virtual cpufreq device only if
>>> the SCPI DVFS clock provider is available and registered.
>>>
>>> Fixes: 9490f01e2471 ("clk: scpi: add support for cpufreq virtual device")
>>> Reported-by: Michał Zegan <webczat_200@poczta.onet.pl>
>>> Cc: Neil Armstrong <narmstrong@baylibre.com>
>>> Cc: Michael Turquette <mturquette@baylibre.com>
>>> Cc: Stephen Boyd <sboyd@codeaurora.org>
>>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> 

[toc] | [prev] | [next] | [standalone]


#1554816 — Re: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled

FromStephen Boyd <sboyd@codeaurora.org>
Date2017-01-10 01:10 +0100
SubjectRe: [PATCH] clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled
Message-ID<sXSaK-2sc-25@gated-at.bofh.it>
In reply to#1552752
On 01/06, Sudeep Holla wrote:
> Currently we add the virtual cpufreq device unconditionally even when
> the SCPI DVFS clock provider node is disabled. This will cause cpufreq
> driver to throw errors when it gets initailised on boot/modprobe and
> also when the CPUs are hot-plugged back in.
> 
> This patch fixes the issue by adding the virtual cpufreq device only if
> the SCPI DVFS clock provider is available and registered.
> 
> Fixes: 9490f01e2471 ("clk: scpi: add support for cpufreq virtual device")
> Reported-by: Michał Zegan <webczat_200@poczta.onet.pl>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web