linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead
@ 2025-06-12 21:11 Sven Peter
  2025-06-12 21:11 ` [PATCH 01/11] pmdomain: apple: Drop default ARCH_APPLE in Kconfig Sven Peter
                   ` (15 more replies)
  0 siblings, 16 replies; 28+ messages in thread
From: Sven Peter @ 2025-06-12 21:11 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

Hi,

When support for Apple Silicon was originally upstreamed we somehow
started using `default ARCH_APPLE` for most drivers. arm64 defconfig
also contains ARCH_APPLE=y such that this will turn into `default y`
there by default which is neither what we want nor how this is usually
done.
Let's fix all that by dropping the default everywhere and adding the
drivers to defconfig as modules instead of built-ins.
None of these patches depend on each other so we can just take them all
independently through the respective subsystem trees.

Best,

Sven

Signed-off-by: Sven Peter <sven@kernel.org>
---
Sven Peter (11):
      pmdomain: apple: Drop default ARCH_APPLE in Kconfig
      soc: apple: Drop default ARCH_APPLE in Kconfig
      clk: apple-nco: Drop default ARCH_APPLE in Kconfig
      nvmem: apple: drop default ARCH_APPLE in Kconfig
      i2c: apple: Drop default ARCH_APPLE in Kconfig
      cpufreq: apple: drop default ARCH_APPLE in Kconfig
      iommu/apple-dart: Drop default ARCH_APPLE in Kconfig
      Input: apple_z2: Drop default ARCH_APPLE in Kconfig
      dmaengine: apple-admac: Drop default ARCH_APPLE in Kconfig
      ASoC: apple: mca: Drop default ARCH_APPLE in Kconfig
      arm64: defconfig: Enable Apple Silicon drivers

 arch/arm64/configs/defconfig      | 19 +++++++++++++++++++
 drivers/clk/Kconfig               |  1 -
 drivers/cpufreq/Kconfig.arm       |  1 -
 drivers/dma/Kconfig               |  1 -
 drivers/i2c/busses/Kconfig        |  1 -
 drivers/input/touchscreen/Kconfig |  1 -
 drivers/iommu/Kconfig             |  1 -
 drivers/nvmem/Kconfig             |  1 -
 drivers/pmdomain/apple/Kconfig    |  1 -
 drivers/soc/apple/Kconfig         |  3 ---
 sound/soc/apple/Kconfig           |  1 -
 11 files changed, 19 insertions(+), 12 deletions(-)
---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250611-apple-kconfig-defconfig-b558863a8cb9

Best regards,
-- 
Sven Peter <sven@kernel.org>




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

* [PATCH 01/11] pmdomain: apple: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
@ 2025-06-12 21:11 ` Sven Peter
  2025-06-18 12:56   ` Ulf Hansson
  2025-06-12 21:11 ` [PATCH 02/11] soc: " Sven Peter
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 28+ messages in thread
From: Sven Peter @ 2025-06-12 21:11 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

When the first driver for Apple Silicon was upstreamed we accidentally
included `default ARCH_APPLE` in its Kconfig which then spread to almost
every subsequent driver. As soon as ARCH_APPLE is set to y this will
pull in many drivers as built-ins which is not what we want.
Thus, drop `default ARCH_APPLE` from Kconfig.

Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/pmdomain/apple/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pmdomain/apple/Kconfig b/drivers/pmdomain/apple/Kconfig
index 12237cbcfaa983083367bad70b1b54ded9ac9824..a8973f8057fba74cd3e8c7d15cd2972081c6697d 100644
--- a/drivers/pmdomain/apple/Kconfig
+++ b/drivers/pmdomain/apple/Kconfig
@@ -9,7 +9,6 @@ config APPLE_PMGR_PWRSTATE
 	select MFD_SYSCON
 	select PM_GENERIC_DOMAINS
 	select RESET_CONTROLLER
-	default ARCH_APPLE
 	help
 	  The PMGR block in Apple SoCs provides high-level power state
 	  controls for SoC devices. This driver manages them through the

-- 
2.34.1




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

* [PATCH 02/11] soc: apple: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
  2025-06-12 21:11 ` [PATCH 01/11] pmdomain: apple: Drop default ARCH_APPLE in Kconfig Sven Peter
@ 2025-06-12 21:11 ` Sven Peter
  2025-06-12 21:11 ` [PATCH 03/11] clk: apple-nco: " Sven Peter
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Sven Peter @ 2025-06-12 21:11 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

When the first driver for Apple Silicon was upstreamed we accidentally
included `default ARCH_APPLE` in its Kconfig which then spread to almost
every subsequent driver. As soon as ARCH_APPLE is set to y this will
pull in many drivers as built-ins which is not what we want.
Thus, drop `default ARCH_APPLE` from Kconfig.

Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/soc/apple/Kconfig | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/soc/apple/Kconfig b/drivers/soc/apple/Kconfig
index 6388cbe1e56b5a9d90acad3ee2377ed6ac0d207d..ad67368892311bed5a94d358288390a6fb8b3b4a 100644
--- a/drivers/soc/apple/Kconfig
+++ b/drivers/soc/apple/Kconfig
@@ -8,7 +8,6 @@ config APPLE_MAILBOX
 	tristate "Apple SoC mailboxes"
 	depends on PM
 	depends on ARCH_APPLE || (64BIT && COMPILE_TEST)
-	default ARCH_APPLE
 	help
 	  Apple SoCs have various co-processors required for certain
 	  peripherals to work (NVMe, display controller, etc.). This
@@ -21,7 +20,6 @@ config APPLE_RTKIT
 	tristate "Apple RTKit co-processor IPC protocol"
 	depends on APPLE_MAILBOX
 	depends on ARCH_APPLE || COMPILE_TEST
-	default ARCH_APPLE
 	help
 	  Apple SoCs such as the M1 come with various co-processors running
 	  their proprietary RTKit operating system. This option enables support
@@ -33,7 +31,6 @@ config APPLE_RTKIT
 config APPLE_SART
 	tristate "Apple SART DMA address filter"
 	depends on ARCH_APPLE || COMPILE_TEST
-	default ARCH_APPLE
 	help
 	  Apple SART is a simple DMA address filter used on Apple SoCs such
 	  as the M1. It is usually required for the NVMe coprocessor which does

-- 
2.34.1




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

* [PATCH 03/11] clk: apple-nco: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
  2025-06-12 21:11 ` [PATCH 01/11] pmdomain: apple: Drop default ARCH_APPLE in Kconfig Sven Peter
  2025-06-12 21:11 ` [PATCH 02/11] soc: " Sven Peter
@ 2025-06-12 21:11 ` Sven Peter
  2025-06-19 19:51   ` Stephen Boyd
  2025-06-12 21:11 ` [PATCH 04/11] nvmem: apple: drop " Sven Peter
                   ` (12 subsequent siblings)
  15 siblings, 1 reply; 28+ messages in thread
From: Sven Peter @ 2025-06-12 21:11 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

When the first driver for Apple Silicon was upstreamed we accidentally
included `default ARCH_APPLE` in its Kconfig which then spread to almost
every subsequent driver. As soon as ARCH_APPLE is set to y this will
pull in many drivers as built-ins which is not what we want.
Thus, drop `default ARCH_APPLE` from Kconfig.

Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/clk/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 19c1ed280fd7f6958a4144975337abe1728e1e85..561fbc9eef2d82133cab0f165c6c55c5e6ab7fdd 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -61,7 +61,6 @@ config LMK04832
 config COMMON_CLK_APPLE_NCO
 	tristate "Clock driver for Apple SoC NCOs"
 	depends on ARCH_APPLE || COMPILE_TEST
-	default ARCH_APPLE
 	help
 	  This driver supports NCO (Numerically Controlled Oscillator) blocks
 	  found on Apple SoCs such as t8103 (M1). The blocks are typically

-- 
2.34.1




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

* [PATCH 04/11] nvmem: apple: drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (2 preceding siblings ...)
  2025-06-12 21:11 ` [PATCH 03/11] clk: apple-nco: " Sven Peter
@ 2025-06-12 21:11 ` Sven Peter
  2025-06-12 21:11 ` [PATCH 05/11] i2c: apple: Drop " Sven Peter
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Sven Peter @ 2025-06-12 21:11 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

When the first driver for Apple Silicon was upstreamed we accidentally
included `default ARCH_APPLE` in its Kconfig which then spread to almost
every subsequent driver. As soon as ARCH_APPLE is set to y this will
pull in many drivers as built-ins which is not what we want.
Thus, drop `default ARCH_APPLE` from Kconfig.

Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/nvmem/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index d370b2ad11e7eb3a3549a75edaada2d84c1e8dd7..edd811444ce5f4a1de1c59496f27bec417da2bbc 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -31,7 +31,6 @@ source "drivers/nvmem/layouts/Kconfig"
 config NVMEM_APPLE_EFUSES
 	tristate "Apple eFuse support"
 	depends on ARCH_APPLE || COMPILE_TEST
-	default ARCH_APPLE
 	help
 	  Say y here to enable support for reading eFuses on Apple SoCs
 	  such as the M1. These are e.g. used to store factory programmed

-- 
2.34.1




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

* [PATCH 05/11] i2c: apple: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (3 preceding siblings ...)
  2025-06-12 21:11 ` [PATCH 04/11] nvmem: apple: drop " Sven Peter
@ 2025-06-12 21:11 ` Sven Peter
  2025-08-03 20:40   ` Wolfram Sang
  2025-06-12 21:11 ` [PATCH 06/11] cpufreq: apple: drop " Sven Peter
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 28+ messages in thread
From: Sven Peter @ 2025-06-12 21:11 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

When the first driver for Apple Silicon was upstreamed we accidentally
included `default ARCH_APPLE` in its Kconfig which then spread to almost
every subsequent driver. As soon as ARCH_APPLE is set to y this will
pull in many drivers as built-ins which is not what we want.
Thus, drop `default ARCH_APPLE` from Kconfig.

Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/i2c/busses/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 48c5ab8320090cc383cea32337fb391c2b01a904..93440702b8eaf0fba4cca337eb2fd2959801a570 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -992,7 +992,6 @@ config I2C_APPLE
 	tristate "Apple SMBus platform driver"
 	depends on !I2C_PASEMI
 	depends on ARCH_APPLE || COMPILE_TEST
-	default ARCH_APPLE
 	help
 	  Say Y here if you want to use the I2C controller present on Apple
 	  Silicon chips such as the M1.

-- 
2.34.1




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

* [PATCH 06/11] cpufreq: apple: drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (4 preceding siblings ...)
  2025-06-12 21:11 ` [PATCH 05/11] i2c: apple: Drop " Sven Peter
@ 2025-06-12 21:11 ` Sven Peter
  2025-06-19  5:35   ` Viresh Kumar
  2025-06-12 21:11 ` [PATCH 07/11] iommu/apple-dart: Drop " Sven Peter
                   ` (9 subsequent siblings)
  15 siblings, 1 reply; 28+ messages in thread
From: Sven Peter @ 2025-06-12 21:11 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

When the first driver for Apple Silicon was upstreamed we accidentally
included `default ARCH_APPLE` in its Kconfig which then spread to almost
every subsequent driver. As soon as ARCH_APPLE is set to y this will
pull in many drivers as built-ins which is not what we want.
Thus, drop `default ARCH_APPLE` from Kconfig.

Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/cpufreq/Kconfig.arm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 0d46402e30942e3d15e9aae757d27895c2568fe1..4346629d3bc094cb3317ddff8b45e12ae5c5ca09 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -28,7 +28,6 @@ config ARM_APPLE_SOC_CPUFREQ
 	tristate "Apple Silicon SoC CPUFreq support"
 	depends on ARCH_APPLE || (COMPILE_TEST && 64BIT)
 	select PM_OPP
-	default ARCH_APPLE
 	help
 	  This adds the CPUFreq driver for Apple Silicon machines
 	  (e.g. Apple M1).

-- 
2.34.1




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

* [PATCH 07/11] iommu/apple-dart: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (5 preceding siblings ...)
  2025-06-12 21:11 ` [PATCH 06/11] cpufreq: apple: drop " Sven Peter
@ 2025-06-12 21:11 ` Sven Peter
  2025-06-13 16:55   ` Robin Murphy
  2025-06-27  7:00   ` Joerg Roedel
  2025-06-12 21:11 ` [PATCH 08/11] Input: apple_z2: " Sven Peter
                   ` (8 subsequent siblings)
  15 siblings, 2 replies; 28+ messages in thread
From: Sven Peter @ 2025-06-12 21:11 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

When the first driver for Apple Silicon was upstreamed we accidentally
included `default ARCH_APPLE` in its Kconfig which then spread to almost
every subsequent driver. As soon as ARCH_APPLE is set to y this will
pull in many drivers as built-ins which is not what we want.
Thus, drop `default ARCH_APPLE` from Kconfig.

Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/iommu/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 0a33d995d15dd759eb47705c00b411f1157b408a..91d0c871acc418ac5fede4f177ce3af97aef5560 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -305,7 +305,6 @@ config APPLE_DART
 	depends on !GENERIC_ATOMIC64	# for IOMMU_IO_PGTABLE_DART
 	select IOMMU_API
 	select IOMMU_IO_PGTABLE_DART
-	default ARCH_APPLE
 	help
 	  Support for Apple DART (Device Address Resolution Table) IOMMUs
 	  found in Apple ARM SoCs like the M1.

-- 
2.34.1




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

* [PATCH 08/11] Input: apple_z2: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (6 preceding siblings ...)
  2025-06-12 21:11 ` [PATCH 07/11] iommu/apple-dart: Drop " Sven Peter
@ 2025-06-12 21:11 ` Sven Peter
  2025-06-17 22:18   ` Dmitry Torokhov
  2025-06-12 21:11 ` [PATCH 09/11] dmaengine: apple-admac: " Sven Peter
                   ` (7 subsequent siblings)
  15 siblings, 1 reply; 28+ messages in thread
From: Sven Peter @ 2025-06-12 21:11 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

When the first driver for Apple Silicon was upstreamed we accidentally
included `default ARCH_APPLE` in its Kconfig which then spread to almost
every subsequent driver. As soon as ARCH_APPLE is set to y this will
pull in many drivers as built-ins which is not what we want.
Thus, drop `default ARCH_APPLE` from Kconfig.

Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/input/touchscreen/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 91a2b584dab1469a3c907c0f1accfa10c4c4a3ca..196905162945d59e775c3e0bff6540a82842229a 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -105,7 +105,6 @@ config TOUCHSCREEN_ADC
 
 config TOUCHSCREEN_APPLE_Z2
 	tristate "Apple Z2 touchscreens"
-	default ARCH_APPLE
 	depends on SPI && (ARCH_APPLE || COMPILE_TEST)
 	help
 	  Say Y here if you have an ARM Apple device with

-- 
2.34.1




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

* [PATCH 09/11] dmaengine: apple-admac: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (7 preceding siblings ...)
  2025-06-12 21:11 ` [PATCH 08/11] Input: apple_z2: " Sven Peter
@ 2025-06-12 21:11 ` Sven Peter
  2025-06-12 21:11 ` [PATCH 10/11] ASoC: apple: mca: " Sven Peter
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Sven Peter @ 2025-06-12 21:11 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

When the first driver for Apple Silicon was upstreamed we accidentally
included `default ARCH_APPLE` in its Kconfig which then spread to almost
every subsequent driver. As soon as ARCH_APPLE is set to y this will
pull in many drivers as built-ins which is not what we want.
Thus, drop `default ARCH_APPLE` from Kconfig.

Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/dma/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index db87dd2a07f7606e40dc26ea41d26fcdd1fad979..7f387157e3c57d8c1517b55d86aa6d6e660dcce5 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -89,7 +89,6 @@ config APPLE_ADMAC
 	tristate "Apple ADMAC support"
 	depends on ARCH_APPLE || COMPILE_TEST
 	select DMA_ENGINE
-	default ARCH_APPLE
 	help
 	  Enable support for Audio DMA Controller found on Apple Silicon SoCs.
 

-- 
2.34.1




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

* [PATCH 10/11] ASoC: apple: mca: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (8 preceding siblings ...)
  2025-06-12 21:11 ` [PATCH 09/11] dmaengine: apple-admac: " Sven Peter
@ 2025-06-12 21:11 ` Sven Peter
  2025-06-12 21:11 ` [PATCH 11/11] arm64: defconfig: Enable Apple Silicon drivers Sven Peter
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Sven Peter @ 2025-06-12 21:11 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

When the first driver for Apple Silicon was upstreamed we accidentally
included `default ARCH_APPLE` in its Kconfig which then spread to almost
every subsequent driver. As soon as ARCH_APPLE is set to y this will
pull in many drivers as built-ins which is not what we want.
Thus, drop `default ARCH_APPLE` from Kconfig.

Signed-off-by: Sven Peter <sven@kernel.org>
---
 sound/soc/apple/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/apple/Kconfig b/sound/soc/apple/Kconfig
index 793f7782e0d721a1778a82e3515665c3f9f14ede..e9c777cdb6e39c5446f00faea0e617e51b318000 100644
--- a/sound/soc/apple/Kconfig
+++ b/sound/soc/apple/Kconfig
@@ -2,7 +2,6 @@ config SND_SOC_APPLE_MCA
 	tristate "Apple Silicon MCA driver"
 	depends on ARCH_APPLE || COMPILE_TEST
 	select SND_DMAENGINE_PCM
-	default ARCH_APPLE
 	help
 	  This option enables an ASoC platform driver for MCA peripherals found
 	  on Apple Silicon SoCs.

-- 
2.34.1




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

* [PATCH 11/11] arm64: defconfig: Enable Apple Silicon drivers
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (9 preceding siblings ...)
  2025-06-12 21:11 ` [PATCH 10/11] ASoC: apple: mca: " Sven Peter
@ 2025-06-12 21:11 ` Sven Peter
  2025-06-13 15:44   ` Nick Chan
  2025-06-13 16:50   ` Robin Murphy
  2025-06-13  7:34 ` [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Janne Grunau
                   ` (4 subsequent siblings)
  15 siblings, 2 replies; 28+ messages in thread
From: Sven Peter @ 2025-06-12 21:11 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

Enable drivers for hardware present on Apple Silicon machines.
The power domain and interrupt driver should be built-it since these are
critical for the system to boot, the rest can be build as modules.

Previously, many of these drivers were accidentally configured as y
such that this actually decreases the size of the kernel image:

vmlinux 163628520 -> 163330632 (-297888)
Image    48388608 ->  48384512 (-  4096)

Signed-off-by: Sven Peter <sven@kernel.org>
---
 arch/arm64/configs/defconfig | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 897fc686e6a91b79770639d3eb15beb3ee48ef77..8ebebfc2fa1293bd16332858d6e6694e1a6f3088 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -97,6 +97,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
 CONFIG_CPUFREQ_DT=y
 CONFIG_ACPI_CPPC_CPUFREQ=m
 CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=m
+CONFIG_ARM_APPLE_SOC_CPUFREQ=m
 CONFIG_ARM_ARMADA_37XX_CPUFREQ=y
 CONFIG_ARM_SCPI_CPUFREQ=y
 CONFIG_ARM_IMX_CPUFREQ_DT=m
@@ -218,6 +219,7 @@ CONFIG_HOTPLUG_PCI_ACPI=y
 CONFIG_PCI_AARDVARK=y
 CONFIG_PCIE_ALTERA=y
 CONFIG_PCIE_ALTERA_MSI=y
+CONFIG_PCIE_APPLE=m
 CONFIG_PCIE_BRCMSTB=m
 CONFIG_PCI_HOST_THUNDER_PEM=y
 CONFIG_PCI_HOST_THUNDER_ECAM=y
@@ -294,6 +296,7 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_NBD=m
 CONFIG_VIRTIO_BLK=y
 CONFIG_BLK_DEV_NVME=m
+CONFIG_NVME_APPLE=m
 CONFIG_QCOM_COINCELL=m
 CONFIG_QCOM_FASTRPC=m
 CONFIG_SRAM=y
@@ -454,6 +457,7 @@ CONFIG_KEYBOARD_CROS_EC=y
 CONFIG_KEYBOARD_MTK_PMIC=m
 CONFIG_MOUSE_ELAN_I2C=m
 CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_APPLE_Z2=m
 CONFIG_TOUCHSCREEN_ATMEL_MXT=m
 CONFIG_TOUCHSCREEN_GOODIX=m
 CONFIG_TOUCHSCREEN_GOODIX_BERLIN_SPI=m
@@ -538,6 +542,7 @@ CONFIG_I2C_MT65XX=y
 CONFIG_I2C_MV64XXX=y
 CONFIG_I2C_OMAP=y
 CONFIG_I2C_OWL=y
+CONFIG_I2C_APPLE=m
 CONFIG_I2C_PXA=y
 CONFIG_I2C_QCOM_CCI=m
 CONFIG_I2C_QCOM_GENI=m
@@ -552,6 +557,7 @@ CONFIG_I2C_UNIPHIER_F=y
 CONFIG_I2C_RCAR=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SPI=y
+CONFIG_SPI_APPLE=m
 CONFIG_SPI_ARMADA_3700=y
 CONFIG_SPI_BCM2835=m
 CONFIG_SPI_BCM2835AUX=m
@@ -586,7 +592,9 @@ CONFIG_SPI_TEGRA210_QUAD=m
 CONFIG_SPI_TEGRA114=m
 CONFIG_SPI_SPIDEV=m
 CONFIG_SPMI=y
+CONFIG_SPMI_APPLE=m
 CONFIG_SPMI_MTK_PMIF=m
+CONFIG_PINCTRL_APPLE_GPIO=m
 CONFIG_PINCTRL_DA9062=m
 CONFIG_PINCTRL_MAX77620=y
 CONFIG_PINCTRL_RK805=m
@@ -757,6 +765,7 @@ CONFIG_RENESAS_RZG2LWDT=y
 CONFIG_RENESAS_RZV2HWDT=y
 CONFIG_UNIPHIER_WATCHDOG=y
 CONFIG_PM8916_WATCHDOG=m
+CONFIG_APPLE_WATCHDOG=m
 CONFIG_BCM2835_WDT=y
 CONFIG_BCM7038_WDT=m
 CONFIG_MFD_ADP5585=m
@@ -983,6 +992,7 @@ CONFIG_SND_ALOOP=m
 CONFIG_SND_HDA_TEGRA=m
 CONFIG_SND_HDA_CODEC_HDMI=m
 CONFIG_SND_SOC=y
+CONFIG_SND_SOC_APPLE_MCA=m
 CONFIG_SND_BCM2835_SOC_I2S=m
 CONFIG_SND_SOC_FSL_ASRC=m
 CONFIG_SND_SOC_FSL_MICFIL=m
@@ -1266,6 +1276,7 @@ CONFIG_RTC_DRV_XGENE=y
 CONFIG_RTC_DRV_TI_K3=m
 CONFIG_RTC_DRV_RENESAS_RTCA3=m
 CONFIG_DMADEVICES=y
+CONFIG_APPLE_ADMAC=m
 CONFIG_DMA_BCM2835=y
 CONFIG_DMA_SUN6I=m
 CONFIG_FSL_EDMA=y
@@ -1310,6 +1321,7 @@ CONFIG_CROS_EC_RPMSG=m
 CONFIG_CROS_EC_SPI=y
 CONFIG_CROS_KBD_LED_BACKLIGHT=m
 CONFIG_CROS_EC_CHARDEV=m
+CONFIG_COMMON_CLK_APPLE_NCO=m
 CONFIG_COMMON_CLK_RK808=y
 CONFIG_COMMON_CLK_SCMI=y
 CONFIG_COMMON_CLK_SCPI=y
@@ -1451,6 +1463,7 @@ CONFIG_ARM_SMMU=y
 CONFIG_ARM_SMMU_V3=y
 CONFIG_MTK_IOMMU=y
 CONFIG_QCOM_IOMMU=y
+CONFIG_APPLE_DART=m
 CONFIG_REMOTEPROC=y
 CONFIG_IMX_REMOTEPROC=y
 CONFIG_MTK_SCP=m
@@ -1470,6 +1483,9 @@ CONFIG_RPMSG_QCOM_SMD=y
 CONFIG_RPMSG_VIRTIO=y
 CONFIG_SOUNDWIRE=m
 CONFIG_SOUNDWIRE_QCOM=m
+CONFIG_APPLE_MAILBOX=m
+CONFIG_APPLE_RTKIT=m
+CONFIG_APPLE_SART=m
 CONFIG_FSL_DPAA=y
 CONFIG_FSL_MC_DPIO=y
 CONFIG_FSL_RCPM=y
@@ -1504,6 +1520,7 @@ CONFIG_ARCH_TEGRA_194_SOC=y
 CONFIG_ARCH_TEGRA_234_SOC=y
 CONFIG_TI_PRUSS=m
 CONFIG_OWL_PM_DOMAINS=y
+CONFIG_APPLE_PMGR_PWRSTATE=y
 CONFIG_RASPBERRYPI_POWER=y
 CONFIG_IMX_SCU_PD=y
 CONFIG_QCOM_CPR=y
@@ -1567,6 +1584,7 @@ CONFIG_QCOM_PDC=y
 CONFIG_QCOM_MPM=y
 CONFIG_TI_SCI_INTR_IRQCHIP=y
 CONFIG_TI_SCI_INTA_IRQCHIP=y
+CONFIG_APPLE_AIC=y
 CONFIG_RESET_GPIO=m
 CONFIG_RESET_IMX7=y
 CONFIG_RESET_QCOM_AOSS=y
@@ -1640,6 +1658,7 @@ CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU=m
 CONFIG_NVIDIA_CORESIGHT_PMU_ARCH_SYSTEM_PMU=m
 CONFIG_MESON_DDR_PMU=m
 CONFIG_NVMEM_LAYOUT_SL28_VPD=m
+CONFIG_NVMEM_APPLE_EFUSES=m
 CONFIG_NVMEM_IMX_OCOTP=y
 CONFIG_NVMEM_IMX_OCOTP_ELE=m
 CONFIG_NVMEM_IMX_OCOTP_SCU=y

-- 
2.34.1




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

* Re: [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (10 preceding siblings ...)
  2025-06-12 21:11 ` [PATCH 11/11] arm64: defconfig: Enable Apple Silicon drivers Sven Peter
@ 2025-06-13  7:34 ` Janne Grunau
  2025-06-14 11:12 ` (subset) " Mark Brown
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Janne Grunau @ 2025-06-13  7:34 UTC (permalink / raw)
  To: Sven Peter
  Cc: Alyssa Rosenzweig, Neal Gompa, Ulf Hansson, Michael Turquette,
	Stephen Boyd, Srinivas Kandagatla, Andi Shyti, Rafael J. Wysocki,
	Viresh Kumar, Joerg Roedel, Will Deacon, Robin Murphy,
	Dmitry Torokhov, Vinod Koul, Martin Povišer, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, Arnd Bergmann, asahi,
	linux-arm-kernel, linux-pm, linux-kernel, linux-clk, linux-i2c,
	iommu, linux-input, dmaengine, linux-sound

Hej,

On Thu, Jun 12, 2025 at 09:11:24PM +0000, Sven Peter wrote:
> 
> When support for Apple Silicon was originally upstreamed we somehow
> started using `default ARCH_APPLE` for most drivers. arm64 defconfig
> also contains ARCH_APPLE=y such that this will turn into `default y`
> there by default which is neither what we want nor how this is usually
> done.

It's not such an uncommon pattern. `git grep 'default ARCH_' --
'*Kconfig'` has over 250 matches (not counting ARCH_APPLE) and from a
cursory look not all CONFIG_* look essential for booting.
I agree that the drivers covered here should not be built-in by default.
An alternative would be using `default m if ARCH_APPLE` instead but that
pattern is not common in the kernel. So just moving this to defconfig is
fine by me.

> Let's fix all that by dropping the default everywhere and adding the
> drivers to defconfig as modules instead of built-ins.
> None of these patches depend on each other so we can just take them all
> independently through the respective subsystem trees.
> 
> Best,
> 
> Sven
> 
> Signed-off-by: Sven Peter <sven@kernel.org>
> ---
> Sven Peter (11):
>       pmdomain: apple: Drop default ARCH_APPLE in Kconfig
>       soc: apple: Drop default ARCH_APPLE in Kconfig
>       clk: apple-nco: Drop default ARCH_APPLE in Kconfig
>       nvmem: apple: drop default ARCH_APPLE in Kconfig
>       i2c: apple: Drop default ARCH_APPLE in Kconfig
>       cpufreq: apple: drop default ARCH_APPLE in Kconfig
>       iommu/apple-dart: Drop default ARCH_APPLE in Kconfig
>       Input: apple_z2: Drop default ARCH_APPLE in Kconfig
>       dmaengine: apple-admac: Drop default ARCH_APPLE in Kconfig
>       ASoC: apple: mca: Drop default ARCH_APPLE in Kconfig
>       arm64: defconfig: Enable Apple Silicon drivers
> 
>  arch/arm64/configs/defconfig      | 19 +++++++++++++++++++
>  drivers/clk/Kconfig               |  1 -
>  drivers/cpufreq/Kconfig.arm       |  1 -
>  drivers/dma/Kconfig               |  1 -
>  drivers/i2c/busses/Kconfig        |  1 -
>  drivers/input/touchscreen/Kconfig |  1 -
>  drivers/iommu/Kconfig             |  1 -
>  drivers/nvmem/Kconfig             |  1 -
>  drivers/pmdomain/apple/Kconfig    |  1 -
>  drivers/soc/apple/Kconfig         |  3 ---
>  sound/soc/apple/Kconfig           |  1 -
>  11 files changed, 19 insertions(+), 12 deletions(-)

whole series

Reviewed-by: Janne Grunau <j@jannau.net>


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

* Re: [PATCH 11/11] arm64: defconfig: Enable Apple Silicon drivers
  2025-06-12 21:11 ` [PATCH 11/11] arm64: defconfig: Enable Apple Silicon drivers Sven Peter
@ 2025-06-13 15:44   ` Nick Chan
  2025-06-13 16:50   ` Robin Murphy
  1 sibling, 0 replies; 28+ messages in thread
From: Nick Chan @ 2025-06-13 15:44 UTC (permalink / raw)
  To: Sven Peter, Janne Grunau, Alyssa Rosenzweig, Neal Gompa,
	Ulf Hansson, Michael Turquette, Stephen Boyd, Srinivas Kandagatla,
	Andi Shyti, Rafael J. Wysocki, Viresh Kumar, Joerg Roedel,
	Will Deacon, Robin Murphy, Dmitry Torokhov, Vinod Koul,
	Martin Povišer, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound


Sven Peter 於 2025/6/13 清晨5:11 寫道:
> Enable drivers for hardware present on Apple Silicon machines.
> The power domain and interrupt driver should be built-it since these are
> critical for the system to boot, the rest can be build as modules.
>
> Previously, many of these drivers were accidentally configured as y
> such that this actually decreases the size of the kernel image:
>
> vmlinux 163628520 -> 163330632 (-297888)
> Image    48388608 ->  48384512 (-  4096)
>
> Signed-off-by: Sven Peter <sven@kernel.org>

[...]

I think you missed these drivers (all of which should be m):

BACKLIGHT_APPLE_DWI DRM_PANEL_SUMMIT DRM_ADP NVMEM_APPLE_SPMI

Nick Chan



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

* Re: [PATCH 11/11] arm64: defconfig: Enable Apple Silicon drivers
  2025-06-12 21:11 ` [PATCH 11/11] arm64: defconfig: Enable Apple Silicon drivers Sven Peter
  2025-06-13 15:44   ` Nick Chan
@ 2025-06-13 16:50   ` Robin Murphy
  2025-06-21 16:01     ` Sven Peter
  1 sibling, 1 reply; 28+ messages in thread
From: Robin Murphy @ 2025-06-13 16:50 UTC (permalink / raw)
  To: Sven Peter, Janne Grunau, Alyssa Rosenzweig, Neal Gompa,
	Ulf Hansson, Michael Turquette, Stephen Boyd, Srinivas Kandagatla,
	Andi Shyti, Rafael J. Wysocki, Viresh Kumar, Joerg Roedel,
	Will Deacon, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound

On 2025-06-12 10:11 pm, Sven Peter wrote:
> Enable drivers for hardware present on Apple Silicon machines.
> The power domain and interrupt driver should be built-it since these are
> critical for the system to boot, the rest can be build as modules.

Nit: I'd be tempted to put this patch first, just in case anyone 
bisecting with "make defconfig" in their process lands in the middle and 
suddenly loses some drivers (although arguably them going from "=y" to 
"=m" could still be a surprise, but at least a bit less so).

[...]
> @@ -1504,6 +1520,7 @@ CONFIG_ARCH_TEGRA_194_SOC=y
>   CONFIG_ARCH_TEGRA_234_SOC=y
>   CONFIG_TI_PRUSS=m
>   CONFIG_OWL_PM_DOMAINS=y
> +CONFIG_APPLE_PMGR_PWRSTATE=y

If this is critical for any Apple platform to work then it would 
probably make sense to explicitly select it from ARCH_APPLE, as is done 
for APPLE_AIC...

>   CONFIG_RASPBERRYPI_POWER=y
>   CONFIG_IMX_SCU_PD=y
>   CONFIG_QCOM_CPR=y
> @@ -1567,6 +1584,7 @@ CONFIG_QCOM_PDC=y
>   CONFIG_QCOM_MPM=y
>   CONFIG_TI_SCI_INTR_IRQCHIP=y
>   CONFIG_TI_SCI_INTA_IRQCHIP=y
> +CONFIG_APPLE_AIC=y

...which I think means this would already be redundant.

Thanks,
Robin.

>   CONFIG_RESET_GPIO=m
>   CONFIG_RESET_IMX7=y
>   CONFIG_RESET_QCOM_AOSS=y
> @@ -1640,6 +1658,7 @@ CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU=m
>   CONFIG_NVIDIA_CORESIGHT_PMU_ARCH_SYSTEM_PMU=m
>   CONFIG_MESON_DDR_PMU=m
>   CONFIG_NVMEM_LAYOUT_SL28_VPD=m
> +CONFIG_NVMEM_APPLE_EFUSES=m
>   CONFIG_NVMEM_IMX_OCOTP=y
>   CONFIG_NVMEM_IMX_OCOTP_ELE=m
>   CONFIG_NVMEM_IMX_OCOTP_SCU=y
> 



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

* Re: [PATCH 07/11] iommu/apple-dart: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 ` [PATCH 07/11] iommu/apple-dart: Drop " Sven Peter
@ 2025-06-13 16:55   ` Robin Murphy
  2025-06-27  7:00   ` Joerg Roedel
  1 sibling, 0 replies; 28+ messages in thread
From: Robin Murphy @ 2025-06-13 16:55 UTC (permalink / raw)
  To: Sven Peter, Janne Grunau, Alyssa Rosenzweig, Neal Gompa,
	Ulf Hansson, Michael Turquette, Stephen Boyd, Srinivas Kandagatla,
	Andi Shyti, Rafael J. Wysocki, Viresh Kumar, Joerg Roedel,
	Will Deacon, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound

On 2025-06-12 10:11 pm, Sven Peter wrote:
> When the first driver for Apple Silicon was upstreamed we accidentally
> included `default ARCH_APPLE` in its Kconfig which then spread to almost
> every subsequent driver. As soon as ARCH_APPLE is set to y this will
> pull in many drivers as built-ins which is not what we want.
> Thus, drop `default ARCH_APPLE` from Kconfig.

Acked-by: Robin Murphy <robin.murphy@arm.com>

> Signed-off-by: Sven Peter <sven@kernel.org>
> ---
>   drivers/iommu/Kconfig | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index 0a33d995d15dd759eb47705c00b411f1157b408a..91d0c871acc418ac5fede4f177ce3af97aef5560 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -305,7 +305,6 @@ config APPLE_DART
>   	depends on !GENERIC_ATOMIC64	# for IOMMU_IO_PGTABLE_DART
>   	select IOMMU_API
>   	select IOMMU_IO_PGTABLE_DART
> -	default ARCH_APPLE
>   	help
>   	  Support for Apple DART (Device Address Resolution Table) IOMMUs
>   	  found in Apple ARM SoCs like the M1.
> 



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

* Re: (subset) [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (11 preceding siblings ...)
  2025-06-13  7:34 ` [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Janne Grunau
@ 2025-06-14 11:12 ` Mark Brown
  2025-06-17 17:29 ` Vinod Koul
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: Mark Brown @ 2025-06-14 11:12 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Arnd Bergmann,
	Sven Peter
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound

On Thu, 12 Jun 2025 21:11:24 +0000, Sven Peter wrote:
> When support for Apple Silicon was originally upstreamed we somehow
> started using `default ARCH_APPLE` for most drivers. arm64 defconfig
> also contains ARCH_APPLE=y such that this will turn into `default y`
> there by default which is neither what we want nor how this is usually
> done.
> Let's fix all that by dropping the default everywhere and adding the
> drivers to defconfig as modules instead of built-ins.
> None of these patches depend on each other so we can just take them all
> independently through the respective subsystem trees.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[10/11] ASoC: apple: mca: Drop default ARCH_APPLE in Kconfig
        commit: f59427932885f9b47b22b532b079478905b9ad08

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark



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

* Re: (subset) [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (12 preceding siblings ...)
  2025-06-14 11:12 ` (subset) " Mark Brown
@ 2025-06-17 17:29 ` Vinod Koul
  2025-06-22  9:13 ` Sven Peter
  2025-06-27 10:49 ` Srinivas Kandagatla
  15 siblings, 0 replies; 28+ messages in thread
From: Vinod Koul @ 2025-06-17 17:29 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Martin Povišer, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, Arnd Bergmann,
	Sven Peter
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound


On Thu, 12 Jun 2025 21:11:24 +0000, Sven Peter wrote:
> When support for Apple Silicon was originally upstreamed we somehow
> started using `default ARCH_APPLE` for most drivers. arm64 defconfig
> also contains ARCH_APPLE=y such that this will turn into `default y`
> there by default which is neither what we want nor how this is usually
> done.
> Let's fix all that by dropping the default everywhere and adding the
> drivers to defconfig as modules instead of built-ins.
> None of these patches depend on each other so we can just take them all
> independently through the respective subsystem trees.
> 
> [...]

Applied, thanks!

[09/11] dmaengine: apple-admac: Drop default ARCH_APPLE in Kconfig
        commit: de266931dd996fc2cb8ee8b5d12e39ea463e3f36

Best regards,
-- 
~Vinod




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

* Re: [PATCH 08/11] Input: apple_z2: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 ` [PATCH 08/11] Input: apple_z2: " Sven Peter
@ 2025-06-17 22:18   ` Dmitry Torokhov
  0 siblings, 0 replies; 28+ messages in thread
From: Dmitry Torokhov @ 2025-06-17 22:18 UTC (permalink / raw)
  To: Sven Peter
  Cc: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Vinod Koul, Martin Povišer, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, Arnd Bergmann, asahi,
	linux-arm-kernel, linux-pm, linux-kernel, linux-clk, linux-i2c,
	iommu, linux-input, dmaengine, linux-sound

On Thu, Jun 12, 2025 at 09:11:32PM +0000, Sven Peter wrote:
> When the first driver for Apple Silicon was upstreamed we accidentally
> included `default ARCH_APPLE` in its Kconfig which then spread to almost
> every subsequent driver. As soon as ARCH_APPLE is set to y this will
> pull in many drivers as built-ins which is not what we want.
> Thus, drop `default ARCH_APPLE` from Kconfig.
> 
> Signed-off-by: Sven Peter <sven@kernel.org>

Applied, thank you.

-- 
Dmitry


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

* Re: [PATCH 01/11] pmdomain: apple: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 ` [PATCH 01/11] pmdomain: apple: Drop default ARCH_APPLE in Kconfig Sven Peter
@ 2025-06-18 12:56   ` Ulf Hansson
  0 siblings, 0 replies; 28+ messages in thread
From: Ulf Hansson @ 2025-06-18 12:56 UTC (permalink / raw)
  To: Sven Peter
  Cc: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Michael Turquette,
	Stephen Boyd, Srinivas Kandagatla, Andi Shyti, Rafael J. Wysocki,
	Viresh Kumar, Joerg Roedel, Will Deacon, Robin Murphy,
	Dmitry Torokhov, Vinod Koul, Martin Povišer, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, Arnd Bergmann, asahi,
	linux-arm-kernel, linux-pm, linux-kernel, linux-clk, linux-i2c,
	iommu, linux-input, dmaengine, linux-sound

On Thu, 12 Jun 2025 at 23:12, Sven Peter <sven@kernel.org> wrote:
>
> When the first driver for Apple Silicon was upstreamed we accidentally
> included `default ARCH_APPLE` in its Kconfig which then spread to almost
> every subsequent driver. As soon as ARCH_APPLE is set to y this will
> pull in many drivers as built-ins which is not what we want.
> Thus, drop `default ARCH_APPLE` from Kconfig.
>
> Signed-off-by: Sven Peter <sven@kernel.org>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/pmdomain/apple/Kconfig | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pmdomain/apple/Kconfig b/drivers/pmdomain/apple/Kconfig
> index 12237cbcfaa983083367bad70b1b54ded9ac9824..a8973f8057fba74cd3e8c7d15cd2972081c6697d 100644
> --- a/drivers/pmdomain/apple/Kconfig
> +++ b/drivers/pmdomain/apple/Kconfig
> @@ -9,7 +9,6 @@ config APPLE_PMGR_PWRSTATE
>         select MFD_SYSCON
>         select PM_GENERIC_DOMAINS
>         select RESET_CONTROLLER
> -       default ARCH_APPLE
>         help
>           The PMGR block in Apple SoCs provides high-level power state
>           controls for SoC devices. This driver manages them through the
>
> --
> 2.34.1
>
>


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

* Re: [PATCH 06/11] cpufreq: apple: drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 ` [PATCH 06/11] cpufreq: apple: drop " Sven Peter
@ 2025-06-19  5:35   ` Viresh Kumar
  0 siblings, 0 replies; 28+ messages in thread
From: Viresh Kumar @ 2025-06-19  5:35 UTC (permalink / raw)
  To: Sven Peter
  Cc: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Joerg Roedel, Will Deacon, Robin Murphy,
	Dmitry Torokhov, Vinod Koul, Martin Povišer, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, Arnd Bergmann, asahi,
	linux-arm-kernel, linux-pm, linux-kernel, linux-clk, linux-i2c,
	iommu, linux-input, dmaengine, linux-sound

On 12-06-25, 21:11, Sven Peter wrote:
> When the first driver for Apple Silicon was upstreamed we accidentally
> included `default ARCH_APPLE` in its Kconfig which then spread to almost
> every subsequent driver. As soon as ARCH_APPLE is set to y this will
> pull in many drivers as built-ins which is not what we want.
> Thus, drop `default ARCH_APPLE` from Kconfig.
> 
> Signed-off-by: Sven Peter <sven@kernel.org>
> ---
>  drivers/cpufreq/Kconfig.arm | 1 -
>  1 file changed, 1 deletion(-)

Applied. Thanks.

-- 
viresh


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

* Re: [PATCH 03/11] clk: apple-nco: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 ` [PATCH 03/11] clk: apple-nco: " Sven Peter
@ 2025-06-19 19:51   ` Stephen Boyd
  0 siblings, 0 replies; 28+ messages in thread
From: Stephen Boyd @ 2025-06-19 19:51 UTC (permalink / raw)
  To: Alyssa Rosenzweig, Andi Shyti, Arnd Bergmann, Dmitry Torokhov,
	Janne Grunau, Jaroslav Kysela, Joerg Roedel, Liam Girdwood,
	Mark Brown, Martin Povišer, Michael Turquette, Neal Gompa,
	Rafael J. Wysocki, Robin Murphy, Srinivas Kandagatla, Sven Peter,
	Takashi Iwai, Ulf Hansson, Vinod Koul, Viresh Kumar, Will Deacon
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound, Sven Peter

Quoting Sven Peter (2025-06-12 14:11:27)
> When the first driver for Apple Silicon was upstreamed we accidentally
> included `default ARCH_APPLE` in its Kconfig which then spread to almost
> every subsequent driver. As soon as ARCH_APPLE is set to y this will
> pull in many drivers as built-ins which is not what we want.
> Thus, drop `default ARCH_APPLE` from Kconfig.
> 
> Signed-off-by: Sven Peter <sven@kernel.org>
> ---

Applied to clk-next


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

* Re: [PATCH 11/11] arm64: defconfig: Enable Apple Silicon drivers
  2025-06-13 16:50   ` Robin Murphy
@ 2025-06-21 16:01     ` Sven Peter
  2025-06-23 11:33       ` Robin Murphy
  0 siblings, 1 reply; 28+ messages in thread
From: Sven Peter @ 2025-06-21 16:01 UTC (permalink / raw)
  To: Robin Murphy
  Cc: asahi, Stephen Boyd, Alyssa Rosenzweig, Janne Grunau,
	linux-arm-kernel, linux-pm, Srinivas Kandagatla, linux-kernel,
	Viresh Kumar, Neal Gompa, linux-clk, Arnd Bergmann, linux-i2c,
	Takashi Iwai, Liam Girdwood, Martin Povišer, Joerg Roedel,
	Rafael J. Wysocki, Jaroslav Kysela, Mark Brown, iommu,
	linux-input, dmaengine, linux-sound, Vinod Koul, Dmitry Torokhov,
	Ulf Hansson, Michael Turquette, Andi Shyti, Will Deacon

On 13.06.25 18:50, Robin Murphy wrote:
> On 2025-06-12 10:11 pm, Sven Peter wrote:
>> Enable drivers for hardware present on Apple Silicon machines.
>> The power domain and interrupt driver should be built-it since these are
>> critical for the system to boot, the rest can be build as modules.
> 
> Nit: I'd be tempted to put this patch first, just in case anyone 
> bisecting with "make defconfig" in their process lands in the middle and 
> suddenly loses some drivers (although arguably them going from "=y" to 
> "=m" could still be a surprise, but at least a bit less so).

Ah, that's a good point that I hadn't even thought about.
Now that most of these have already been merged into different trees 
that ship has sailed though.

> 
> [...]
>> @@ -1504,6 +1520,7 @@ CONFIG_ARCH_TEGRA_194_SOC=y
>>   CONFIG_ARCH_TEGRA_234_SOC=y
>>   CONFIG_TI_PRUSS=m
>>   CONFIG_OWL_PM_DOMAINS=y
>> +CONFIG_APPLE_PMGR_PWRSTATE=y
> 
> If this is critical for any Apple platform to work then it would 
> probably make sense to explicitly select it from ARCH_APPLE, as is done 
> for APPLE_AIC...


Documentation/kbuild/kconfig-language.rst:

   select should be used with care. select will force a symbol to a value
   without visiting the dependencies. By abusing select you are able to
   select a symbol FOO even if FOO depends on BAR that is not set. In
   general use select only for non-visible symbols (no prompts anywhere)
   and for symbols with no dependencies. That will limit the usefulness
   but on the other hand avoid the illegal configurations all over.


That's probably fine for APPLE_AIC which only depends on ARM64 (and 
ARCH_APPLE) which is guaranteed to be set when ARCH_APPLE is set anyway.
APPLE_PMGR_PWRSTATE also has an additional dependency on PM so it should 
probably remain in defconfig and not use select.


>>   CONFIG_RASPBERRYPI_POWER=y
>>   CONFIG_IMX_SCU_PD=y
>>   CONFIG_QCOM_CPR=y
>> @@ -1567,6 +1584,7 @@ CONFIG_QCOM_PDC=y
>>   CONFIG_QCOM_MPM=y
>>   CONFIG_TI_SCI_INTR_IRQCHIP=y
>>   CONFIG_TI_SCI_INTA_IRQCHIP=y
>> +CONFIG_APPLE_AIC=y
> 
> ...which I think means this would already be redundant.

Yup, this can be dropped.


Thanks,

Sven



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

* Re: (subset) [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (13 preceding siblings ...)
  2025-06-17 17:29 ` Vinod Koul
@ 2025-06-22  9:13 ` Sven Peter
  2025-06-27 10:49 ` Srinivas Kandagatla
  15 siblings, 0 replies; 28+ messages in thread
From: Sven Peter @ 2025-06-22  9:13 UTC (permalink / raw)
  To: Sven Peter
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound,
	Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann

On Thu, 12 Jun 2025 21:11:24 +0000, Sven Peter wrote:
> When support for Apple Silicon was originally upstreamed we somehow
> started using `default ARCH_APPLE` for most drivers. arm64 defconfig
> also contains ARCH_APPLE=y such that this will turn into `default y`
> there by default which is neither what we want nor how this is usually
> done.
> Let's fix all that by dropping the default everywhere and adding the
> drivers to defconfig as modules instead of built-ins.
> None of these patches depend on each other so we can just take them all
> independently through the respective subsystem trees.
> 
> [...]

Applied to git@github.com:AsahiLinux/linux.git (asahi-soc/drivers-6.17), thanks!

[02/11] soc: apple: Drop default ARCH_APPLE in Kconfig
        https://github.com/AsahiLinux/linux/commit/65293c3276de

Best regards,
-- 
Sven Peter <sven@kernel.org>



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

* Re: [PATCH 11/11] arm64: defconfig: Enable Apple Silicon drivers
  2025-06-21 16:01     ` Sven Peter
@ 2025-06-23 11:33       ` Robin Murphy
  0 siblings, 0 replies; 28+ messages in thread
From: Robin Murphy @ 2025-06-23 11:33 UTC (permalink / raw)
  To: Sven Peter
  Cc: asahi, Stephen Boyd, Alyssa Rosenzweig, Janne Grunau,
	linux-arm-kernel, linux-pm, Srinivas Kandagatla, linux-kernel,
	Viresh Kumar, Neal Gompa, linux-clk, Arnd Bergmann, linux-i2c,
	Takashi Iwai, Liam Girdwood, Martin Povišer, Joerg Roedel,
	Rafael J. Wysocki, Jaroslav Kysela, Mark Brown, iommu,
	linux-input, dmaengine, linux-sound, Vinod Koul, Dmitry Torokhov,
	Ulf Hansson, Michael Turquette, Andi Shyti, Will Deacon

On 2025-06-21 5:01 pm, Sven Peter wrote:
> On 13.06.25 18:50, Robin Murphy wrote:
>> On 2025-06-12 10:11 pm, Sven Peter wrote:
>>> Enable drivers for hardware present on Apple Silicon machines.
>>> The power domain and interrupt driver should be built-it since these are
>>> critical for the system to boot, the rest can be build as modules.
>>
>> Nit: I'd be tempted to put this patch first, just in case anyone 
>> bisecting with "make defconfig" in their process lands in the middle 
>> and suddenly loses some drivers (although arguably them going from 
>> "=y" to "=m" could still be a surprise, but at least a bit less so).
> 
> Ah, that's a good point that I hadn't even thought about.
> Now that most of these have already been merged into different trees 
> that ship has sailed though.

Yeah, like I say it's only minor and rather contrived anyway. Not a big 
worry.

>> [...]
>>> @@ -1504,6 +1520,7 @@ CONFIG_ARCH_TEGRA_194_SOC=y
>>>   CONFIG_ARCH_TEGRA_234_SOC=y
>>>   CONFIG_TI_PRUSS=m
>>>   CONFIG_OWL_PM_DOMAINS=y
>>> +CONFIG_APPLE_PMGR_PWRSTATE=y
>>
>> If this is critical for any Apple platform to work then it would 
>> probably make sense to explicitly select it from ARCH_APPLE, as is 
>> done for APPLE_AIC...
> 
> 
> Documentation/kbuild/kconfig-language.rst:
> 
>    select should be used with care. select will force a symbol to a value
>    without visiting the dependencies. By abusing select you are able to
>    select a symbol FOO even if FOO depends on BAR that is not set. In
>    general use select only for non-visible symbols (no prompts anywhere)
>    and for symbols with no dependencies. That will limit the usefulness
>    but on the other hand avoid the illegal configurations all over.
> 
> 
> That's probably fine for APPLE_AIC which only depends on ARM64 (and 
> ARCH_APPLE) which is guaranteed to be set when ARCH_APPLE is set anyway.
> APPLE_PMGR_PWRSTATE also has an additional dependency on PM so it should 
> probably remain in defconfig and not use select.

Sorry if the implication wasn't clear, but I did mean "select it" in the 
sense of "select it and all of its necessary dependencies in a manner 
that works correctly". The same argument applies all the way down - if a 
!PM config will not be able to boot on ARCH_APPLE platforms due to 
forcibly deselecting APPLE_PMGR_PWRSTATE, then there is little point in 
permitting that combination. Which of course the user would already have 
to disable at least ARCH_MXC, ARCH_ROCKCHIP, ARCH_TEGRA and 
ARCH_VEXPRESS to achieve in the first place ;)

Thanks,
Robin.


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

* Re: [PATCH 07/11] iommu/apple-dart: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 ` [PATCH 07/11] iommu/apple-dart: Drop " Sven Peter
  2025-06-13 16:55   ` Robin Murphy
@ 2025-06-27  7:00   ` Joerg Roedel
  1 sibling, 0 replies; 28+ messages in thread
From: Joerg Roedel @ 2025-06-27  7:00 UTC (permalink / raw)
  To: Sven Peter
  Cc: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Will Deacon, Robin Murphy,
	Dmitry Torokhov, Vinod Koul, Martin Povišer, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, Arnd Bergmann, asahi,
	linux-arm-kernel, linux-pm, linux-kernel, linux-clk, linux-i2c,
	iommu, linux-input, dmaengine, linux-sound

On Thu, Jun 12, 2025 at 09:11:31PM +0000, Sven Peter wrote:
>  drivers/iommu/Kconfig | 1 -
>  1 file changed, 1 deletion(-)

Applied, thanks Sven.


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

* Re: (subset) [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead
  2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
                   ` (14 preceding siblings ...)
  2025-06-22  9:13 ` Sven Peter
@ 2025-06-27 10:49 ` Srinivas Kandagatla
  15 siblings, 0 replies; 28+ messages in thread
From: Srinivas Kandagatla @ 2025-06-27 10:49 UTC (permalink / raw)
  To: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Andi Shyti, Rafael J. Wysocki,
	Viresh Kumar, Joerg Roedel, Will Deacon, Robin Murphy,
	Dmitry Torokhov, Vinod Koul, Martin Povišer, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, Arnd Bergmann,
	Sven Peter
  Cc: asahi, linux-arm-kernel, linux-pm, linux-kernel, linux-clk,
	linux-i2c, iommu, linux-input, dmaengine, linux-sound


On Thu, 12 Jun 2025 21:11:24 +0000, Sven Peter wrote:
> When support for Apple Silicon was originally upstreamed we somehow
> started using `default ARCH_APPLE` for most drivers. arm64 defconfig
> also contains ARCH_APPLE=y such that this will turn into `default y`
> there by default which is neither what we want nor how this is usually
> done.
> Let's fix all that by dropping the default everywhere and adding the
> drivers to defconfig as modules instead of built-ins.
> None of these patches depend on each other so we can just take them all
> independently through the respective subsystem trees.
> 
> [...]

Applied, thanks!

[04/11] nvmem: apple: drop default ARCH_APPLE in Kconfig
        commit: e426953c193a2b51c8adcd3922fb8eef15790219

Best regards,
-- 
Srinivas Kandagatla <srini@kernel.org>



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

* Re: [PATCH 05/11] i2c: apple: Drop default ARCH_APPLE in Kconfig
  2025-06-12 21:11 ` [PATCH 05/11] i2c: apple: Drop " Sven Peter
@ 2025-08-03 20:40   ` Wolfram Sang
  0 siblings, 0 replies; 28+ messages in thread
From: Wolfram Sang @ 2025-08-03 20:40 UTC (permalink / raw)
  To: Sven Peter
  Cc: Janne Grunau, Alyssa Rosenzweig, Neal Gompa, Ulf Hansson,
	Michael Turquette, Stephen Boyd, Srinivas Kandagatla, Andi Shyti,
	Rafael J. Wysocki, Viresh Kumar, Joerg Roedel, Will Deacon,
	Robin Murphy, Dmitry Torokhov, Vinod Koul, Martin Povišer,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnd Bergmann, asahi, linux-arm-kernel, linux-pm, linux-kernel,
	linux-clk, linux-i2c, iommu, linux-input, dmaengine, linux-sound

On Thu, Jun 12, 2025 at 09:11:29PM +0000, Sven Peter wrote:
> When the first driver for Apple Silicon was upstreamed we accidentally
> included `default ARCH_APPLE` in its Kconfig which then spread to almost
> every subsequent driver. As soon as ARCH_APPLE is set to y this will
> pull in many drivers as built-ins which is not what we want.
> Thus, drop `default ARCH_APPLE` from Kconfig.
> 
> Signed-off-by: Sven Peter <sven@kernel.org>

Applied to for-next (for 6.17 mergewindow), thanks!



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

end of thread, other threads:[~2025-08-03 20:42 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-12 21:11 [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Sven Peter
2025-06-12 21:11 ` [PATCH 01/11] pmdomain: apple: Drop default ARCH_APPLE in Kconfig Sven Peter
2025-06-18 12:56   ` Ulf Hansson
2025-06-12 21:11 ` [PATCH 02/11] soc: " Sven Peter
2025-06-12 21:11 ` [PATCH 03/11] clk: apple-nco: " Sven Peter
2025-06-19 19:51   ` Stephen Boyd
2025-06-12 21:11 ` [PATCH 04/11] nvmem: apple: drop " Sven Peter
2025-06-12 21:11 ` [PATCH 05/11] i2c: apple: Drop " Sven Peter
2025-08-03 20:40   ` Wolfram Sang
2025-06-12 21:11 ` [PATCH 06/11] cpufreq: apple: drop " Sven Peter
2025-06-19  5:35   ` Viresh Kumar
2025-06-12 21:11 ` [PATCH 07/11] iommu/apple-dart: Drop " Sven Peter
2025-06-13 16:55   ` Robin Murphy
2025-06-27  7:00   ` Joerg Roedel
2025-06-12 21:11 ` [PATCH 08/11] Input: apple_z2: " Sven Peter
2025-06-17 22:18   ` Dmitry Torokhov
2025-06-12 21:11 ` [PATCH 09/11] dmaengine: apple-admac: " Sven Peter
2025-06-12 21:11 ` [PATCH 10/11] ASoC: apple: mca: " Sven Peter
2025-06-12 21:11 ` [PATCH 11/11] arm64: defconfig: Enable Apple Silicon drivers Sven Peter
2025-06-13 15:44   ` Nick Chan
2025-06-13 16:50   ` Robin Murphy
2025-06-21 16:01     ` Sven Peter
2025-06-23 11:33       ` Robin Murphy
2025-06-13  7:34 ` [PATCH 00/11] Drop default ARCH_APPLE from Kconfig and use defconfig instead Janne Grunau
2025-06-14 11:12 ` (subset) " Mark Brown
2025-06-17 17:29 ` Vinod Koul
2025-06-22  9:13 ` Sven Peter
2025-06-27 10:49 ` Srinivas Kandagatla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).