* [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS
@ 2016-10-21 11:34 ` Geert Uytterhoeven
0 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2016-10-21 11:34 UTC (permalink / raw)
To: Rafael J. Wysocki, Kevin Hilman, Ulf Hansson, Kukjin Kim,
Krzysztof Kozlowski, Javier Martinez Canillas
Cc: Greg Kroah-Hartman, linux-pm, linux-arm-kernel,
linux-samsung-soc, Geert Uytterhoeven
Currently the generic PM Domain code code checks for the presence of
both (generic) "power-domains" and (Samsung Exynos legacy)
"samsung,power-domain" properties in all device tree nodes representing
devices.
There are two issues with this:
1. This imposes a small boot-time penalty on all platforms using DT,
2. Platform-specific checks do not really belong in core framework
code.
While moving the check from platform-agnostic code to Samsung-specific
code is non-trivial, the runtime overhead can be restricted to kernels
including support for 32-bit Samsung Exynos platforms.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
"samsung,power-domain" was only ever used in:
- arch/arm/boot/dts/exynos4415.dtsi: Unused?
- arch/arm/boot/dts/exynos3250.dtsi: CONFIG_ARCH_EXYNOS3
- arch/arm/boot/dts/exynos4.dtsi: CONFIG_ARCH_EXYNOS4
- arch/arm/boot/dts/exynos4x12.dtsi: CONFIG_ARCH_EXYNOS4
exynos4212.dtsi is unused?
- arch/arm/boot/dts/exynos5250.dtsi: CONFIG_ARCH_EXYNOS5
- arch/arm/boot/dts/exynos5420.dtsi: CONFIG_ARCH_EXYNOS5
---
drivers/base/power/domain.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index e023066e421547c5..d94d6a4b9b527108 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1853,7 +1853,8 @@ int genpd_dev_pm_attach(struct device *dev)
ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
"#power-domain-cells", 0, &pd_args);
if (ret < 0) {
- if (ret != -ENOENT)
+ if (ret != -ENOENT || !IS_ENABLED(CONFIG_ARCH_EXYNOS) ||
+ IS_ENABLED(CONFIG_64BIT))
return ret;
/*
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH] PM / Domains: Restrict "samsung, power-domain" checks to ARCH_EXYNOS
@ 2016-10-21 11:34 ` Geert Uytterhoeven
0 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2016-10-21 11:34 UTC (permalink / raw)
To: linux-arm-kernel
Currently the generic PM Domain code code checks for the presence of
both (generic) "power-domains" and (Samsung Exynos legacy)
"samsung,power-domain" properties in all device tree nodes representing
devices.
There are two issues with this:
1. This imposes a small boot-time penalty on all platforms using DT,
2. Platform-specific checks do not really belong in core framework
code.
While moving the check from platform-agnostic code to Samsung-specific
code is non-trivial, the runtime overhead can be restricted to kernels
including support for 32-bit Samsung Exynos platforms.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
"samsung,power-domain" was only ever used in:
- arch/arm/boot/dts/exynos4415.dtsi: Unused?
- arch/arm/boot/dts/exynos3250.dtsi: CONFIG_ARCH_EXYNOS3
- arch/arm/boot/dts/exynos4.dtsi: CONFIG_ARCH_EXYNOS4
- arch/arm/boot/dts/exynos4x12.dtsi: CONFIG_ARCH_EXYNOS4
exynos4212.dtsi is unused?
- arch/arm/boot/dts/exynos5250.dtsi: CONFIG_ARCH_EXYNOS5
- arch/arm/boot/dts/exynos5420.dtsi: CONFIG_ARCH_EXYNOS5
---
drivers/base/power/domain.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index e023066e421547c5..d94d6a4b9b527108 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1853,7 +1853,8 @@ int genpd_dev_pm_attach(struct device *dev)
ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
"#power-domain-cells", 0, &pd_args);
if (ret < 0) {
- if (ret != -ENOENT)
+ if (ret != -ENOENT || !IS_ENABLED(CONFIG_ARCH_EXYNOS) ||
+ IS_ENABLED(CONFIG_64BIT))
return ret;
/*
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS
2016-10-21 11:34 ` [PATCH] PM / Domains: Restrict "samsung, power-domain" " Geert Uytterhoeven
@ 2016-10-21 12:29 ` Rafael J. Wysocki
-1 siblings, 0 replies; 14+ messages in thread
From: Rafael J. Wysocki @ 2016-10-21 12:29 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Rafael J. Wysocki, Kevin Hilman, Ulf Hansson, Kukjin Kim,
Krzysztof Kozlowski, Javier Martinez Canillas,
Greg Kroah-Hartman, Linux PM, linux-arm-kernel,
Linux Samsung SoC
On Fri, Oct 21, 2016 at 1:34 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> Currently the generic PM Domain code code checks for the presence of
> both (generic) "power-domains" and (Samsung Exynos legacy)
> "samsung,power-domain" properties in all device tree nodes representing
> devices.
>
> There are two issues with this:
> 1. This imposes a small boot-time penalty on all platforms using DT,
> 2. Platform-specific checks do not really belong in core framework
> code.
>
> While moving the check from platform-agnostic code to Samsung-specific
> code is non-trivial, the runtime overhead can be restricted to kernels
> including support for 32-bit Samsung Exynos platforms.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> "samsung,power-domain" was only ever used in:
> - arch/arm/boot/dts/exynos4415.dtsi: Unused?
> - arch/arm/boot/dts/exynos3250.dtsi: CONFIG_ARCH_EXYNOS3
> - arch/arm/boot/dts/exynos4.dtsi: CONFIG_ARCH_EXYNOS4
> - arch/arm/boot/dts/exynos4x12.dtsi: CONFIG_ARCH_EXYNOS4
> exynos4212.dtsi is unused?
> - arch/arm/boot/dts/exynos5250.dtsi: CONFIG_ARCH_EXYNOS5
> - arch/arm/boot/dts/exynos5420.dtsi: CONFIG_ARCH_EXYNOS5
> ---
> drivers/base/power/domain.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index e023066e421547c5..d94d6a4b9b527108 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -1853,7 +1853,8 @@ int genpd_dev_pm_attach(struct device *dev)
> ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
> "#power-domain-cells", 0, &pd_args);
> if (ret < 0) {
> - if (ret != -ENOENT)
> + if (ret != -ENOENT || !IS_ENABLED(CONFIG_ARCH_EXYNOS) ||
Please don't check things like CONFIG_ARCH_EXYNOS in the core.
If you need to put checks like that here, there is a design problem somewhere.
And imagine someone 5 years ahead from now looking at this code and
wondering why on Earth the check is here.
> + IS_ENABLED(CONFIG_64BIT))
> return ret;
>
> /*
> --
Thanks,
Rafael
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] PM / Domains: Restrict "samsung, power-domain" checks to ARCH_EXYNOS
@ 2016-10-21 12:29 ` Rafael J. Wysocki
0 siblings, 0 replies; 14+ messages in thread
From: Rafael J. Wysocki @ 2016-10-21 12:29 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 21, 2016 at 1:34 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> Currently the generic PM Domain code code checks for the presence of
> both (generic) "power-domains" and (Samsung Exynos legacy)
> "samsung,power-domain" properties in all device tree nodes representing
> devices.
>
> There are two issues with this:
> 1. This imposes a small boot-time penalty on all platforms using DT,
> 2. Platform-specific checks do not really belong in core framework
> code.
>
> While moving the check from platform-agnostic code to Samsung-specific
> code is non-trivial, the runtime overhead can be restricted to kernels
> including support for 32-bit Samsung Exynos platforms.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> "samsung,power-domain" was only ever used in:
> - arch/arm/boot/dts/exynos4415.dtsi: Unused?
> - arch/arm/boot/dts/exynos3250.dtsi: CONFIG_ARCH_EXYNOS3
> - arch/arm/boot/dts/exynos4.dtsi: CONFIG_ARCH_EXYNOS4
> - arch/arm/boot/dts/exynos4x12.dtsi: CONFIG_ARCH_EXYNOS4
> exynos4212.dtsi is unused?
> - arch/arm/boot/dts/exynos5250.dtsi: CONFIG_ARCH_EXYNOS5
> - arch/arm/boot/dts/exynos5420.dtsi: CONFIG_ARCH_EXYNOS5
> ---
> drivers/base/power/domain.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index e023066e421547c5..d94d6a4b9b527108 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -1853,7 +1853,8 @@ int genpd_dev_pm_attach(struct device *dev)
> ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
> "#power-domain-cells", 0, &pd_args);
> if (ret < 0) {
> - if (ret != -ENOENT)
> + if (ret != -ENOENT || !IS_ENABLED(CONFIG_ARCH_EXYNOS) ||
Please don't check things like CONFIG_ARCH_EXYNOS in the core.
If you need to put checks like that here, there is a design problem somewhere.
And imagine someone 5 years ahead from now looking at this code and
wondering why on Earth the check is here.
> + IS_ENABLED(CONFIG_64BIT))
> return ret;
>
> /*
> --
Thanks,
Rafael
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS
2016-10-21 12:29 ` [PATCH] PM / Domains: Restrict "samsung, power-domain" " Rafael J. Wysocki
@ 2016-10-21 13:58 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2016-10-21 13:58 UTC (permalink / raw)
To: Rafael J. Wysocki, q
Cc: Geert Uytterhoeven, Rafael J. Wysocki, Kevin Hilman, Ulf Hansson,
Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
Greg Kroah-Hartman, Linux PM, linux-arm-kernel,
Linux Samsung SoC
On Fri, Oct 21, 2016 at 02:29:05PM +0200, Rafael J. Wysocki wrote:
> On Fri, Oct 21, 2016 at 1:34 PM, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> > Currently the generic PM Domain code code checks for the presence of
> > both (generic) "power-domains" and (Samsung Exynos legacy)
> > "samsung,power-domain" properties in all device tree nodes representing
> > devices.
> >
> > There are two issues with this:
> > 1. This imposes a small boot-time penalty on all platforms using DT,
> > 2. Platform-specific checks do not really belong in core framework
> > code.
> >
> > While moving the check from platform-agnostic code to Samsung-specific
> > code is non-trivial, the runtime overhead can be restricted to kernels
> > including support for 32-bit Samsung Exynos platforms.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > "samsung,power-domain" was only ever used in:
> > - arch/arm/boot/dts/exynos4415.dtsi: Unused?
> > - arch/arm/boot/dts/exynos3250.dtsi: CONFIG_ARCH_EXYNOS3
> > - arch/arm/boot/dts/exynos4.dtsi: CONFIG_ARCH_EXYNOS4
> > - arch/arm/boot/dts/exynos4x12.dtsi: CONFIG_ARCH_EXYNOS4
> > exynos4212.dtsi is unused?
> > - arch/arm/boot/dts/exynos5250.dtsi: CONFIG_ARCH_EXYNOS5
> > - arch/arm/boot/dts/exynos5420.dtsi: CONFIG_ARCH_EXYNOS5
> > ---
> > drivers/base/power/domain.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> > index e023066e421547c5..d94d6a4b9b527108 100644
> > --- a/drivers/base/power/domain.c
> > +++ b/drivers/base/power/domain.c
> > @@ -1853,7 +1853,8 @@ int genpd_dev_pm_attach(struct device *dev)
> > ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
> > "#power-domain-cells", 0, &pd_args);
> > if (ret < 0) {
> > - if (ret != -ENOENT)
> > + if (ret != -ENOENT || !IS_ENABLED(CONFIG_ARCH_EXYNOS) ||
>
> Please don't check things like CONFIG_ARCH_EXYNOS in the core.
>
> If you need to put checks like that here, there is a design problem somewhere.
>
> And imagine someone 5 years ahead from now looking at this code and
> wondering why on Earth the check is here.
I don't find the argument of performance penalty such important but for
the sake of design, the samsung-specific code could be moved to
drivers/soc/samsung/pm_domains.c, called "legacy_pm_parse" and exported
through a header. Thus with !ARCH_EXYNOS that would be 'static inline
{}'. However that is not a nice solution - there will be still
direct call to platform-specific code in the core. I am not sure if it
is worth the effort.
The samsung,power-domain was made deprecated (although not explicitly)
in January 2015 (0da658704136 ("ARM: dts: convert to generic power
domain bindings for exynos DT")) so how about:
1. Printing a dev_warn() about usage of deprecated bindings.
2. Complete removal in January 2017?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS
@ 2016-10-21 13:58 ` Krzysztof Kozlowski
0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2016-10-21 13:58 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 21, 2016 at 02:29:05PM +0200, Rafael J. Wysocki wrote:
> On Fri, Oct 21, 2016 at 1:34 PM, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> > Currently the generic PM Domain code code checks for the presence of
> > both (generic) "power-domains" and (Samsung Exynos legacy)
> > "samsung,power-domain" properties in all device tree nodes representing
> > devices.
> >
> > There are two issues with this:
> > 1. This imposes a small boot-time penalty on all platforms using DT,
> > 2. Platform-specific checks do not really belong in core framework
> > code.
> >
> > While moving the check from platform-agnostic code to Samsung-specific
> > code is non-trivial, the runtime overhead can be restricted to kernels
> > including support for 32-bit Samsung Exynos platforms.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > "samsung,power-domain" was only ever used in:
> > - arch/arm/boot/dts/exynos4415.dtsi: Unused?
> > - arch/arm/boot/dts/exynos3250.dtsi: CONFIG_ARCH_EXYNOS3
> > - arch/arm/boot/dts/exynos4.dtsi: CONFIG_ARCH_EXYNOS4
> > - arch/arm/boot/dts/exynos4x12.dtsi: CONFIG_ARCH_EXYNOS4
> > exynos4212.dtsi is unused?
> > - arch/arm/boot/dts/exynos5250.dtsi: CONFIG_ARCH_EXYNOS5
> > - arch/arm/boot/dts/exynos5420.dtsi: CONFIG_ARCH_EXYNOS5
> > ---
> > drivers/base/power/domain.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> > index e023066e421547c5..d94d6a4b9b527108 100644
> > --- a/drivers/base/power/domain.c
> > +++ b/drivers/base/power/domain.c
> > @@ -1853,7 +1853,8 @@ int genpd_dev_pm_attach(struct device *dev)
> > ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
> > "#power-domain-cells", 0, &pd_args);
> > if (ret < 0) {
> > - if (ret != -ENOENT)
> > + if (ret != -ENOENT || !IS_ENABLED(CONFIG_ARCH_EXYNOS) ||
>
> Please don't check things like CONFIG_ARCH_EXYNOS in the core.
>
> If you need to put checks like that here, there is a design problem somewhere.
>
> And imagine someone 5 years ahead from now looking at this code and
> wondering why on Earth the check is here.
I don't find the argument of performance penalty such important but for
the sake of design, the samsung-specific code could be moved to
drivers/soc/samsung/pm_domains.c, called "legacy_pm_parse" and exported
through a header. Thus with !ARCH_EXYNOS that would be 'static inline
{}'. However that is not a nice solution - there will be still
direct call to platform-specific code in the core. I am not sure if it
is worth the effort.
The samsung,power-domain was made deprecated (although not explicitly)
in January 2015 (0da658704136 ("ARM: dts: convert to generic power
domain bindings for exynos DT")) so how about:
1. Printing a dev_warn() about usage of deprecated bindings.
2. Complete removal in January 2017?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS
2016-10-21 12:29 ` [PATCH] PM / Domains: Restrict "samsung, power-domain" " Rafael J. Wysocki
@ 2016-10-21 14:06 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2016-10-21 14:06 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Geert Uytterhoeven, Rafael J. Wysocki, Kevin Hilman, Ulf Hansson,
Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
Greg Kroah-Hartman, Linux PM, linux-arm-kernel,
Linux Samsung SoC
On Fri, Oct 21, 2016 at 02:29:05PM +0200, Rafael J. Wysocki wrote:
> On Fri, Oct 21, 2016 at 1:34 PM, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> > Currently the generic PM Domain code code checks for the presence of
> > both (generic) "power-domains" and (Samsung Exynos legacy)
> > "samsung,power-domain" properties in all device tree nodes representing
> > devices.
> >
> > There are two issues with this:
> > 1. This imposes a small boot-time penalty on all platforms using DT,
> > 2. Platform-specific checks do not really belong in core framework
> > code.
> >
> > While moving the check from platform-agnostic code to Samsung-specific
> > code is non-trivial, the runtime overhead can be restricted to kernels
> > including support for 32-bit Samsung Exynos platforms.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > "samsung,power-domain" was only ever used in:
> > - arch/arm/boot/dts/exynos4415.dtsi: Unused?
> > - arch/arm/boot/dts/exynos3250.dtsi: CONFIG_ARCH_EXYNOS3
> > - arch/arm/boot/dts/exynos4.dtsi: CONFIG_ARCH_EXYNOS4
> > - arch/arm/boot/dts/exynos4x12.dtsi: CONFIG_ARCH_EXYNOS4
> > exynos4212.dtsi is unused?
> > - arch/arm/boot/dts/exynos5250.dtsi: CONFIG_ARCH_EXYNOS5
> > - arch/arm/boot/dts/exynos5420.dtsi: CONFIG_ARCH_EXYNOS5
> > ---
> > drivers/base/power/domain.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> > index e023066e421547c5..d94d6a4b9b527108 100644
> > --- a/drivers/base/power/domain.c
> > +++ b/drivers/base/power/domain.c
> > @@ -1853,7 +1853,8 @@ int genpd_dev_pm_attach(struct device *dev)
> > ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
> > "#power-domain-cells", 0, &pd_args);
> > if (ret < 0) {
> > - if (ret != -ENOENT)
> > + if (ret != -ENOENT || !IS_ENABLED(CONFIG_ARCH_EXYNOS) ||
>
> Please don't check things like CONFIG_ARCH_EXYNOS in the core.
>
> If you need to put checks like that here, there is a design problem somewhere.
>
> And imagine someone 5 years ahead from now looking at this code and
> wondering why on Earth the check is here.
Sorry for the noise, sending once again without bogus recipient added by
mistake:
I don't find the argument of performance penalty such important but for
the sake of design, the samsung-specific code could be moved to
drivers/soc/samsung/pm_domains.c, called "legacy_pm_parse" and exported
through a header. Thus with !ARCH_EXYNOS that would be 'static inline
{}'. However that is not a nice solution - there will be still
direct call to platform-specific code in the core. I am not sure if it
is worth the effort.
The samsung,power-domain was made deprecated (although not explicitly)
in January 2015 (0da658704136 ("ARM: dts: convert to generic power
domain bindings for exynos DT")) so how about:
1. Printing a dev_warn() about usage of deprecated bindings.
2. Complete removal in January 2017?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS
@ 2016-10-21 14:06 ` Krzysztof Kozlowski
0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2016-10-21 14:06 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 21, 2016 at 02:29:05PM +0200, Rafael J. Wysocki wrote:
> On Fri, Oct 21, 2016 at 1:34 PM, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> > Currently the generic PM Domain code code checks for the presence of
> > both (generic) "power-domains" and (Samsung Exynos legacy)
> > "samsung,power-domain" properties in all device tree nodes representing
> > devices.
> >
> > There are two issues with this:
> > 1. This imposes a small boot-time penalty on all platforms using DT,
> > 2. Platform-specific checks do not really belong in core framework
> > code.
> >
> > While moving the check from platform-agnostic code to Samsung-specific
> > code is non-trivial, the runtime overhead can be restricted to kernels
> > including support for 32-bit Samsung Exynos platforms.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > "samsung,power-domain" was only ever used in:
> > - arch/arm/boot/dts/exynos4415.dtsi: Unused?
> > - arch/arm/boot/dts/exynos3250.dtsi: CONFIG_ARCH_EXYNOS3
> > - arch/arm/boot/dts/exynos4.dtsi: CONFIG_ARCH_EXYNOS4
> > - arch/arm/boot/dts/exynos4x12.dtsi: CONFIG_ARCH_EXYNOS4
> > exynos4212.dtsi is unused?
> > - arch/arm/boot/dts/exynos5250.dtsi: CONFIG_ARCH_EXYNOS5
> > - arch/arm/boot/dts/exynos5420.dtsi: CONFIG_ARCH_EXYNOS5
> > ---
> > drivers/base/power/domain.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> > index e023066e421547c5..d94d6a4b9b527108 100644
> > --- a/drivers/base/power/domain.c
> > +++ b/drivers/base/power/domain.c
> > @@ -1853,7 +1853,8 @@ int genpd_dev_pm_attach(struct device *dev)
> > ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
> > "#power-domain-cells", 0, &pd_args);
> > if (ret < 0) {
> > - if (ret != -ENOENT)
> > + if (ret != -ENOENT || !IS_ENABLED(CONFIG_ARCH_EXYNOS) ||
>
> Please don't check things like CONFIG_ARCH_EXYNOS in the core.
>
> If you need to put checks like that here, there is a design problem somewhere.
>
> And imagine someone 5 years ahead from now looking at this code and
> wondering why on Earth the check is here.
Sorry for the noise, sending once again without bogus recipient added by
mistake:
I don't find the argument of performance penalty such important but for
the sake of design, the samsung-specific code could be moved to
drivers/soc/samsung/pm_domains.c, called "legacy_pm_parse" and exported
through a header. Thus with !ARCH_EXYNOS that would be 'static inline
{}'. However that is not a nice solution - there will be still
direct call to platform-specific code in the core. I am not sure if it
is worth the effort.
The samsung,power-domain was made deprecated (although not explicitly)
in January 2015 (0da658704136 ("ARM: dts: convert to generic power
domain bindings for exynos DT")) so how about:
1. Printing a dev_warn() about usage of deprecated bindings.
2. Complete removal in January 2017?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS
2016-10-21 13:58 ` Krzysztof Kozlowski
@ 2016-10-21 14:14 ` Sylwester Nawrocki
-1 siblings, 0 replies; 14+ messages in thread
From: Sylwester Nawrocki @ 2016-10-21 14:14 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rafael J. Wysocki, q, Geert Uytterhoeven, Rafael J. Wysocki,
Kevin Hilman, Ulf Hansson, Kukjin Kim, Javier Martinez Canillas,
Greg Kroah-Hartman, Linux PM, linux-arm-kernel,
Linux Samsung SoC
On 10/21/2016 03:58 PM, Krzysztof Kozlowski wrote:
> The samsung,power-domain was made deprecated (although not explicitly)
> in January 2015 (0da658704136 ("ARM: dts: convert to generic power
> domain bindings for exynos DT")) so how about:
> 1. Printing a dev_warn() about usage of deprecated bindings.
> 2. Complete removal in January 2017?
I doubt anyone will ever use new mainline kernel with older dts/dtb
so IMHO it makes sense to queue a patch removing support for the
deprecated compatible just now and don't bother with a warning.
Documentation/devicetree/bindings/display/exynos/exynos7-decon.txt
arch/arm/boot/dts/exynos4415.dtsi
would just need to be updated in same release, I can prepare a patch
for these files.
--
Thanks,
Sylwester
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS
@ 2016-10-21 14:14 ` Sylwester Nawrocki
0 siblings, 0 replies; 14+ messages in thread
From: Sylwester Nawrocki @ 2016-10-21 14:14 UTC (permalink / raw)
To: linux-arm-kernel
On 10/21/2016 03:58 PM, Krzysztof Kozlowski wrote:
> The samsung,power-domain was made deprecated (although not explicitly)
> in January 2015 (0da658704136 ("ARM: dts: convert to generic power
> domain bindings for exynos DT")) so how about:
> 1. Printing a dev_warn() about usage of deprecated bindings.
> 2. Complete removal in January 2017?
I doubt anyone will ever use new mainline kernel with older dts/dtb
so IMHO it makes sense to queue a patch removing support for the
deprecated compatible just now and don't bother with a warning.
Documentation/devicetree/bindings/display/exynos/exynos7-decon.txt
arch/arm/boot/dts/exynos4415.dtsi
would just need to be updated in same release, I can prepare a patch
for these files.
--
Thanks,
Sylwester
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS
2016-10-21 14:14 ` Sylwester Nawrocki
@ 2016-10-21 14:18 ` Javier Martinez Canillas
-1 siblings, 0 replies; 14+ messages in thread
From: Javier Martinez Canillas @ 2016-10-21 14:18 UTC (permalink / raw)
To: Sylwester Nawrocki, Krzysztof Kozlowski
Cc: Rafael J. Wysocki, q, Geert Uytterhoeven, Rafael J. Wysocki,
Kevin Hilman, Ulf Hansson, Kukjin Kim, Greg Kroah-Hartman,
Linux PM, linux-arm-kernel, Linux Samsung SoC
Hello Sylwester,
On 10/21/2016 11:14 AM, Sylwester Nawrocki wrote:
> On 10/21/2016 03:58 PM, Krzysztof Kozlowski wrote:
>> The samsung,power-domain was made deprecated (although not explicitly)
>> in January 2015 (0da658704136 ("ARM: dts: convert to generic power
>> domain bindings for exynos DT")) so how about:
>> 1. Printing a dev_warn() about usage of deprecated bindings.
>> 2. Complete removal in January 2017?
>
> I doubt anyone will ever use new mainline kernel with older dts/dtb
> so IMHO it makes sense to queue a patch removing support for the
> deprecated compatible just now and don't bother with a warning.
>
FWIW I agree with you. I don't know of any Exynos machine that ships a DT
as read-only. Even consumer devices like the Exynos Chromebooks use a FIT
image (kernel + FDT bundled), so the DT can always be updated.
Removing the support for the deprecated property sound sensible to me.
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS
@ 2016-10-21 14:18 ` Javier Martinez Canillas
0 siblings, 0 replies; 14+ messages in thread
From: Javier Martinez Canillas @ 2016-10-21 14:18 UTC (permalink / raw)
To: linux-arm-kernel
Hello Sylwester,
On 10/21/2016 11:14 AM, Sylwester Nawrocki wrote:
> On 10/21/2016 03:58 PM, Krzysztof Kozlowski wrote:
>> The samsung,power-domain was made deprecated (although not explicitly)
>> in January 2015 (0da658704136 ("ARM: dts: convert to generic power
>> domain bindings for exynos DT")) so how about:
>> 1. Printing a dev_warn() about usage of deprecated bindings.
>> 2. Complete removal in January 2017?
>
> I doubt anyone will ever use new mainline kernel with older dts/dtb
> so IMHO it makes sense to queue a patch removing support for the
> deprecated compatible just now and don't bother with a warning.
>
FWIW I agree with you. I don't know of any Exynos machine that ships a DT
as read-only. Even consumer devices like the Exynos Chromebooks use a FIT
image (kernel + FDT bundled), so the DT can always be updated.
Removing the support for the deprecated property sound sensible to me.
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS
2016-10-21 14:18 ` Javier Martinez Canillas
@ 2016-10-21 14:39 ` Geert Uytterhoeven
-1 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2016-10-21 14:39 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: Sylwester Nawrocki, Krzysztof Kozlowski, Rafael J. Wysocki, q,
Geert Uytterhoeven, Rafael J. Wysocki, Kevin Hilman, Ulf Hansson,
Kukjin Kim, Greg Kroah-Hartman, Linux PM, linux-arm-kernel,
Linux Samsung SoC
Hi Javier,
On Fri, Oct 21, 2016 at 4:18 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> On 10/21/2016 11:14 AM, Sylwester Nawrocki wrote:
>> On 10/21/2016 03:58 PM, Krzysztof Kozlowski wrote:
>>> The samsung,power-domain was made deprecated (although not explicitly)
>>> in January 2015 (0da658704136 ("ARM: dts: convert to generic power
>>> domain bindings for exynos DT")) so how about:
>>> 1. Printing a dev_warn() about usage of deprecated bindings.
>>> 2. Complete removal in January 2017?
>>
>> I doubt anyone will ever use new mainline kernel with older dts/dtb
>> so IMHO it makes sense to queue a patch removing support for the
>> deprecated compatible just now and don't bother with a warning.
>>
>
> FWIW I agree with you. I don't know of any Exynos machine that ships a DT
> as read-only. Even consumer devices like the Exynos Chromebooks use a FIT
> image (kernel + FDT bundled), so the DT can always be updated.
>
> Removing the support for the deprecated property sound sensible to me.
I'm happy to hear that!
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] PM / Domains: Restrict "samsung, power-domain" checks to ARCH_EXYNOS
@ 2016-10-21 14:39 ` Geert Uytterhoeven
0 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2016-10-21 14:39 UTC (permalink / raw)
To: linux-arm-kernel
Hi Javier,
On Fri, Oct 21, 2016 at 4:18 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> On 10/21/2016 11:14 AM, Sylwester Nawrocki wrote:
>> On 10/21/2016 03:58 PM, Krzysztof Kozlowski wrote:
>>> The samsung,power-domain was made deprecated (although not explicitly)
>>> in January 2015 (0da658704136 ("ARM: dts: convert to generic power
>>> domain bindings for exynos DT")) so how about:
>>> 1. Printing a dev_warn() about usage of deprecated bindings.
>>> 2. Complete removal in January 2017?
>>
>> I doubt anyone will ever use new mainline kernel with older dts/dtb
>> so IMHO it makes sense to queue a patch removing support for the
>> deprecated compatible just now and don't bother with a warning.
>>
>
> FWIW I agree with you. I don't know of any Exynos machine that ships a DT
> as read-only. Even consumer devices like the Exynos Chromebooks use a FIT
> image (kernel + FDT bundled), so the DT can always be updated.
>
> Removing the support for the deprecated property sound sensible to me.
I'm happy to hear that!
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2016-10-21 14:39 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-21 11:34 [PATCH] PM / Domains: Restrict "samsung,power-domain" checks to ARCH_EXYNOS Geert Uytterhoeven
2016-10-21 11:34 ` [PATCH] PM / Domains: Restrict "samsung, power-domain" " Geert Uytterhoeven
2016-10-21 12:29 ` [PATCH] PM / Domains: Restrict "samsung,power-domain" " Rafael J. Wysocki
2016-10-21 12:29 ` [PATCH] PM / Domains: Restrict "samsung, power-domain" " Rafael J. Wysocki
2016-10-21 13:58 ` [PATCH] PM / Domains: Restrict "samsung,power-domain" " Krzysztof Kozlowski
2016-10-21 13:58 ` Krzysztof Kozlowski
2016-10-21 14:14 ` Sylwester Nawrocki
2016-10-21 14:14 ` Sylwester Nawrocki
2016-10-21 14:18 ` Javier Martinez Canillas
2016-10-21 14:18 ` Javier Martinez Canillas
2016-10-21 14:39 ` Geert Uytterhoeven
2016-10-21 14:39 ` [PATCH] PM / Domains: Restrict "samsung, power-domain" " Geert Uytterhoeven
2016-10-21 14:06 ` [PATCH] PM / Domains: Restrict "samsung,power-domain" " Krzysztof Kozlowski
2016-10-21 14:06 ` Krzysztof Kozlowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.