linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] efi/x86: Move mixed-mode thunk to efi/libstub
@ 2020-03-04 18:36 Arvind Sankar
  2020-03-04 18:39 ` Ard Biesheuvel
  0 siblings, 1 reply; 3+ messages in thread
From: Arvind Sankar @ 2020-03-04 18:36 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: linux-efi, x86, linux-kernel

Commit c2d0b470154c ("efi/libstub/x86: Incorporate eboot.c into
libstub") moved all the callers of the mixed-mode thunk into
efi/libstub, so move the thunk itself as well for completeness.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
---
 arch/x86/boot/compressed/Makefile                                | 1 -
 drivers/firmware/efi/libstub/Makefile                            | 1 +
 .../firmware/efi/libstub/x86_64-thunk.S                          | 0
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename arch/x86/boot/compressed/efi_thunk_64.S => drivers/firmware/efi/libstub/x86_64-thunk.S (100%)

diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index e51879bdc51c..047004d39a55 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -88,7 +88,6 @@ endif
 vmlinux-objs-$(CONFIG_ACPI) += $(obj)/acpi.o
 
 vmlinux-objs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
-vmlinux-objs-$(CONFIG_EFI_MIXED) += $(obj)/efi_thunk_$(BITS).o
 
 # The compressed kernel is built with -fPIC/-fPIE so that a boot loader
 # can place it anywhere in memory and it will still run. However, since
diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
index 4d6246c6f651..85b66e5e5d1f 100644
--- a/drivers/firmware/efi/libstub/Makefile
+++ b/drivers/firmware/efi/libstub/Makefile
@@ -55,6 +55,7 @@ lib-$(CONFIG_EFI_ARMSTUB)	+= arm-stub.o fdt.o string.o \
 lib-$(CONFIG_ARM)		+= arm32-stub.o
 lib-$(CONFIG_ARM64)		+= arm64-stub.o
 lib-$(CONFIG_X86)		+= x86-stub.o
+lib-$(CONFIG_EFI_MIXED)		+= x86_64-thunk.o
 CFLAGS_arm32-stub.o		:= -DTEXT_OFFSET=$(TEXT_OFFSET)
 CFLAGS_arm64-stub.o		:= -DTEXT_OFFSET=$(TEXT_OFFSET)
 
diff --git a/arch/x86/boot/compressed/efi_thunk_64.S b/drivers/firmware/efi/libstub/x86_64-thunk.S
similarity index 100%
rename from arch/x86/boot/compressed/efi_thunk_64.S
rename to drivers/firmware/efi/libstub/x86_64-thunk.S
-- 
2.24.1


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

* Re: [PATCH] efi/x86: Move mixed-mode thunk to efi/libstub
  2020-03-04 18:36 [PATCH] efi/x86: Move mixed-mode thunk to efi/libstub Arvind Sankar
@ 2020-03-04 18:39 ` Ard Biesheuvel
  2020-03-04 18:48   ` Arvind Sankar
  0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2020-03-04 18:39 UTC (permalink / raw)
  To: Arvind Sankar
  Cc: linux-efi, the arch/x86 maintainers, Linux Kernel Mailing List

On Wed, 4 Mar 2020 at 19:37, Arvind Sankar <nivedita@alum.mit.edu> wrote:
>
> Commit c2d0b470154c ("efi/libstub/x86: Incorporate eboot.c into
> libstub") moved all the callers of the mixed-mode thunk into
> efi/libstub, so move the thunk itself as well for completeness.
>
> Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>

Thanks for the patch, but I'd prefer to leave the .S pieces under arch/
(unless there's some benefit I'm not seeing)

> ---
>  arch/x86/boot/compressed/Makefile                                | 1 -
>  drivers/firmware/efi/libstub/Makefile                            | 1 +
>  .../firmware/efi/libstub/x86_64-thunk.S                          | 0
>  3 files changed, 1 insertion(+), 1 deletion(-)
>  rename arch/x86/boot/compressed/efi_thunk_64.S => drivers/firmware/efi/libstub/x86_64-thunk.S (100%)
>
> diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
> index e51879bdc51c..047004d39a55 100644
> --- a/arch/x86/boot/compressed/Makefile
> +++ b/arch/x86/boot/compressed/Makefile
> @@ -88,7 +88,6 @@ endif
>  vmlinux-objs-$(CONFIG_ACPI) += $(obj)/acpi.o
>
>  vmlinux-objs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
> -vmlinux-objs-$(CONFIG_EFI_MIXED) += $(obj)/efi_thunk_$(BITS).o
>
>  # The compressed kernel is built with -fPIC/-fPIE so that a boot loader
>  # can place it anywhere in memory and it will still run. However, since
> diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
> index 4d6246c6f651..85b66e5e5d1f 100644
> --- a/drivers/firmware/efi/libstub/Makefile
> +++ b/drivers/firmware/efi/libstub/Makefile
> @@ -55,6 +55,7 @@ lib-$(CONFIG_EFI_ARMSTUB)     += arm-stub.o fdt.o string.o \
>  lib-$(CONFIG_ARM)              += arm32-stub.o
>  lib-$(CONFIG_ARM64)            += arm64-stub.o
>  lib-$(CONFIG_X86)              += x86-stub.o
> +lib-$(CONFIG_EFI_MIXED)                += x86_64-thunk.o
>  CFLAGS_arm32-stub.o            := -DTEXT_OFFSET=$(TEXT_OFFSET)
>  CFLAGS_arm64-stub.o            := -DTEXT_OFFSET=$(TEXT_OFFSET)
>
> diff --git a/arch/x86/boot/compressed/efi_thunk_64.S b/drivers/firmware/efi/libstub/x86_64-thunk.S
> similarity index 100%
> rename from arch/x86/boot/compressed/efi_thunk_64.S
> rename to drivers/firmware/efi/libstub/x86_64-thunk.S
> --
> 2.24.1
>

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

* Re: [PATCH] efi/x86: Move mixed-mode thunk to efi/libstub
  2020-03-04 18:39 ` Ard Biesheuvel
@ 2020-03-04 18:48   ` Arvind Sankar
  0 siblings, 0 replies; 3+ messages in thread
From: Arvind Sankar @ 2020-03-04 18:48 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Arvind Sankar, linux-efi, the arch/x86 maintainers,
	Linux Kernel Mailing List

On Wed, Mar 04, 2020 at 07:39:23PM +0100, Ard Biesheuvel wrote:
> On Wed, 4 Mar 2020 at 19:37, Arvind Sankar <nivedita@alum.mit.edu> wrote:
> >
> > Commit c2d0b470154c ("efi/libstub/x86: Incorporate eboot.c into
> > libstub") moved all the callers of the mixed-mode thunk into
> > efi/libstub, so move the thunk itself as well for completeness.
> >
> > Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
> 
> Thanks for the patch, but I'd prefer to leave the .S pieces under arch/
> (unless there's some benefit I'm not seeing)
> 

Ok. I can't think of any objective benefit.

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04 18:36 [PATCH] efi/x86: Move mixed-mode thunk to efi/libstub Arvind Sankar
2020-03-04 18:39 ` Ard Biesheuvel
2020-03-04 18:48   ` Arvind Sankar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).