2022-04-28 07:36:18

by Paul Gortmaker

[permalink] [raw]
Subject: [PATCH 2/4] ACPI: LPSS: make the Kconfig dependency on PMC_ATOM explicit

The code in acpi_lpss.c has been unconditionally using pmc_atom_read()
for about the past six years. This hasn't been a problem since you
currently can't disable PMC_ATOM short of disabling PCI entirely.

But it doesn't need to be that way, and so that we can change Kconfigs
in a subsequent commit, we make sure LPSS selects PMC_ATOM in advance,
so that existing .config files can live on with "make oldconfig".

In theory, one could make LPSS build w/o PMC_ATOM, similar to what it
did six years ago, but I doubt there is any demand for that now.

Cc: Andy Shevchenko <[email protected]>
Cc: Aubrey Li <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Len Brown <[email protected]>
Cc: [email protected]
Signed-off-by: Paul Gortmaker <[email protected]>
---
arch/x86/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 2ee26f10a814..163c198ec8ec 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -654,6 +654,7 @@ config X86_INTEL_LPSS
select COMMON_CLK
select PINCTRL
select IOSF_MBI
+ select PMC_ATOM
help
Select to build support for Intel Low Power Subsystem such as
found on Intel Lynxpoint PCH. Selecting this option enables
--
2.17.1


2022-04-28 15:43:25

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 2/4] ACPI: LPSS: make the Kconfig dependency on PMC_ATOM explicit

On Thu, Apr 28, 2022 at 02:24:28AM -0400, Paul Gortmaker wrote:
> The code in acpi_lpss.c has been unconditionally using pmc_atom_read()
> for about the past six years. This hasn't been a problem since you
> currently can't disable PMC_ATOM short of disabling PCI entirely.
>
> But it doesn't need to be that way, and so that we can change Kconfigs
> in a subsequent commit, we make sure LPSS selects PMC_ATOM in advance,
> so that existing .config files can live on with "make oldconfig".
>
> In theory, one could make LPSS build w/o PMC_ATOM, similar to what it
> did six years ago, but I doubt there is any demand for that now.

I'm wondering if without LPSS we may use those devices to some extend.
If it's the case, this patch is half-baked since it's missed the network
and audio drivers to also enable it (see PMC clock driver registration
and usage).

That said, I'm not sure it's beneficial to spread this selection over
the drivers that may be used widely on non-Intel-Atom platforms.

--
With Best Regards,
Andy Shevchenko


2022-05-08 07:23:05

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 2/4] ACPI: LPSS: make the Kconfig dependency on PMC_ATOM explicit

On Thu, Apr 28, 2022 at 8:25 AM Paul Gortmaker
<[email protected]> wrote:
>
> The code in acpi_lpss.c has been unconditionally using pmc_atom_read()
> for about the past six years. This hasn't been a problem since you
> currently can't disable PMC_ATOM short of disabling PCI entirely.
>
> But it doesn't need to be that way, and so that we can change Kconfigs
> in a subsequent commit, we make sure LPSS selects PMC_ATOM in advance,
> so that existing .config files can live on with "make oldconfig".
>
> In theory, one could make LPSS build w/o PMC_ATOM, similar to what it
> did six years ago, but I doubt there is any demand for that now.

You probably are right and it will get some more build test coverage
with respect to the other option, so

Acked-by: Rafael J. Wysocki <[email protected]>

> Cc: Andy Shevchenko <[email protected]>
> Cc: Aubrey Li <[email protected]>
> Cc: "Rafael J. Wysocki" <[email protected]>
> Cc: Len Brown <[email protected]>
> Cc: [email protected]
> Signed-off-by: Paul Gortmaker <[email protected]>
> ---
> arch/x86/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 2ee26f10a814..163c198ec8ec 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -654,6 +654,7 @@ config X86_INTEL_LPSS
> select COMMON_CLK
> select PINCTRL
> select IOSF_MBI
> + select PMC_ATOM
> help
> Select to build support for Intel Low Power Subsystem such as
> found on Intel Lynxpoint PCH. Selecting this option enables
> --
> 2.17.1
>