From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH v2 036/169] Correct SPL uses of CMD_BOOTEFI_BOOTMGR
Date: Tue, 7 Feb 2023 11:26:37 -0500 [thread overview]
Message-ID: <Y+J7vaJm/mpPY4v+@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ3_b_RzS0FUq5jAnkJG7f6D4DdaCPPyL8z16NpHYsXv+w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4686 bytes --]
On Tue, Feb 07, 2023 at 08:31:59AM -0700, Simon Glass wrote:
> Hi Tom,
>
> On Tue, 7 Feb 2023 at 07:50, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Tue, Feb 07, 2023 at 08:39:38AM +0100, Heinrich Schuchardt wrote:
> > >
> > >
> > > On 2/7/23 01:00, Tom Rini wrote:
> > > > On Tue, Feb 07, 2023 at 12:54:03AM +0100, Heinrich Schuchardt wrote:
> > > > >
> > > > >
> > > > > On 2/6/23 01:53, Simon Glass wrote:
> > > > > > This converts 3 usages of this option to the non-SPL form, since there is
> > > > > > no SPL_CMD_BOOTEFI_BOOTMGR defined in Kconfig
> > > > > >
> > > > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > > > ---
> > > > > >
> > > > > > (no changes since v1)
> > > > > >
> > > > > > boot/Makefile | 2 +-
> > > > > > cmd/bootmenu.c | 4 ++--
> > > > > > 2 files changed, 3 insertions(+), 3 deletions(-)
> > > > > >
> > > > > > diff --git a/boot/Makefile b/boot/Makefile
> > > > > > index 69c31adb77d..73b5b19816b 100644
> > > > > > --- a/boot/Makefile
> > > > > > +++ b/boot/Makefile
> > > > > > @@ -29,7 +29,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o
> > > > > > obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o
> > > > > > obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o
> > > > > > ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL
> > > > > > -obj-$(CONFIG_$(SPL_TPL_)CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o
> > > > > > +obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o
> > > > > > obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow_menu.o
> > > > > > endif
> > > > > > diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c
> > > > > > index 3236ca5d799..422ab411252 100644
> > > > > > --- a/cmd/bootmenu.c
> > > > > > +++ b/cmd/bootmenu.c
> > > > > > @@ -223,7 +223,7 @@ static int prepare_bootmenu_entry(struct bootmenu_data *menu,
> > > > > > return 1;
> > > > > > }
> > > > > > -#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
> > > > > > +#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
> > > > >
> > > > > There is no reason whatsoever for using different macros for the two
> > > > > options.
> > > >
> > > > Here and elsewhere, one CONFIG is being fixed at a time. If at the end
> > > > of the series this is not fixed, then that's an issue to address.
> > >
> > > This cannot be reviewed easily. I never received the complete series.
> >
> > This, and the related series, are among the most reviewed we've had in
> > quite some time. Just FWIW.
> >
> > > CONFIG_IS_ENABLED() is more restrictive than IS_ENABLED(). No motivation is
> > > provided why the condition should be relaxed in the commit message.
> >
> > The idea of "restrictive" is not how either of those macros should be
> > evaluated.
> >
> > > Cover-letters are not in the commit history. But anyway the cover-letter
> > > does not provide any motivation for the change either.
> > >
> > > NAK to this patch.
> >
> > It's incorrect to use CONFIG_IS_ENABLED() instead of IS_ENABLED()
> > outside of:
> > - CONFIG_FOO, CONFIG_SPL_FOO (etc) exist
> > - The code in question is compiled in the SPL (etc) context and we do
> > need to know if the code block in question is required here and the
> > implicit value of SPL_FOO being false is useful.
> > This case is why Simon insists that adding def_bool n for
> > SPL_EFI_LOADER, etc, is correct, but I'm not convinced.
>
> The issue here is that we need a way to determine whether an option
> like CONFIG_FOO should apply to all build phases, or only U-Boot
> proper. The def_bool business creates an SPL symbol, so U-Boot then
> knows that the option applies only to U-Boot proper, with a separate
> one for CONFIG_SPL_FOO
Please bear in mind that today a lack of definition works, and is a
feature, not a bug nor glitch. It's why, today, the tests in
lib/vsprintf.c are correct.
> There is a file call scripts/conf_nospl (in splc) which lists options
> that are exceptions. Otherwise we would need more of these def_bool
> things. The thing is, I don't really like the conf_nospl file, since
> it is configuring the operation of Kconfig but is not actually in the
> Kconfig description. So for things where I thought it was defensible,
> I added a def_bool.
Keep in mind that everything works as intended, today. What's being done
in the EFI loader code works, but is a bad practice. It's what lead to
the MMC_QUIRKS actual bug and time being lost debugging a problem that
shouldn't have been.
What split config introduces / requires is for discussion over *there*.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2023-02-07 16:26 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 0:53 [PATCH v2 026/169] Correct SPL use of ARCH_VERSAL Simon Glass
2023-02-06 0:53 ` [PATCH v2 036/169] Correct SPL uses of CMD_BOOTEFI_BOOTMGR Simon Glass
2023-02-06 23:54 ` Heinrich Schuchardt
2023-02-07 0:00 ` Tom Rini
2023-02-07 7:39 ` Heinrich Schuchardt
2023-02-07 14:50 ` Tom Rini
2023-02-07 15:31 ` Simon Glass
2023-02-07 16:26 ` Tom Rini [this message]
2023-02-08 8:55 ` Heinrich Schuchardt
2023-02-06 0:53 ` [PATCH v2 065/169] Correct SPL uses of DISPLAY_AER_BRIEF Simon Glass
2023-02-06 0:54 ` [PATCH v2 075/169] Correct SPL use of EFI_MM_COMM_TEE Simon Glass
2023-02-06 23:57 ` Heinrich Schuchardt
2023-02-06 0:54 ` [PATCH v2 083/169] Correct SPL uses of FASTBOOT Simon Glass
2023-02-06 0:54 ` [PATCH v2 085/169] Correct SPL uses of FASTBOOT_FLASH_MMC Simon Glass
2023-02-06 0:54 ` [PATCH v2 086/169] Correct SPL uses of FASTBOOT_FLASH_NAND Simon Glass
2023-02-06 0:54 ` [PATCH v2 089/169] Correct SPL uses of FEC_MXC Simon Glass
2023-02-06 0:54 ` [PATCH v2 115/169] Correct SPL uses of OF_BOARD Simon Glass
2023-02-06 0:54 ` [PATCH v2 117/169] Correct SPL use of PANEL Simon Glass
2023-02-06 0:54 ` [PATCH v2 123/169] Correct SPL use of PHY_CADENCE_SIERRA Simon Glass
2023-02-06 0:54 ` [PATCH v2 124/169] Correct SPL use of PHY_CADENCE_TORRENT Simon Glass
2023-02-06 0:54 ` [PATCH v2 126/169] Correct SPL uses of PMIC_STPMIC1 Simon Glass
2023-02-06 0:54 ` [PATCH v2 132/169] Correct SPL uses of ROCKCHIP_OTP Simon Glass
2023-02-06 0:55 ` [PATCH v2 136/169] Correct SPL uses of SAVE_PREV_BL_INITRAMFS_START_ADDR Simon Glass
2023-02-06 0:55 ` [PATCH v2 137/169] Correct SPL uses of SEC_FIRMWARE_ARMV8_PSCI Simon Glass
2023-02-09 1:19 ` Tom Rini
2023-02-12 23:14 ` Simon Glass
2023-02-06 0:55 ` [PATCH v2 141/169] Correct SPL use of SPI_FLASH_BAR Simon Glass
2023-02-09 1:30 ` Tom Rini
2023-02-12 23:14 ` Simon Glass
2023-02-06 0:55 ` [PATCH v2 142/169] Correct SPL uses of SPI_FLASH_MACRONIX Simon Glass
2023-02-09 17:05 ` Tom Rini
2023-02-12 23:15 ` Simon Glass
2023-02-06 0:55 ` [PATCH v2 143/169] Correct SPL use of SPLASH_SOURCE Simon Glass
2023-02-06 0:55 ` [PATCH v2 149/169] Correct SPL uses of TARGET_LX2160ARDB Simon Glass
2023-02-06 0:55 ` [PATCH v2 154/169] Correct SPL uses of TEN64_CONTROLLER Simon Glass
2023-02-06 0:55 ` [PATCH v2 161/169] Correct SPL uses of USB_KEYBOARD Simon Glass
2023-02-06 0:55 ` [PATCH v2 165/169] Correct SPL use of VIDEO_BPP16 Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y+J7vaJm/mpPY4v+@bill-the-cat \
--to=trini@konsulko.com \
--cc=heinrich.schuchardt@canonical.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.