don't select EFI from certain special ACPI drivers
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.
--- 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
Luck, Tony
reviewerQuoted 1 line
Adjust
Kconfigand 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
Quoted 6 lines
Quoted 2 lines
Quoted 1 line · Tony
Adjust
Kconfigand build logic so that the bad dependency gets avoided.Has this been exposed to a randconfig test robot? Moving
cper.chas 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
Luck, Tony
reviewerQuoted 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
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
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
Kconfigresults 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 disableCONFIG_EFIagain (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
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
Kconfigresults 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 disableCONFIG_EFIagain (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_EFIwhen they don't really need it. I've not seen any complaints from the robot randconfig testers, so this patch is:Acked-by Tony Luck <[email protected]>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
tip-bot for Jan Beulich
merge bot[tip:x86/urgent] x86/efi: Don' t select EFI from certain special ACPI drivers
In reply to Jan Beulichx86/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
@@ -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.o 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