* [PATCH] efi: EFI_EARLYCON should depend on EFI
@ 2020-11-24 19:16 Geert Uytterhoeven
2020-11-25 8:21 ` Damien Le Moal
2020-11-27 16:49 ` [tip: efi/urgent] " tip-bot2 for Geert Uytterhoeven
0 siblings, 2 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2020-11-24 19:16 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Alexander Graf, Ingo Molnar, Damien Le Moal, linux-efi,
linux-riscv, linux-kernel, Geert Uytterhoeven
CONFIG_EFI_EARLYCON defaults to yes, and thus is enabled on systems that
do not support EFI, or do not have EFI support enabled, but do satisfy
the symbol's other dependencies.
While drivers/firmware/efi/ won't be entered during the build phase if
CONFIG_EFI=n, and drivers/firmware/efi/earlycon.c itself thus won't be
built, enabling EFI_EARLYCON does force-enable CONFIG_FONT_SUPPORT and
CONFIG_ARCH_USE_MEMREMAP_PROT, and CONFIG_FONT_8x16, which is
undesirable.
Fix this by making CONFIG_EFI_EARLYCON depend on CONFIG_EFI.
This reduces kernel size on headless systems by more than 4 KiB.
Fixes: 69c1f396f25b805a ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/firmware/efi/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
index b452cfa2100b401c..1dd1f7784f0888ff 100644
--- a/drivers/firmware/efi/Kconfig
+++ b/drivers/firmware/efi/Kconfig
@@ -270,7 +270,7 @@ config EFI_DEV_PATH_PARSER
config EFI_EARLYCON
def_bool y
- depends on SERIAL_EARLYCON && !ARM && !IA64
+ depends on EFI && SERIAL_EARLYCON && !ARM && !IA64
select FONT_SUPPORT
select ARCH_USE_MEMREMAP_PROT
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] efi: EFI_EARLYCON should depend on EFI
2020-11-24 19:16 [PATCH] efi: EFI_EARLYCON should depend on EFI Geert Uytterhoeven
@ 2020-11-25 8:21 ` Damien Le Moal
2020-11-25 8:23 ` Ard Biesheuvel
2020-11-27 16:49 ` [tip: efi/urgent] " tip-bot2 for Geert Uytterhoeven
1 sibling, 1 reply; 4+ messages in thread
From: Damien Le Moal @ 2020-11-25 8:21 UTC (permalink / raw)
To: ardb, geert; +Cc: mingo, linux-efi, linux-riscv, linux-kernel
On Tue, 2020-11-24 at 20:16 +0100, Geert Uytterhoeven wrote:
> CONFIG_EFI_EARLYCON defaults to yes, and thus is enabled on systems that
> do not support EFI, or do not have EFI support enabled, but do satisfy
> the symbol's other dependencies.
>
> While drivers/firmware/efi/ won't be entered during the build phase if
> CONFIG_EFI=n, and drivers/firmware/efi/earlycon.c itself thus won't be
> built, enabling EFI_EARLYCON does force-enable CONFIG_FONT_SUPPORT and
> CONFIG_ARCH_USE_MEMREMAP_PROT, and CONFIG_FONT_8x16, which is
> undesirable.
>
> Fix this by making CONFIG_EFI_EARLYCON depend on CONFIG_EFI.
>
> This reduces kernel size on headless systems by more than 4 KiB.
>
> Fixes: 69c1f396f25b805a ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> drivers/firmware/efi/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
> index b452cfa2100b401c..1dd1f7784f0888ff 100644
> --- a/drivers/firmware/efi/Kconfig
> +++ b/drivers/firmware/efi/Kconfig
> @@ -270,7 +270,7 @@ config EFI_DEV_PATH_PARSER
>
>
> config EFI_EARLYCON
> def_bool y
> - depends on SERIAL_EARLYCON && !ARM && !IA64
> + depends on EFI && SERIAL_EARLYCON && !ARM && !IA64
> select FONT_SUPPORT
> select ARCH_USE_MEMREMAP_PROT
>
>
Looks good to me.
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
--
Damien Le Moal
Western Digital
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] efi: EFI_EARLYCON should depend on EFI
2020-11-25 8:21 ` Damien Le Moal
@ 2020-11-25 8:23 ` Ard Biesheuvel
0 siblings, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2020-11-25 8:23 UTC (permalink / raw)
To: Damien Le Moal; +Cc: geert, mingo, linux-efi, linux-riscv, linux-kernel
On Wed, 25 Nov 2020 at 09:21, Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
>
> On Tue, 2020-11-24 at 20:16 +0100, Geert Uytterhoeven wrote:
> > CONFIG_EFI_EARLYCON defaults to yes, and thus is enabled on systems that
> > do not support EFI, or do not have EFI support enabled, but do satisfy
> > the symbol's other dependencies.
> >
> > While drivers/firmware/efi/ won't be entered during the build phase if
> > CONFIG_EFI=n, and drivers/firmware/efi/earlycon.c itself thus won't be
> > built, enabling EFI_EARLYCON does force-enable CONFIG_FONT_SUPPORT and
> > CONFIG_ARCH_USE_MEMREMAP_PROT, and CONFIG_FONT_8x16, which is
> > undesirable.
> >
> > Fix this by making CONFIG_EFI_EARLYCON depend on CONFIG_EFI.
> >
> > This reduces kernel size on headless systems by more than 4 KiB.
> >
> > Fixes: 69c1f396f25b805a ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation")
> > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > ---
> > drivers/firmware/efi/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
> > index b452cfa2100b401c..1dd1f7784f0888ff 100644
> > --- a/drivers/firmware/efi/Kconfig
> > +++ b/drivers/firmware/efi/Kconfig
> > @@ -270,7 +270,7 @@ config EFI_DEV_PATH_PARSER
> >
> >
> > config EFI_EARLYCON
> > def_bool y
> > - depends on SERIAL_EARLYCON && !ARM && !IA64
> > + depends on EFI && SERIAL_EARLYCON && !ARM && !IA64
> > select FONT_SUPPORT
> > select ARCH_USE_MEMREMAP_PROT
> >
> >
>
> Looks good to me.
> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
>
Thanks all
I'll queue this as a fix.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip: efi/urgent] efi: EFI_EARLYCON should depend on EFI
2020-11-24 19:16 [PATCH] efi: EFI_EARLYCON should depend on EFI Geert Uytterhoeven
2020-11-25 8:21 ` Damien Le Moal
@ 2020-11-27 16:49 ` tip-bot2 for Geert Uytterhoeven
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Geert Uytterhoeven @ 2020-11-27 16:49 UTC (permalink / raw)
To: linux-tip-commits
Cc: Geert Uytterhoeven, Damien Le Moal, Ard Biesheuvel, x86, linux-kernel
The following commit has been merged into the efi/urgent branch of tip:
Commit-ID: 36a237526cd81ff4b6829e6ebd60921c6f976e3b
Gitweb: https://git.kernel.org/tip/36a237526cd81ff4b6829e6ebd60921c6f976e3b
Author: Geert Uytterhoeven <geert@linux-m68k.org>
AuthorDate: Tue, 24 Nov 2020 20:16:46 +01:00
Committer: Ard Biesheuvel <ardb@kernel.org>
CommitterDate: Wed, 25 Nov 2020 16:55:02 +01:00
efi: EFI_EARLYCON should depend on EFI
CONFIG_EFI_EARLYCON defaults to yes, and thus is enabled on systems that
do not support EFI, or do not have EFI support enabled, but do satisfy
the symbol's other dependencies.
While drivers/firmware/efi/ won't be entered during the build phase if
CONFIG_EFI=n, and drivers/firmware/efi/earlycon.c itself thus won't be
built, enabling EFI_EARLYCON does force-enable CONFIG_FONT_SUPPORT and
CONFIG_ARCH_USE_MEMREMAP_PROT, and CONFIG_FONT_8x16, which is
undesirable.
Fix this by making CONFIG_EFI_EARLYCON depend on CONFIG_EFI.
This reduces kernel size on headless systems by more than 4 KiB.
Fixes: 69c1f396f25b805a ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20201124191646.3559757-1-geert@linux-m68k.org
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
drivers/firmware/efi/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
index 36ec1f7..d989549 100644
--- a/drivers/firmware/efi/Kconfig
+++ b/drivers/firmware/efi/Kconfig
@@ -270,7 +270,7 @@ config EFI_DEV_PATH_PARSER
config EFI_EARLYCON
def_bool y
- depends on SERIAL_EARLYCON && !ARM && !IA64
+ depends on EFI && SERIAL_EARLYCON && !ARM && !IA64
select FONT_SUPPORT
select ARCH_USE_MEMREMAP_PROT
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-27 16:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 19:16 [PATCH] efi: EFI_EARLYCON should depend on EFI Geert Uytterhoeven
2020-11-25 8:21 ` Damien Le Moal
2020-11-25 8:23 ` Ard Biesheuvel
2020-11-27 16:49 ` [tip: efi/urgent] " tip-bot2 for Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®