Skip to contentSkip to conversation

drivers: acpi: add opt-out of Apple-specific property parsing

PATCH In review Enrico Weigelt, metux IT consult 3 participants 3 messages Dec 3, 2020 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: acpi: add opt-out of Apple-specific property parsing

Most x86 machines aren't Apple machines, especially VMs. Therefore allow opt-out, making the kernel a few KBs smaller, eg. for embedded or high-density VMs.

---
 drivers/acpi/Kconfig    | 9 +++++++++
 drivers/acpi/Makefile   | 2 +-
 drivers/acpi/internal.h | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)
drivers/acpi/Kconfig +9 -0
index edf1558c1105..cc47de4f2b18 100644
@@ -79,6 +79,15 @@ config ACPI_DEBUGGER_USER
 
 endif
 
+config ACPI_APPLE
+	bool "Apple ACPI properties support"
+	default y if X86
+	help
+	  Extraction of Apple-specific ACPI properties.
+
+	  Say N if you're sure the kernel won't be used on an Apple machine
+	  and wanna save a few kb of memory. (embedded or high-density VMs)
+
 config ACPI_SPCR_TABLE
 	bool "ACPI Serial Port Console Redirection Support"
 	default y if X86
drivers/acpi/Makefile +1 -1
index 44e412506317..ed1f4405c90a 100644
@@ -52,7 +52,7 @@ acpi-y				+= evged.o
 acpi-y				+= sysfs.o
 acpi-y				+= property.o
 acpi-$(CONFIG_X86)		+= acpi_cmos_rtc.o
-acpi-$(CONFIG_X86)		+= x86/apple.o
+acpi-$(CONFIG_ACPI_APPLE)	+= x86/apple.o
 acpi-$(CONFIG_X86)		+= x86/utils.o
 acpi-$(CONFIG_DEBUG_FS)		+= debugfs.o
 acpi-y				+= acpi_lpat.o
drivers/acpi/internal.h +1 -1
index e3638bafb941..fa1b6ef7829a 100644
@@ -239,7 +239,7 @@ static inline void suspend_nvs_restore(void) {}
 void acpi_init_properties(struct acpi_device *adev);
 void acpi_free_properties(struct acpi_device *adev);
 
-#ifdef CONFIG_X86
+#ifdef CONFIG_ACPI_APPLE
 void acpi_extract_apple_properties(struct acpi_device *adev);
 #else
 static inline void acpi_extract_apple_properties(struct acpi_device *adev) {}
Signature · 1 line
2.11.0
#1 lore raw
Quoted 17 lines · metux IT consult

Most x86 machines aren't Apple machines, especially VMs. Therefore allow opt-out, making the kernel a few KBs smaller, eg. for embedded or high-density VMs.

---
 drivers/acpi/Kconfig    | 9 +++++++++
 drivers/acpi/Makefile   | 2 +-
 drivers/acpi/internal.h | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)
drivers/acpi/Kconfig +0 -0
index edf1558c1105..cc47de4f2b18 100644
@@ -79,6 +79,15 @@ config ACPI_DEBUGGER_USER
 

drivers/acpi/Kconfig config ACPI_DEBUGGER_USER · line 89

Quoted 10 lines
drivers/acpi/Kconfig +8 -0
 endif
 
+config ACPI_APPLE
+	bool "Apple ACPI properties support"
+	default y if X86
+	help
+	  Extraction of Apple-specific ACPI properties.
+
+	  Say N if you're sure the kernel won't be used on an Apple machine
+	  and wanna save a few kb of memory. (embedded or high-density VMs)

want to

As I have said before, don't use "kb". It means kilobits. We don't normally measure memory in kilobits.

Did you read all of my previous email?

Quoted 4 lines
drivers/acpi/Kconfig +1 -0
+
 config ACPI_SPCR_TABLE
 	bool "ACPI Serial Port Console Redirection Support"
 	default y if X86
Signature · 1 line
~Randy
#2 lore raw
In reply to Enrico Weigelt, metux IT consult
Quoted 18 lines · metux IT consult

Most x86 machines aren't Apple machines, especially VMs. Therefore allow opt-out, making the kernel a few KBs smaller, eg. for embedded or high-density VMs.

---
 drivers/acpi/Kconfig    | 9 +++++++++
 drivers/acpi/Makefile   | 2 +-
 drivers/acpi/internal.h | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)
drivers/acpi/Kconfig +0 -0
index edf1558c1105..cc47de4f2b18 100644
@@ -79,6 +79,15 @@ config ACPI_DEBUGGER_USER
 

drivers/acpi/Kconfig config ACPI_DEBUGGER_USER · line 89

Quoted 10 lines
drivers/acpi/Kconfig +8 -0
 endif
 
+config ACPI_APPLE
+       bool "Apple ACPI properties support"
+       default y if X86
+       help
+         Extraction of Apple-specific ACPI properties.
+
+         Say N if you're sure the kernel won't be used on an Apple machine
+         and wanna save a few kb of memory. (embedded or high-density VMs)

Do you mean bits of bytes here?

If the latter, please spell this as KB.

Thanks!