Skip to contentSkip to conversation

don't select EFI from certain special ACPI drivers

PATCH In review Jan Beulich 4 participants 8 messages Dec 16, 2013 – Dec 19, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 don't select EFI from certain special ACPI drivers

Commit 7ea6c6c1 ("Move cper.c from drivers/acpi/apei to drivers/firmware/efi") results in CONFIG_EFI being enabled even when the user doesn't want this. Since ACPI APEI used to build fine without UEFI (and as far as I know also has no functional depency on it), at least in that case using a reverse dependency is wrong (and a straight one isn't needed).

Whether the same is true for ACPI_EXTLOG I don't know - if there is a functional dependency, it should depend on EFI rather than selecting it. It certainly has (currently) no build dependency.

Adjust Kconfig and build logic so that the bad dependency gets avoided.

Cc Matt Fleming <[email protected]>
Cc Ingo Molnar <[email protected]>
---
 drivers/acpi/Kconfig          |    1 -
 drivers/acpi/apei/Kconfig     |    1 -
 drivers/firmware/Makefile     |    1 +
 drivers/firmware/efi/Kconfig  |    6 +++---
 drivers/firmware/efi/Makefile |    2 +-
 5 files changed, 5 insertions(+), 6 deletions(-)
drivers/acpi/Kconfig +0 -1
@@ -348,7 +348,6 @@ source "drivers/acpi/apei/Kconfig"
 config ACPI_EXTLOG
 	tristate "Extended Error Log support"
 	depends on X86_MCE && X86_LOCAL_APIC
-	select EFI
 	select UEFI_CPER
 	default n
 	help
drivers/acpi/apei/Kconfig +0 -1
@@ -2,7 +2,6 @@ config ACPI_APEI
 	bool "ACPI Platform Error Interface (APEI)"
 	select MISC_FILESYSTEMS
 	select PSTORE
-	select EFI
 	select UEFI_CPER
 	depends on X86
 	help
drivers/firmware/Makefile +1 -0
@@ -14,3 +14,4 @@ obj-$(CONFIG_FIRMWARE_MEMMAP)	+= memmap.
 
 obj-$(CONFIG_GOOGLE_FIRMWARE)	+= google/
 obj-$(CONFIG_EFI)		+= efi/
+obj-$(CONFIG_UEFI_CPER)		+= efi/
drivers/firmware/efi/Kconfig +3 -3
@@ -36,7 +36,7 @@ config EFI_VARS_PSTORE_DEFAULT_DISABLE
 	  backend for pstore by default. This setting can be overridden
 	  using the efivars module's pstore_disable parameter.
 
-config UEFI_CPER
-	def_bool n
-
 endmenu
+
+config UEFI_CPER
+	bool
drivers/firmware/efi/Makefile +1 -1
@@ -1,7 +1,7 @@
 #
 # Makefile for linux kernel
 #
-obj-y					+= efi.o vars.o
+obj-$(CONFIG_EFI)			+= efi.o vars.o
 obj-$(CONFIG_EFI_VARS)			+= efivars.o
 obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
 obj-$(CONFIG_UEFI_CPER)			+= cper.o
reviewer
#1 lore raw
Quoted 1 line

Adjust Kconfig and build logic so that the bad dependency gets avoided.

Has this been exposed to a randconfig test robot? Moving cper.c has already dropped a few e-mails into my mailbox ... I'm now wary about the corner cases.

-Tony

#2 lore raw
Quoted 6 lines
Quoted 2 lines
Quoted 1 line · Tony

Adjust Kconfig and build logic so that the bad dependency gets avoided.

Has this been exposed to a randconfig test robot? Moving cper.c has already dropped a few e-mails into my mailbox ... I'm now wary about the corner cases.

No, it hasn't. But I explicitly checked the relevant EFI=n and EFI=y cases.

Jan

reviewer
#3 lore raw
Quoted 2 lines

No, it hasn't. But I explicitly checked the relevant EFI=n and EFI=y cases.

Jan,

I pushed your patch into my "next" tree - the robots will notice soon and send us e-mail if they find any issues.

-Tony

#4 lore raw
Quoted 6 lines
Quoted 3 lines
Quoted 1 line · Tony

No, it hasn't. But I explicitly checked the relevant EFI=n and EFI=y
cases.

I pushed your patch into my "next" tree - the robots will notice soon and send us e-mail if they find any issues.

Thanks, Tony. I'm afraid though that fixing this only in 3.14 would be a little late: Any "select" in a Kconfig results in the user not being asked again when that "select" goes away, so people having got EFI forcibly enabled in 3.13 and updating their configs to 3.14 would then need to remember to manually disable CONFIG_EFI again (of course that's already true for anyone using 3.13-rc?, but those should mostly be people more knowledgeable than folks just consuming final releases).

I think it should generally be the exception to "select" options that have visible prompts (i.e. are user configurable).

Jan

reviewer Acked-by
#5 lore raw
Quoted 16 lines · Jan Beulich
Quoted 6 lines
Quoted 3 lines
Quoted 1 line · Tony

No, it hasn't. But I explicitly checked the relevant EFI=n and EFI=y
cases.

I pushed your patch into my "next" tree - the robots will notice soon and send us e-mail if they find any issues.

Thanks, Tony. I'm afraid though that fixing this only in 3.14 would be a little late: Any "select" in a Kconfig results in the user not being asked again when that "select" goes away, so people having got EFI forcibly enabled in 3.13 and updating their configs to 3.14 would then need to remember to manually disable CONFIG_EFI again (of course that's already true for anyone using 3.13-rc?, but those should mostly be people more knowledgeable than folks just consuming final releases).

Quoted 2 lines

I think it should generally be the exception to "select" options that have visible prompts (i.e. are user configurable).

Ingo: Jan makes a good point that people running "make oldconfig" may get suckered into selecting CONFIG_EFI when they don't really need it. I've not seen any complaints from the robot randconfig testers, so this patch is:

Can you push it to Linus before 3.13-final releases?

-Tony

#6 lore raw
Quoted 20 lines · Tony Luck
Quoted 16 lines · Jan Beulich
Quoted 6 lines
Quoted 3 lines
Quoted 1 line · Tony

No, it hasn't. But I explicitly checked the relevant EFI=n and EFI=y
cases.

I pushed your patch into my "next" tree - the robots will notice soon and send us e-mail if they find any issues.

Thanks, Tony. I'm afraid though that fixing this only in 3.14 would be a little late: Any "select" in a Kconfig results in the user not being asked again when that "select" goes away, so people having got EFI forcibly enabled in 3.13 and updating their configs to 3.14 would then need to remember to manually disable CONFIG_EFI again (of course that's already true for anyone using 3.13-rc?, but those should mostly be people more knowledgeable than folks just consuming final releases).

Quoted 2 lines

I think it should generally be the exception to "select" options that have visible prompts (i.e. are user configurable).

Quoted 8 lines

Ingo: Jan makes a good point that people running "make oldconfig" may get suckered into selecting CONFIG_EFI when they don't really need it. I've not seen any complaints from the robot randconfig testers, so this patch is:

Can you push it to Linus before 3.13-final releases?

Ok, agreed, I've queued it up in the tip:x86/urgent tree.

Thanks,

Ingo

#7 lore raw

[tip:x86/urgent] x86/efi: Don' t select EFI from certain special ACPI drivers

In reply to Jan Beulich
x86/efi: Don't select EFI from certain special ACPI drivers
Commit-ID:  fce7d3bfc0ae70ca2a57868f2a9708b13185fd1f
Gitweb:     http://git.kernel.org/tip/fce7d3bfc0ae70ca2a57868f2a9708b13185fd1f
Author:     Jan Beulich <[email protected]>
AuthorDate: Mon, 16 Dec 2013 14:39:40 +0000
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 19 Dec 2013 21:32:46 +0100

x86/efi: Don't select EFI from certain special ACPI drivers

Commit 7ea6c6c1 ("Move cper.c from drivers/acpi/apei to drivers/firmware/efi") results in CONFIG_EFI being enabled even when the user doesn't want this. Since ACPI APEI used to build fine without UEFI (and as far as I know also has no functional depency on it), at least in that case using a reverse dependency is wrong (and a straight one isn't needed).

Whether the same is true for ACPI_EXTLOG I don't know - if there is a functional dependency, it should depend on EFI rather than selecting it. It certainly has (currently) no build dependency.

Adjust Kconfig and build logic so that the bad dependency gets avoided.

---
 drivers/acpi/Kconfig          | 1 -
 drivers/acpi/apei/Kconfig     | 1 -
 drivers/firmware/Makefile     | 1 +
 drivers/firmware/efi/Kconfig  | 6 +++---
 drivers/firmware/efi/Makefile | 2 +-
 5 files changed, 5 insertions(+), 6 deletions(-)
drivers/acpi/Kconfig +0 -1
index 5d92485..4770de5 100644
@@ -348,7 +348,6 @@ source "drivers/acpi/apei/Kconfig"
 config ACPI_EXTLOG
 	tristate "Extended Error Log support"
 	depends on X86_MCE && X86_LOCAL_APIC
-	select EFI
 	select UEFI_CPER
 	default n
 	help
drivers/acpi/apei/Kconfig +0 -1
index 786294b..3650b21 100644
@@ -2,7 +2,6 @@ config ACPI_APEI
 	bool "ACPI Platform Error Interface (APEI)"
 	select MISC_FILESYSTEMS
 	select PSTORE
-	select EFI
 	select UEFI_CPER
 	depends on X86
 	help
drivers/firmware/Makefile +1 -0
index 299fad6..5373dc5 100644
@@ -14,3 +14,4 @@ obj-$(CONFIG_FIRMWARE_MEMMAP)	+= memmap.o
 
 obj-$(CONFIG_GOOGLE_FIRMWARE)	+= google/
 obj-$(CONFIG_EFI)		+= efi/
+obj-$(CONFIG_UEFI_CPER)		+= efi/
drivers/firmware/efi/Kconfig +3 -3
index 3150aa4..6aecbc8 100644
@@ -36,7 +36,7 @@ config EFI_VARS_PSTORE_DEFAULT_DISABLE
 	  backend for pstore by default. This setting can be overridden
 	  using the efivars module's pstore_disable parameter.
 
-config UEFI_CPER
-	def_bool n
-
 endmenu
+
+config UEFI_CPER
+	bool
drivers/firmware/efi/Makefile +1 -1
index 9ba156d..6c2a41e 100644
@@ -1,7 +1,7 @@
 #
 # Makefile for linux kernel
 #
-obj-y					+= efi.o vars.o
+obj-$(CONFIG_EFI)			+= efi.o vars.o
 obj-$(CONFIG_EFI_VARS)			+= efivars.o
 obj-$(CONFIG_EFI_VARS_PSTORE)		+= efi-pstore.o
 obj-$(CONFIG_UEFI_CPER)			+= cper.o