From: Hans de Goede <hdegoede@redhat.com>
To: Paul Gortmaker <paul.gortmaker@windriver.com>,
linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Aubrey Li <aubrey.li@linux.intel.com>,
Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, Mark Gross <markgross@kernel.org>,
platform-driver-x86@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH 4/4] platform/x86: pmc_atom: make the PMC driver actually unselectable
Date: Mon, 2 May 2022 16:45:42 +0200 [thread overview]
Message-ID: <7609be8e-6331-2b4b-3349-bf300bb6af15@redhat.com> (raw)
In-Reply-To: <20220428062430.31010-5-paul.gortmaker@windriver.com>
Hi,
On 4/28/22 08:24, Paul Gortmaker wrote:
> This caught my eye when I saw it was def_bool and hence largely
> pointless to have a Kconfig for it at all.
>
> Yet there is no reason why you shouldn't be able to opt out of Atom
> platform support if you only care about desktop and server class CPUs.
>
> It was introduced as def_bool, but there is no obvious reason as to why
> it was forcibly built-in for everyone, other than LPSS implicitly
> relying on it (which is now fixed). So here we fix up the Kconfig and
> open the door for people to opt out.
>
> Since putting "default y" on anything that isn't absolutely essential is
> generally frowned upon, I made the default be CONFIG_MATOM. People who
> use "make oldconfig" or similar won't notice any difference.
>
> The two "unchanged" lines for PCI and COMMON_CLK appear in the diff from
> fixing a whitespace issue that somehow managed to live on despite being
> moved between two different Kconfig files since its introduction.
>
> Cc: Aubrey Li <aubrey.li@linux.intel.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Mark Gross <markgross@kernel.org>
> Cc: platform-driver-x86@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
> drivers/platform/x86/Kconfig | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index f08ad85683cb..86459e99d831 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -1163,6 +1163,11 @@ config WINMATE_FM07_KEYS
> endif # X86_PLATFORM_DEVICES
>
> config PMC_ATOM
> - def_bool y
> - depends on PCI
> - select COMMON_CLK
> + bool "Intel Atom SOC Power Management Controller driver"
> + default MATOM
Besides the remarks from Andy, this does seem like a weird default,
MATOM means that gcc is passed -march=atom nothing more and nothing
less. For a distro kernel which may e.g. set
CONFIG_GENERIC_CPU we still want this enabled. But as said it is
brought in by CONFIG_X86_INTEL_LPSS when that is set.
Thinking more about this I think it might be best to just do this
instead, replacing patch 2 + 4 of this set:
diff --git a/drivers/clk/x86/Makefile b/drivers/clk/x86/Makefile
index 1244c4e568ff..c2088b3c4081 100644
--- a/drivers/clk/x86/Makefile
+++ b/drivers/clk/x86/Makefile
@@ -1,6 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_PMC_ATOM) += clk-pmc-atom.o
obj-$(CONFIG_X86_AMD_PLATFORM_DEVICE) += clk-fch.o
-clk-x86-lpss-y := clk-lpss-atom.o
-obj-$(CONFIG_X86_INTEL_LPSS) += clk-x86-lpss.o
+obj-$(CONFIG_X86_INTEL_LPSS) += clk-lpss-atom.o clk-pmc-atom.o
obj-$(CONFIG_CLK_LGM_CGU) += clk-cgu.o clk-cgu-pll.o clk-lgm.o
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index f08ad85683cb..85c396a43048 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1161,8 +1161,3 @@ config WINMATE_FM07_KEYS
that delivers key events when these buttons are pressed.
endif # X86_PLATFORM_DEVICES
-
-config PMC_ATOM
- def_bool y
- depends on PCI
- select COMMON_CLK
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 4a59f47a46e2..cc2a74713313 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -126,7 +126,7 @@ obj-$(CONFIG_INTEL_SCU_PCI) += intel_scu_pcidrv.o
obj-$(CONFIG_INTEL_SCU_PLATFORM) += intel_scu_pltdrv.o
obj-$(CONFIG_INTEL_SCU_WDT) += intel_scu_wdt.o
obj-$(CONFIG_INTEL_SCU_IPC_UTIL) += intel_scu_ipcutil.o
-obj-$(CONFIG_PMC_ATOM) += pmc_atom.o
+obj-$(CONFIG_X86_INTEL_LPSS) += pmc_atom.o
# Siemens Simatic Industrial PCs
obj-$(CONFIG_SIEMENS_SIMATIC_IPC) += simatic-ipc.o
This just folds the enabling of the pmc_atom code into the same
Kconfig option as the one used the the LPSS code, so this actually
simplify things; while at the same time making it possible to
not build the pmc_atom code by unselecting the CONFIG_X86_INTEL_LPSS
option.
Regards,
Hans
next prev parent reply other threads:[~2022-05-02 14:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-28 6:24 [PATCH 0/4] platform: allow ATOM PMC code to be optional Paul Gortmaker
2022-04-28 6:24 ` [PATCH 1/4] platform/x86: pmc_atom: remove unused pmc_atom_write() Paul Gortmaker
2022-04-28 10:29 ` Andy Shevchenko
2022-05-06 10:43 ` Hans de Goede
2022-04-28 6:24 ` [PATCH 2/4] ACPI: LPSS: make the Kconfig dependency on PMC_ATOM explicit Paul Gortmaker
2022-04-28 10:35 ` Andy Shevchenko
2022-05-05 19:03 ` Rafael J. Wysocki
2022-04-28 6:24 ` [PATCH 3/4] platform/x86: pmc_atom: dont export pmc_atom_read - no modular users Paul Gortmaker
2022-05-06 10:43 ` Hans de Goede
2022-04-28 6:24 ` [PATCH 4/4] platform/x86: pmc_atom: make the PMC driver actually unselectable Paul Gortmaker
2022-04-28 10:20 ` Andy Shevchenko
2022-05-02 14:45 ` Hans de Goede [this message]
2022-04-28 10:12 ` [PATCH 0/4] platform: allow ATOM PMC code to be optional Andy Shevchenko
2022-04-28 18:11 ` Paul Gortmaker
2022-04-29 12:34 ` Andy Shevchenko
2022-05-02 14:30 ` Hans de Goede
2022-05-02 16:05 ` Andy Shevchenko
2022-05-03 7:48 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7609be8e-6331-2b4b-3349-bf300bb6af15@redhat.com \
--to=hdegoede@redhat.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=aubrey.li@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox