All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] efi/libstub/x86: simplify efi_is_native()
@ 2020-10-03  6:03 Heinrich Schuchardt
  2020-10-03 17:28 ` Brian Gerst
  2020-11-17 18:03 ` [tip: efi/core] " tip-bot2 for Heinrich Schuchardt
  0 siblings, 2 replies; 6+ messages in thread
From: Heinrich Schuchardt @ 2020-10-03  6:03 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	H . Peter Anvin, linux-efi, linux-kernel, Heinrich Schuchardt

CONFIG_EFI_MIXED depends on CONFIG_X86_64=y.
There is no need to check CONFIG_X86_64 again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 arch/x86/include/asm/efi.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index b9c2667ac46c..ab28bf1c74cf 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -223,8 +223,6 @@ static inline bool efi_is_64bit(void)

 static inline bool efi_is_native(void)
 {
-	if (!IS_ENABLED(CONFIG_X86_64))
-		return true;
 	return efi_is_64bit();
 }

--
2.28.0


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

* Re: [PATCH 1/1] efi/libstub/x86: simplify efi_is_native()
  2020-10-03  6:03 [PATCH 1/1] efi/libstub/x86: simplify efi_is_native() Heinrich Schuchardt
@ 2020-10-03 17:28 ` Brian Gerst
  2020-10-03 19:44   ` Arvind Sankar
  2020-11-17 18:03 ` [tip: efi/core] " tip-bot2 for Heinrich Schuchardt
  1 sibling, 1 reply; 6+ messages in thread
From: Brian Gerst @ 2020-10-03 17:28 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Ard Biesheuvel, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	the arch/x86 maintainers, H . Peter Anvin, linux-efi,
	Linux Kernel Mailing List

On Sat, Oct 3, 2020 at 2:05 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> CONFIG_EFI_MIXED depends on CONFIG_X86_64=y.
> There is no need to check CONFIG_X86_64 again.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  arch/x86/include/asm/efi.h | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
> index b9c2667ac46c..ab28bf1c74cf 100644
> --- a/arch/x86/include/asm/efi.h
> +++ b/arch/x86/include/asm/efi.h
> @@ -223,8 +223,6 @@ static inline bool efi_is_64bit(void)
>
>  static inline bool efi_is_native(void)
>  {
> -       if (!IS_ENABLED(CONFIG_X86_64))
> -               return true;
>         return efi_is_64bit();
>  }

This would then return false for native 32-bit.

--
Brian Gerst

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

* Re: [PATCH 1/1] efi/libstub/x86: simplify efi_is_native()
  2020-10-03 17:28 ` Brian Gerst
@ 2020-10-03 19:44   ` Arvind Sankar
  2020-10-04 14:14     ` Ard Biesheuvel
  0 siblings, 1 reply; 6+ messages in thread
From: Arvind Sankar @ 2020-10-03 19:44 UTC (permalink / raw)
  To: Brian Gerst
  Cc: Heinrich Schuchardt, Ard Biesheuvel, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, the arch/x86 maintainers,
	H . Peter Anvin, linux-efi, Linux Kernel Mailing List

On Sat, Oct 03, 2020 at 01:28:18PM -0400, Brian Gerst wrote:
> On Sat, Oct 3, 2020 at 2:05 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> >
> > CONFIG_EFI_MIXED depends on CONFIG_X86_64=y.
> > There is no need to check CONFIG_X86_64 again.
> >
> > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > ---
> >  arch/x86/include/asm/efi.h | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
> > index b9c2667ac46c..ab28bf1c74cf 100644
> > --- a/arch/x86/include/asm/efi.h
> > +++ b/arch/x86/include/asm/efi.h
> > @@ -223,8 +223,6 @@ static inline bool efi_is_64bit(void)
> >
> >  static inline bool efi_is_native(void)
> >  {
> > -       if (!IS_ENABLED(CONFIG_X86_64))
> > -               return true;
> >         return efi_is_64bit();
> >  }
> 
> This would then return false for native 32-bit.
> 
> --
> Brian Gerst

32-bit doesn't use this implementation: it's #define'd to true in
drivers/firmware/efi/libstub/efistub.h.

Thanks.

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

* Re: [PATCH 1/1] efi/libstub/x86: simplify efi_is_native()
  2020-10-03 19:44   ` Arvind Sankar
@ 2020-10-04 14:14     ` Ard Biesheuvel
  2020-10-04 14:40       ` Arvind Sankar
  0 siblings, 1 reply; 6+ messages in thread
From: Ard Biesheuvel @ 2020-10-04 14:14 UTC (permalink / raw)
  To: Arvind Sankar
  Cc: Brian Gerst, Heinrich Schuchardt, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, the arch/x86 maintainers, H . Peter Anvin,
	linux-efi, Linux Kernel Mailing List

On Sat, 3 Oct 2020 at 21:44, Arvind Sankar <nivedita@alum.mit.edu> wrote:
>
> On Sat, Oct 03, 2020 at 01:28:18PM -0400, Brian Gerst wrote:
> > On Sat, Oct 3, 2020 at 2:05 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> > >
> > > CONFIG_EFI_MIXED depends on CONFIG_X86_64=y.
> > > There is no need to check CONFIG_X86_64 again.
> > >
> > > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > > ---
> > >  arch/x86/include/asm/efi.h | 2 --
> > >  1 file changed, 2 deletions(-)
> > >
> > > diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
> > > index b9c2667ac46c..ab28bf1c74cf 100644
> > > --- a/arch/x86/include/asm/efi.h
> > > +++ b/arch/x86/include/asm/efi.h
> > > @@ -223,8 +223,6 @@ static inline bool efi_is_64bit(void)
> > >
> > >  static inline bool efi_is_native(void)
> > >  {
> > > -       if (!IS_ENABLED(CONFIG_X86_64))
> > > -               return true;
> > >         return efi_is_64bit();
> > >  }
> >
> > This would then return false for native 32-bit.
> >
> > --
> > Brian Gerst
>
> 32-bit doesn't use this implementation: it's #define'd to true in
> drivers/firmware/efi/libstub/efistub.h.
>

Yes, and the reason this [now redundant] test exists is because this
did not use to be the case before

de8c55208c386 efi/libstub: Fix mixed mode boot issue after macro refactor

So for this patch

Acked-by: Ard Biesheuvel <ardb@kernel.org>

I'll queue this up

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

* Re: [PATCH 1/1] efi/libstub/x86: simplify efi_is_native()
  2020-10-04 14:14     ` Ard Biesheuvel
@ 2020-10-04 14:40       ` Arvind Sankar
  0 siblings, 0 replies; 6+ messages in thread
From: Arvind Sankar @ 2020-10-04 14:40 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Arvind Sankar, Brian Gerst, Heinrich Schuchardt, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, the arch/x86 maintainers,
	H . Peter Anvin, linux-efi, Linux Kernel Mailing List

On Sun, Oct 04, 2020 at 04:14:11PM +0200, Ard Biesheuvel wrote:
> On Sat, 3 Oct 2020 at 21:44, Arvind Sankar <nivedita@alum.mit.edu> wrote:
> >
> > On Sat, Oct 03, 2020 at 01:28:18PM -0400, Brian Gerst wrote:
> > > On Sat, Oct 3, 2020 at 2:05 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> > > >
> > > > CONFIG_EFI_MIXED depends on CONFIG_X86_64=y.
> > > > There is no need to check CONFIG_X86_64 again.
> > > >
> > > > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > > > ---
> > > >  arch/x86/include/asm/efi.h | 2 --
> > > >  1 file changed, 2 deletions(-)
> > > >
> > > > diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
> > > > index b9c2667ac46c..ab28bf1c74cf 100644
> > > > --- a/arch/x86/include/asm/efi.h
> > > > +++ b/arch/x86/include/asm/efi.h
> > > > @@ -223,8 +223,6 @@ static inline bool efi_is_64bit(void)
> > > >
> > > >  static inline bool efi_is_native(void)
> > > >  {
> > > > -       if (!IS_ENABLED(CONFIG_X86_64))
> > > > -               return true;
> > > >         return efi_is_64bit();
> > > >  }
> > >
> > > This would then return false for native 32-bit.
> > >
> > > --
> > > Brian Gerst
> >
> > 32-bit doesn't use this implementation: it's #define'd to true in
> > drivers/firmware/efi/libstub/efistub.h.
> >
> 
> Yes, and the reason this [now redundant] test exists is because this
> did not use to be the case before
> 
> de8c55208c386 efi/libstub: Fix mixed mode boot issue after macro refactor

Heh, my fault for not cleaning it up then :)

> 
> So for this patch
> 
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
> 
> I'll queue this up

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

* [tip: efi/core] efi/libstub/x86: simplify efi_is_native()
  2020-10-03  6:03 [PATCH 1/1] efi/libstub/x86: simplify efi_is_native() Heinrich Schuchardt
  2020-10-03 17:28 ` Brian Gerst
@ 2020-11-17 18:03 ` tip-bot2 for Heinrich Schuchardt
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot2 for Heinrich Schuchardt @ 2020-11-17 18:03 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Heinrich Schuchardt, Ard Biesheuvel, x86, linux-kernel

The following commit has been merged into the efi/core branch of tip:

Commit-ID:     bc13809f1c47245cd584f4ad31ad06a5c5f40e54
Gitweb:        https://git.kernel.org/tip/bc13809f1c47245cd584f4ad31ad06a5c5f40e54
Author:        Heinrich Schuchardt <xypron.glpk@gmx.de>
AuthorDate:    Sat, 03 Oct 2020 08:03:56 +02:00
Committer:     Ard Biesheuvel <ardb@kernel.org>
CommitterDate: Mon, 26 Oct 2020 08:06:36 +01:00

efi/libstub/x86: simplify efi_is_native()

CONFIG_EFI_MIXED depends on CONFIG_X86_64=y.
There is no need to check CONFIG_X86_64 again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Link: https://lore.kernel.org/r/20201003060356.4913-1-xypron.glpk@gmx.de
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 arch/x86/include/asm/efi.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index bc9758e..7673dc8 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -213,8 +213,6 @@ static inline bool efi_is_64bit(void)
 
 static inline bool efi_is_native(void)
 {
-	if (!IS_ENABLED(CONFIG_X86_64))
-		return true;
 	return efi_is_64bit();
 }
 

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-03  6:03 [PATCH 1/1] efi/libstub/x86: simplify efi_is_native() Heinrich Schuchardt
2020-10-03 17:28 ` Brian Gerst
2020-10-03 19:44   ` Arvind Sankar
2020-10-04 14:14     ` Ard Biesheuvel
2020-10-04 14:40       ` Arvind Sankar
2020-11-17 18:03 ` [tip: efi/core] " tip-bot2 for Heinrich Schuchardt

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.