All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: sunxi: select CONFIG_PM
@ 2023-01-30 13:04 ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2023-01-30 13:04 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: Arnd Bergmann, linux-arm-kernel, linux-sunxi, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Selecting CONFIG_PM_GENERIC_DOMAINS without CONFIG_PM leads to a
build failure:

WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS
  Depends on [n]: PM [=n]
  Selected by [y]:
  - SUN20I_PPU [=y] && (ARCH_SUNXI [=n] || COMPILE_TEST [=y])

drivers/base/power/domain_governor.c: In function 'default_suspend_ok':
drivers/base/power/domain_governor.c:85:24: error: 'struct dev_pm_info' has no member named 'ignore_children'
   85 |         if (!dev->power.ignore_children)
      |                        ^
drivers/base/power/domain.c: In function 'genpd_queue_power_off_work':
drivers/base/power/domain.c:657:20: error: 'pm_wq' undeclared (first use in this function)
  657 |         queue_work(pm_wq, &genpd->power_off_work);
      |                    ^~~~~

Unfortunately platforms are inconsistent between using 'select PM'
and 'depends on PM' here. CONFIG_PM is a user-visible symbol, so
in principle we should be using 'depends on', but on the other hand
using 'select' here is more common among drivers/soc. Go with the
majority for now, as this has a smaller risk of introducing circular
dependencies. We may need to clean this up for consistency later.

Fixes: 0e30ca5ab0a8 ("soc: sunxi: Add Allwinner D1 PPU driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/soc/sunxi/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/sunxi/Kconfig b/drivers/soc/sunxi/Kconfig
index 29e9ba2d520d..02d0b338feb3 100644
--- a/drivers/soc/sunxi/Kconfig
+++ b/drivers/soc/sunxi/Kconfig
@@ -23,6 +23,7 @@ config SUNXI_SRAM
 config SUN20I_PPU
 	bool "Allwinner D1 PPU power domain driver"
 	depends on ARCH_SUNXI || COMPILE_TEST
+	select PM
 	select PM_GENERIC_DOMAINS
 	help
 	  Say y to enable the PPU power domain driver. This saves power
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] soc: sunxi: select CONFIG_PM
@ 2023-01-30 13:04 ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2023-01-30 13:04 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: Arnd Bergmann, linux-arm-kernel, linux-sunxi, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Selecting CONFIG_PM_GENERIC_DOMAINS without CONFIG_PM leads to a
build failure:

WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS
  Depends on [n]: PM [=n]
  Selected by [y]:
  - SUN20I_PPU [=y] && (ARCH_SUNXI [=n] || COMPILE_TEST [=y])

drivers/base/power/domain_governor.c: In function 'default_suspend_ok':
drivers/base/power/domain_governor.c:85:24: error: 'struct dev_pm_info' has no member named 'ignore_children'
   85 |         if (!dev->power.ignore_children)
      |                        ^
drivers/base/power/domain.c: In function 'genpd_queue_power_off_work':
drivers/base/power/domain.c:657:20: error: 'pm_wq' undeclared (first use in this function)
  657 |         queue_work(pm_wq, &genpd->power_off_work);
      |                    ^~~~~

Unfortunately platforms are inconsistent between using 'select PM'
and 'depends on PM' here. CONFIG_PM is a user-visible symbol, so
in principle we should be using 'depends on', but on the other hand
using 'select' here is more common among drivers/soc. Go with the
majority for now, as this has a smaller risk of introducing circular
dependencies. We may need to clean this up for consistency later.

Fixes: 0e30ca5ab0a8 ("soc: sunxi: Add Allwinner D1 PPU driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/soc/sunxi/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/sunxi/Kconfig b/drivers/soc/sunxi/Kconfig
index 29e9ba2d520d..02d0b338feb3 100644
--- a/drivers/soc/sunxi/Kconfig
+++ b/drivers/soc/sunxi/Kconfig
@@ -23,6 +23,7 @@ config SUNXI_SRAM
 config SUN20I_PPU
 	bool "Allwinner D1 PPU power domain driver"
 	depends on ARCH_SUNXI || COMPILE_TEST
+	select PM
 	select PM_GENERIC_DOMAINS
 	help
 	  Say y to enable the PPU power domain driver. This saves power
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: sunxi: select CONFIG_PM
  2023-01-30 13:04 ` Arnd Bergmann
@ 2023-01-30 21:18   ` Jernej Škrabec
  -1 siblings, 0 replies; 12+ messages in thread
From: Jernej Škrabec @ 2023-01-30 21:18 UTC (permalink / raw)
  To: Chen-Yu Tsai, Samuel Holland, Arnd Bergmann
  Cc: Arnd Bergmann, linux-arm-kernel, linux-sunxi, linux-kernel

Dne ponedeljek, 30. januar 2023 ob 14:04:47 CET je Arnd Bergmann napisal(a):
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Selecting CONFIG_PM_GENERIC_DOMAINS without CONFIG_PM leads to a
> build failure:
> 
> WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS
>   Depends on [n]: PM [=n]
>   Selected by [y]:
>   - SUN20I_PPU [=y] && (ARCH_SUNXI [=n] || COMPILE_TEST [=y])
> 
> drivers/base/power/domain_governor.c: In function 'default_suspend_ok':
> drivers/base/power/domain_governor.c:85:24: error: 'struct dev_pm_info' has
> no member named 'ignore_children' 85 |         if
> (!dev->power.ignore_children)
> 
>       |                        ^
> 
> drivers/base/power/domain.c: In function 'genpd_queue_power_off_work':
> drivers/base/power/domain.c:657:20: error: 'pm_wq' undeclared (first use in
> this function) 657 |         queue_work(pm_wq, &genpd->power_off_work);
> 
>       |                    ^~~~~
> 
> Unfortunately platforms are inconsistent between using 'select PM'
> and 'depends on PM' here. CONFIG_PM is a user-visible symbol, so
> in principle we should be using 'depends on', but on the other hand
> using 'select' here is more common among drivers/soc. Go with the
> majority for now, as this has a smaller risk of introducing circular
> dependencies. We may need to clean this up for consistency later.
> 
> Fixes: 0e30ca5ab0a8 ("soc: sunxi: Add Allwinner D1 PPU driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Although, would it be better if commit in question is fixed and another PR is 
issued? That way we can avoid issue with broken config.

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: sunxi: select CONFIG_PM
@ 2023-01-30 21:18   ` Jernej Škrabec
  0 siblings, 0 replies; 12+ messages in thread
From: Jernej Škrabec @ 2023-01-30 21:18 UTC (permalink / raw)
  To: Chen-Yu Tsai, Samuel Holland, Arnd Bergmann
  Cc: Arnd Bergmann, linux-arm-kernel, linux-sunxi, linux-kernel

Dne ponedeljek, 30. januar 2023 ob 14:04:47 CET je Arnd Bergmann napisal(a):
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Selecting CONFIG_PM_GENERIC_DOMAINS without CONFIG_PM leads to a
> build failure:
> 
> WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS
>   Depends on [n]: PM [=n]
>   Selected by [y]:
>   - SUN20I_PPU [=y] && (ARCH_SUNXI [=n] || COMPILE_TEST [=y])
> 
> drivers/base/power/domain_governor.c: In function 'default_suspend_ok':
> drivers/base/power/domain_governor.c:85:24: error: 'struct dev_pm_info' has
> no member named 'ignore_children' 85 |         if
> (!dev->power.ignore_children)
> 
>       |                        ^
> 
> drivers/base/power/domain.c: In function 'genpd_queue_power_off_work':
> drivers/base/power/domain.c:657:20: error: 'pm_wq' undeclared (first use in
> this function) 657 |         queue_work(pm_wq, &genpd->power_off_work);
> 
>       |                    ^~~~~
> 
> Unfortunately platforms are inconsistent between using 'select PM'
> and 'depends on PM' here. CONFIG_PM is a user-visible symbol, so
> in principle we should be using 'depends on', but on the other hand
> using 'select' here is more common among drivers/soc. Go with the
> majority for now, as this has a smaller risk of introducing circular
> dependencies. We may need to clean this up for consistency later.
> 
> Fixes: 0e30ca5ab0a8 ("soc: sunxi: Add Allwinner D1 PPU driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Although, would it be better if commit in question is fixed and another PR is 
issued? That way we can avoid issue with broken config.

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: sunxi: select CONFIG_PM
  2023-01-30 21:18   ` Jernej Škrabec
@ 2023-01-30 21:24     ` Arnd Bergmann
  -1 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2023-01-30 21:24 UTC (permalink / raw)
  To: Jernej Skrabec, Chen-Yu Tsai, Samuel Holland, Arnd Bergmann
  Cc: linux-arm-kernel, linux-sunxi, linux-kernel

On Mon, Jan 30, 2023, at 22:18, Jernej Škrabec wrote:
> Dne ponedeljek, 30. januar 2023 ob 14:04:47 CET je Arnd Bergmann napisal(a):
>> From: Arnd Bergmann <arnd@arndb.de>
>> 
>> Selecting CONFIG_PM_GENERIC_DOMAINS without CONFIG_PM leads to a
>> build failure:
>> 
>> WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS
>>   Depends on [n]: PM [=n]
>>   Selected by [y]:
>>   - SUN20I_PPU [=y] && (ARCH_SUNXI [=n] || COMPILE_TEST [=y])
>> 
>> drivers/base/power/domain_governor.c: In function 'default_suspend_ok':
>> drivers/base/power/domain_governor.c:85:24: error: 'struct dev_pm_info' has
>> no member named 'ignore_children' 85 |         if
>> (!dev->power.ignore_children)
>> 
>>       |                        ^
>> 
>> drivers/base/power/domain.c: In function 'genpd_queue_power_off_work':
>> drivers/base/power/domain.c:657:20: error: 'pm_wq' undeclared (first use in
>> this function) 657 |         queue_work(pm_wq, &genpd->power_off_work);
>> 
>>       |                    ^~~~~
>> 
>> Unfortunately platforms are inconsistent between using 'select PM'
>> and 'depends on PM' here. CONFIG_PM is a user-visible symbol, so
>> in principle we should be using 'depends on', but on the other hand
>> using 'select' here is more common among drivers/soc. Go with the
>> majority for now, as this has a smaller risk of introducing circular
>> dependencies. We may need to clean this up for consistency later.
>> 
>> Fixes: 0e30ca5ab0a8 ("soc: sunxi: Add Allwinner D1 PPU driver")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
>
> Although, would it be better if commit in question is fixed and another PR is 
> issued? That way we can avoid issue with broken config.

Agreed, merging it into the original commit would have been ideal.
unfortunately the half of my brain that does the pull request
didn't talk to the half that wrote the bugfix, so I already pulled
it in after I sent the fix for linux-next...

I'll just add the fix with your Ack on top then.

    Arnd

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: sunxi: select CONFIG_PM
@ 2023-01-30 21:24     ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2023-01-30 21:24 UTC (permalink / raw)
  To: Jernej Skrabec, Chen-Yu Tsai, Samuel Holland, Arnd Bergmann
  Cc: linux-arm-kernel, linux-sunxi, linux-kernel

On Mon, Jan 30, 2023, at 22:18, Jernej Škrabec wrote:
> Dne ponedeljek, 30. januar 2023 ob 14:04:47 CET je Arnd Bergmann napisal(a):
>> From: Arnd Bergmann <arnd@arndb.de>
>> 
>> Selecting CONFIG_PM_GENERIC_DOMAINS without CONFIG_PM leads to a
>> build failure:
>> 
>> WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS
>>   Depends on [n]: PM [=n]
>>   Selected by [y]:
>>   - SUN20I_PPU [=y] && (ARCH_SUNXI [=n] || COMPILE_TEST [=y])
>> 
>> drivers/base/power/domain_governor.c: In function 'default_suspend_ok':
>> drivers/base/power/domain_governor.c:85:24: error: 'struct dev_pm_info' has
>> no member named 'ignore_children' 85 |         if
>> (!dev->power.ignore_children)
>> 
>>       |                        ^
>> 
>> drivers/base/power/domain.c: In function 'genpd_queue_power_off_work':
>> drivers/base/power/domain.c:657:20: error: 'pm_wq' undeclared (first use in
>> this function) 657 |         queue_work(pm_wq, &genpd->power_off_work);
>> 
>>       |                    ^~~~~
>> 
>> Unfortunately platforms are inconsistent between using 'select PM'
>> and 'depends on PM' here. CONFIG_PM is a user-visible symbol, so
>> in principle we should be using 'depends on', but on the other hand
>> using 'select' here is more common among drivers/soc. Go with the
>> majority for now, as this has a smaller risk of introducing circular
>> dependencies. We may need to clean this up for consistency later.
>> 
>> Fixes: 0e30ca5ab0a8 ("soc: sunxi: Add Allwinner D1 PPU driver")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
>
> Although, would it be better if commit in question is fixed and another PR is 
> issued? That way we can avoid issue with broken config.

Agreed, merging it into the original commit would have been ideal.
unfortunately the half of my brain that does the pull request
didn't talk to the half that wrote the bugfix, so I already pulled
it in after I sent the fix for linux-next...

I'll just add the fix with your Ack on top then.

    Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: sunxi: select CONFIG_PM
  2023-01-30 13:04 ` Arnd Bergmann
@ 2023-02-04  7:47   ` Randy Dunlap
  -1 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2023-02-04  7:47 UTC (permalink / raw)
  To: Arnd Bergmann, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, sparclinux
  Cc: Arnd Bergmann, linux-arm-kernel, linux-sunxi, linux-kernel

Hi--

On 1/30/23 05:04, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Selecting CONFIG_PM_GENERIC_DOMAINS without CONFIG_PM leads to a
> build failure:
> 
> WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS
>   Depends on [n]: PM [=n]
>   Selected by [y]:
>   - SUN20I_PPU [=y] && (ARCH_SUNXI [=n] || COMPILE_TEST [=y])
> 
> drivers/base/power/domain_governor.c: In function 'default_suspend_ok':
> drivers/base/power/domain_governor.c:85:24: error: 'struct dev_pm_info' has no member named 'ignore_children'
>    85 |         if (!dev->power.ignore_children)
>       |                        ^
> drivers/base/power/domain.c: In function 'genpd_queue_power_off_work':
> drivers/base/power/domain.c:657:20: error: 'pm_wq' undeclared (first use in this function)
>   657 |         queue_work(pm_wq, &genpd->power_off_work);
>       |                    ^~~~~
> 
> Unfortunately platforms are inconsistent between using 'select PM'
> and 'depends on PM' here. CONFIG_PM is a user-visible symbol, so
> in principle we should be using 'depends on', but on the other hand
> using 'select' here is more common among drivers/soc. Go with the
> majority for now, as this has a smaller risk of introducing circular
> dependencies. We may need to clean this up for consistency later.
> 
> Fixes: 0e30ca5ab0a8 ("soc: sunxi: Add Allwinner D1 PPU driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

With this patch (in linux-next-20230203), building on sparc32 with
COMPILE_TEST=y and ARCH_SUNXI not set:

WARNING: unmet direct dependencies detected for PM
  Depends on [n]: SPARC64 [=n]
  Selected by [y]:
  - SUN20I_PPU [=y] && (ARCH_SUNXI || COMPILE_TEST [=y])

WARNING: unmet direct dependencies detected for PM
  Depends on [n]: SPARC64 [=n]
  Selected by [y]:
  - SUN20I_PPU [=y] && (ARCH_SUNXI || COMPILE_TEST [=y])

WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS
  Depends on [n]: SPARC64 [=n] && PM [=y]
  Selected by [y]:
  - QCOM_GDSC [=y] && COMMON_CLK [=y] && PM [=y]
  - SUN20I_PPU [=y] && (ARCH_SUNXI || COMPILE_TEST [=y])
  - MESON_GX_PM_DOMAINS [=y] && (ARCH_MESON || COMPILE_TEST [=y]) && PM [=y] && OF [=y]
  - BCM2835_POWER [=y] && (ARCH_BCM2835 || COMPILE_TEST [=y] && OF [=y]) && PM [=y]
  - BCM_PMB [=y] && (ARCH_BCMBCA || COMPILE_TEST [=y] && OF [=y]) && PM [=y]
  - ROCKCHIP_PM_DOMAINS [=y] && (ARCH_ROCKCHIP || COMPILE_TEST [=y]) && PM [=y]
  Selected by [m]:
  - ARM_SCPI_POWER_DOMAIN [=m] && (ARM_SCPI_PROTOCOL [=m] || COMPILE_TEST [=y] && OF [=y]) && PM [=y]
  - MESON_EE_PM_DOMAINS [=m] && (ARCH_MESON || COMPILE_TEST [=y]) && PM [=y] && OF [=y]
  - QCOM_AOSS_QMP [=m] && (ARCH_QCOM || COMPILE_TEST [=y]) && MAILBOX [=y] && COMMON_CLK [=y] && PM [=y]

WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS_OF
  Depends on [n]: SPARC64 [=n] && PM_GENERIC_DOMAINS [=y] && OF [=y]
  Selected by [y]:
  - MESON_GX_PM_DOMAINS [=y] && (ARCH_MESON || COMPILE_TEST [=y]) && PM [=y] && OF [=y]
  Selected by [m]:
  - MESON_EE_PM_DOMAINS [=m] && (ARCH_MESON || COMPILE_TEST [=y]) && PM [=y] && OF [=y]

Apparently sparc32 does not support PM (arch/sparc/Kconfig):

if SPARC64
source "kernel/power/Kconfig"
endif

so I think that SUN20I_PPU should also depend on !SPARC32.
Does that make sense?

Thanks.

> ---
>  drivers/soc/sunxi/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soc/sunxi/Kconfig b/drivers/soc/sunxi/Kconfig
> index 29e9ba2d520d..02d0b338feb3 100644
> --- a/drivers/soc/sunxi/Kconfig
> +++ b/drivers/soc/sunxi/Kconfig
> @@ -23,6 +23,7 @@ config SUNXI_SRAM
>  config SUN20I_PPU
>  	bool "Allwinner D1 PPU power domain driver"
>  	depends on ARCH_SUNXI || COMPILE_TEST
> +	select PM
>  	select PM_GENERIC_DOMAINS
>  	help
>  	  Say y to enable the PPU power domain driver. This saves power

-- 
~Randy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: sunxi: select CONFIG_PM
@ 2023-02-04  7:47   ` Randy Dunlap
  0 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2023-02-04  7:47 UTC (permalink / raw)
  To: Arnd Bergmann, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, sparclinux
  Cc: Arnd Bergmann, linux-arm-kernel, linux-sunxi, linux-kernel

Hi--

On 1/30/23 05:04, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Selecting CONFIG_PM_GENERIC_DOMAINS without CONFIG_PM leads to a
> build failure:
> 
> WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS
>   Depends on [n]: PM [=n]
>   Selected by [y]:
>   - SUN20I_PPU [=y] && (ARCH_SUNXI [=n] || COMPILE_TEST [=y])
> 
> drivers/base/power/domain_governor.c: In function 'default_suspend_ok':
> drivers/base/power/domain_governor.c:85:24: error: 'struct dev_pm_info' has no member named 'ignore_children'
>    85 |         if (!dev->power.ignore_children)
>       |                        ^
> drivers/base/power/domain.c: In function 'genpd_queue_power_off_work':
> drivers/base/power/domain.c:657:20: error: 'pm_wq' undeclared (first use in this function)
>   657 |         queue_work(pm_wq, &genpd->power_off_work);
>       |                    ^~~~~
> 
> Unfortunately platforms are inconsistent between using 'select PM'
> and 'depends on PM' here. CONFIG_PM is a user-visible symbol, so
> in principle we should be using 'depends on', but on the other hand
> using 'select' here is more common among drivers/soc. Go with the
> majority for now, as this has a smaller risk of introducing circular
> dependencies. We may need to clean this up for consistency later.
> 
> Fixes: 0e30ca5ab0a8 ("soc: sunxi: Add Allwinner D1 PPU driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

With this patch (in linux-next-20230203), building on sparc32 with
COMPILE_TEST=y and ARCH_SUNXI not set:

WARNING: unmet direct dependencies detected for PM
  Depends on [n]: SPARC64 [=n]
  Selected by [y]:
  - SUN20I_PPU [=y] && (ARCH_SUNXI || COMPILE_TEST [=y])

WARNING: unmet direct dependencies detected for PM
  Depends on [n]: SPARC64 [=n]
  Selected by [y]:
  - SUN20I_PPU [=y] && (ARCH_SUNXI || COMPILE_TEST [=y])

WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS
  Depends on [n]: SPARC64 [=n] && PM [=y]
  Selected by [y]:
  - QCOM_GDSC [=y] && COMMON_CLK [=y] && PM [=y]
  - SUN20I_PPU [=y] && (ARCH_SUNXI || COMPILE_TEST [=y])
  - MESON_GX_PM_DOMAINS [=y] && (ARCH_MESON || COMPILE_TEST [=y]) && PM [=y] && OF [=y]
  - BCM2835_POWER [=y] && (ARCH_BCM2835 || COMPILE_TEST [=y] && OF [=y]) && PM [=y]
  - BCM_PMB [=y] && (ARCH_BCMBCA || COMPILE_TEST [=y] && OF [=y]) && PM [=y]
  - ROCKCHIP_PM_DOMAINS [=y] && (ARCH_ROCKCHIP || COMPILE_TEST [=y]) && PM [=y]
  Selected by [m]:
  - ARM_SCPI_POWER_DOMAIN [=m] && (ARM_SCPI_PROTOCOL [=m] || COMPILE_TEST [=y] && OF [=y]) && PM [=y]
  - MESON_EE_PM_DOMAINS [=m] && (ARCH_MESON || COMPILE_TEST [=y]) && PM [=y] && OF [=y]
  - QCOM_AOSS_QMP [=m] && (ARCH_QCOM || COMPILE_TEST [=y]) && MAILBOX [=y] && COMMON_CLK [=y] && PM [=y]

WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS_OF
  Depends on [n]: SPARC64 [=n] && PM_GENERIC_DOMAINS [=y] && OF [=y]
  Selected by [y]:
  - MESON_GX_PM_DOMAINS [=y] && (ARCH_MESON || COMPILE_TEST [=y]) && PM [=y] && OF [=y]
  Selected by [m]:
  - MESON_EE_PM_DOMAINS [=m] && (ARCH_MESON || COMPILE_TEST [=y]) && PM [=y] && OF [=y]

Apparently sparc32 does not support PM (arch/sparc/Kconfig):

if SPARC64
source "kernel/power/Kconfig"
endif

so I think that SUN20I_PPU should also depend on !SPARC32.
Does that make sense?

Thanks.

> ---
>  drivers/soc/sunxi/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soc/sunxi/Kconfig b/drivers/soc/sunxi/Kconfig
> index 29e9ba2d520d..02d0b338feb3 100644
> --- a/drivers/soc/sunxi/Kconfig
> +++ b/drivers/soc/sunxi/Kconfig
> @@ -23,6 +23,7 @@ config SUNXI_SRAM
>  config SUN20I_PPU
>  	bool "Allwinner D1 PPU power domain driver"
>  	depends on ARCH_SUNXI || COMPILE_TEST
> +	select PM
>  	select PM_GENERIC_DOMAINS
>  	help
>  	  Say y to enable the PPU power domain driver. This saves power

-- 
~Randy

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: sunxi: select CONFIG_PM
  2023-02-04  7:47   ` Randy Dunlap
@ 2023-02-04 10:38     ` Arnd Bergmann
  -1 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2023-02-04 10:38 UTC (permalink / raw)
  To: Randy Dunlap, Arnd Bergmann, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, sparclinux
  Cc: linux-arm-kernel, linux-sunxi, linux-kernel

On Sat, Feb 4, 2023, at 08:47, Randy Dunlap wrote:
> On 1/30/23 05:04, Arnd Bergmann wrote:
>
> Apparently sparc32 does not support PM (arch/sparc/Kconfig):
>
> if SPARC64
> source "kernel/power/Kconfig"
> endif
>
> so I think that SUN20I_PPU should also depend on !SPARC32.
> Does that make sense?

I would suggest working around this in arch/sparc/ instead
of every driver that uses 'select PM', perhaps something like

--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -283,7 +283,7 @@ config ARCH_FORCE_MAX_ORDER
          This config option is actually maximum order plus one. For example,
          a value of 13 means that the largest free memory block is 2^12 pages.
 
-if SPARC64
+if SPARC64 || COMPILE_TEST
 source "kernel/power/Kconfig"
 endif
 
The issue does not happen anywhere else, as it's fine if
kernel/power/Kconfig is not included at all. I'm also not too
worried about random sparc32 configs since it's pretty much impossible
to build a sparc32 allmodconfig or randconfig, with all the other
bugs that runs into.

     Arnd

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: sunxi: select CONFIG_PM
@ 2023-02-04 10:38     ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2023-02-04 10:38 UTC (permalink / raw)
  To: Randy Dunlap, Arnd Bergmann, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, sparclinux
  Cc: linux-arm-kernel, linux-sunxi, linux-kernel

On Sat, Feb 4, 2023, at 08:47, Randy Dunlap wrote:
> On 1/30/23 05:04, Arnd Bergmann wrote:
>
> Apparently sparc32 does not support PM (arch/sparc/Kconfig):
>
> if SPARC64
> source "kernel/power/Kconfig"
> endif
>
> so I think that SUN20I_PPU should also depend on !SPARC32.
> Does that make sense?

I would suggest working around this in arch/sparc/ instead
of every driver that uses 'select PM', perhaps something like

--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -283,7 +283,7 @@ config ARCH_FORCE_MAX_ORDER
          This config option is actually maximum order plus one. For example,
          a value of 13 means that the largest free memory block is 2^12 pages.
 
-if SPARC64
+if SPARC64 || COMPILE_TEST
 source "kernel/power/Kconfig"
 endif
 
The issue does not happen anywhere else, as it's fine if
kernel/power/Kconfig is not included at all. I'm also not too
worried about random sparc32 configs since it's pretty much impossible
to build a sparc32 allmodconfig or randconfig, with all the other
bugs that runs into.

     Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: sunxi: select CONFIG_PM
  2023-02-04 10:38     ` Arnd Bergmann
@ 2023-02-04 16:54       ` Randy Dunlap
  -1 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2023-02-04 16:54 UTC (permalink / raw)
  To: Arnd Bergmann, Arnd Bergmann, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, sparclinux
  Cc: linux-arm-kernel, linux-sunxi, linux-kernel



On 2/4/23 02:38, Arnd Bergmann wrote:
> On Sat, Feb 4, 2023, at 08:47, Randy Dunlap wrote:
>> On 1/30/23 05:04, Arnd Bergmann wrote:
>>
>> Apparently sparc32 does not support PM (arch/sparc/Kconfig):
>>
>> if SPARC64
>> source "kernel/power/Kconfig"
>> endif
>>
>> so I think that SUN20I_PPU should also depend on !SPARC32.
>> Does that make sense?
> 
> I would suggest working around this in arch/sparc/ instead
> of every driver that uses 'select PM', perhaps something like
> 
> --- a/arch/sparc/Kconfig
> +++ b/arch/sparc/Kconfig
> @@ -283,7 +283,7 @@ config ARCH_FORCE_MAX_ORDER
>           This config option is actually maximum order plus one. For example,
>           a value of 13 means that the largest free memory block is 2^12 pages.
>  
> -if SPARC64
> +if SPARC64 || COMPILE_TEST
>  source "kernel/power/Kconfig"
>  endif
>

That looks good. Thanks.

> The issue does not happen anywhere else, as it's fine if
> kernel/power/Kconfig is not included at all. I'm also not too
> worried about random sparc32 configs since it's pretty much impossible
> to build a sparc32 allmodconfig or randconfig, with all the other
> bugs that runs into.

OK/ack.

-- 
~Randy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: sunxi: select CONFIG_PM
@ 2023-02-04 16:54       ` Randy Dunlap
  0 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2023-02-04 16:54 UTC (permalink / raw)
  To: Arnd Bergmann, Arnd Bergmann, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, sparclinux
  Cc: linux-arm-kernel, linux-sunxi, linux-kernel



On 2/4/23 02:38, Arnd Bergmann wrote:
> On Sat, Feb 4, 2023, at 08:47, Randy Dunlap wrote:
>> On 1/30/23 05:04, Arnd Bergmann wrote:
>>
>> Apparently sparc32 does not support PM (arch/sparc/Kconfig):
>>
>> if SPARC64
>> source "kernel/power/Kconfig"
>> endif
>>
>> so I think that SUN20I_PPU should also depend on !SPARC32.
>> Does that make sense?
> 
> I would suggest working around this in arch/sparc/ instead
> of every driver that uses 'select PM', perhaps something like
> 
> --- a/arch/sparc/Kconfig
> +++ b/arch/sparc/Kconfig
> @@ -283,7 +283,7 @@ config ARCH_FORCE_MAX_ORDER
>           This config option is actually maximum order plus one. For example,
>           a value of 13 means that the largest free memory block is 2^12 pages.
>  
> -if SPARC64
> +if SPARC64 || COMPILE_TEST
>  source "kernel/power/Kconfig"
>  endif
>

That looks good. Thanks.

> The issue does not happen anywhere else, as it's fine if
> kernel/power/Kconfig is not included at all. I'm also not too
> worried about random sparc32 configs since it's pretty much impossible
> to build a sparc32 allmodconfig or randconfig, with all the other
> bugs that runs into.

OK/ack.

-- 
~Randy

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-02-04 16:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30 13:04 [PATCH] soc: sunxi: select CONFIG_PM Arnd Bergmann
2023-01-30 13:04 ` Arnd Bergmann
2023-01-30 21:18 ` Jernej Škrabec
2023-01-30 21:18   ` Jernej Škrabec
2023-01-30 21:24   ` Arnd Bergmann
2023-01-30 21:24     ` Arnd Bergmann
2023-02-04  7:47 ` Randy Dunlap
2023-02-04  7:47   ` Randy Dunlap
2023-02-04 10:38   ` Arnd Bergmann
2023-02-04 10:38     ` Arnd Bergmann
2023-02-04 16:54     ` Randy Dunlap
2023-02-04 16:54       ` Randy Dunlap

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.