linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drivers: acpi: add opt-out of apple-specific property parsing
@ 2020-12-02 12:21 Enrico Weigelt, metux IT consult
  2020-12-02 17:51 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2020-12-02 12:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-acpi

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.

v2: fixed spelling

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/acpi/Kconfig    | 9 +++++++++
 drivers/acpi/Makefile   | 2 +-
 drivers/acpi/internal.h | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index edf1558c1105..fc37a9a5c2a8 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -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
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 44e412506317..ed1f4405c90a 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -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
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
index e3638bafb941..fa1b6ef7829a 100644
--- a/drivers/acpi/internal.h
+++ b/drivers/acpi/internal.h
@@ -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) {}
-- 
2.11.0


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

* Re: [PATCH v2] drivers: acpi: add opt-out of apple-specific property parsing
  2020-12-02 12:21 [PATCH v2] drivers: acpi: add opt-out of apple-specific property parsing Enrico Weigelt, metux IT consult
@ 2020-12-02 17:51 ` Randy Dunlap
  2020-12-03 17:46   ` Enrico Weigelt, metux IT consult
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2020-12-02 17:51 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult, linux-kernel; +Cc: linux-acpi

Hi--

On 12/2/20 4:21 AM, Enrico Weigelt, metux IT consult wrote:
> 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.
> 
> v2: fixed spelling
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  drivers/acpi/Kconfig    | 9 +++++++++
>  drivers/acpi/Makefile   | 2 +-
>  drivers/acpi/internal.h | 2 +-
>  3 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> index edf1558c1105..fc37a9a5c2a8 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -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.

	                Apple-specific

> +
> +	  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

and kb == kilobits. Is that what you mean here?

> +
>  config ACPI_SPCR_TABLE
>  	bool "ACPI Serial Port Console Redirection Support"
>  	default y if X86

-- 
~Randy


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

* Re: [PATCH v2] drivers: acpi: add opt-out of apple-specific property parsing
  2020-12-02 17:51 ` Randy Dunlap
@ 2020-12-03 17:46   ` Enrico Weigelt, metux IT consult
  0 siblings, 0 replies; 3+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2020-12-03 17:46 UTC (permalink / raw)
  To: Randy Dunlap, Enrico Weigelt, metux IT consult, linux-kernel; +Cc: linux-acpi

On 02.12.20 18:51, Randy Dunlap wrote:

Hi,

>> +config ACPI_APPLE
>> +	bool "Apple ACPI properties support"
>> +	default y if X86
>> +	help
>> +	  Extraction of apple specific ACPI properties.>
> 	                Apple-specific

ok, thanks.

>> +
>> +	  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
> 
> and kb == kilobits. Is that what you mean here?

around 6.6kb stripped, 74kb unstripped.

--mtx

-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

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

end of thread, other threads:[~2020-12-03 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 12:21 [PATCH v2] drivers: acpi: add opt-out of apple-specific property parsing Enrico Weigelt, metux IT consult
2020-12-02 17:51 ` Randy Dunlap
2020-12-03 17:46   ` Enrico Weigelt, metux IT consult

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).