Skip to contentSkip to conversation

efi: stub: define DISABLE_BRANCH_PROFILING for all architectures

PATCH New Ard Biesheuvel 4 participants 8 messages Dec 23, 2015 – Jan 7, 2016 EFI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi: stub: define DISABLE_BRANCH_PROFILING for all architectures

This moves the DISABLE_BRANCH_PROFILING define from the x86 specific to the general CFLAGS definition for the stub. This fixes build errors when building for arm64 with CONFIG_PROFILE_ALL_BRANCHES_ENABLED.

---
 drivers/firmware/efi/libstub/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/efi/libstub/Makefile +2 -2
index 3c0467d3688c..c0ddd1b8dca3 100644
@@ -8,7 +8,7 @@ cflags-$(CONFIG_X86_32)		:= -march=i386
 cflags-$(CONFIG_X86_64)		:= -mcmodel=small
 cflags-$(CONFIG_X86)		+= -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 \
 				   -fPIC -fno-strict-aliasing -mno-red-zone \
-				   -mno-mmx -mno-sse -DDISABLE_BRANCH_PROFILING
+				   -mno-mmx -mno-sse
 
 cflags-$(CONFIG_ARM64)		:= $(subst -pg,,$(KBUILD_CFLAGS))
 cflags-$(CONFIG_ARM)		:= $(subst -pg,,$(KBUILD_CFLAGS)) \
@@ -16,7 +16,7 @@ cflags-$(CONFIG_ARM)		:= $(subst -pg,,$(KBUILD_CFLAGS)) \
 
 cflags-$(CONFIG_EFI_ARMSTUB)	+= -I$(srctree)/scripts/dtc/libfdt
 
-KBUILD_CFLAGS			:= $(cflags-y) \
+KBUILD_CFLAGS			:= $(cflags-y) -DDISABLE_BRANCH_PROFILING \
 				   $(call cc-option,-ffreestanding) \
 				   $(call cc-option,-fno-stack-protector)
 
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 efi: stub: define DISABLE_BRANCH_PROFILING for all architectures

Quoted 4 lines · Ard Biesheuvel

This moves the DISABLE_BRANCH_PROFILING define from the x86 specific to the general CFLAGS definition for the stub. This fixes build errors when building for arm64 with CONFIG_PROFILE_ALL_BRANCHES_ENABLED.

typo here ^^^

Quoted 31 lines
---
 drivers/firmware/efi/libstub/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/efi/libstub/Makefile +2 -3
index 3c0467d3688c..c0ddd1b8dca3 100644
@@ -8,7 +8,7 @@ cflags-$(CONFIG_X86_32)         := -march=i386
 cflags-$(CONFIG_X86_64)                := -mcmodel=small
 cflags-$(CONFIG_X86)           += -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 \
                                   -fPIC -fno-strict-aliasing -mno-red-zone \
-                                  -mno-mmx -mno-sse -DDISABLE_BRANCH_PROFILING
+                                  -mno-mmx -mno-sse
 
 cflags-$(CONFIG_ARM64)         := $(subst -pg,,$(KBUILD_CFLAGS))
 cflags-$(CONFIG_ARM)           := $(subst -pg,,$(KBUILD_CFLAGS)) \
@@ -16,7 +16,7 @@ cflags-$(CONFIG_ARM)          := $(subst -pg,,$(KBUILD_CFLAGS)) \
 
 cflags-$(CONFIG_EFI_ARMSTUB)   += -I$(srctree)/scripts/dtc/libfdt
 
-KBUILD_CFLAGS                  := $(cflags-y) \
+KBUILD_CFLAGS                  := $(cflags-y) -DDISABLE_BRANCH_PROFILING \
                                   $(call cc-option,-ffreestanding) \
                                   $(call cc-option,-fno-stack-protector)
 
--

2.5.0

#2 lore raw

PATCH 1/1 efi: stub: define DISABLE_BRANCH_PROFILING for all architectures

In reply to Ard Biesheuvel
Quoted 9 lines · Ard Biesheuvel

This moves the DISABLE_BRANCH_PROFILING define from the x86 specific to the general CFLAGS definition for the stub. This fixes build errors when building for arm64 with CONFIG_PROFILE_ALL_BRANCHES_ENABLED.

---
 drivers/firmware/efi/libstub/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Cheers, Ard. The kernel now builds and boots as an EFI application for me when the dreaded #define if config option is enabled:

Will

Quoted 25 lines
drivers/firmware/efi/libstub/Makefile +2 -2
index 3c0467d3688c..c0ddd1b8dca3 100644
@@ -8,7 +8,7 @@ cflags-$(CONFIG_X86_32)		:= -march=i386
 cflags-$(CONFIG_X86_64)		:= -mcmodel=small
 cflags-$(CONFIG_X86)		+= -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 \
 				   -fPIC -fno-strict-aliasing -mno-red-zone \
-				   -mno-mmx -mno-sse -DDISABLE_BRANCH_PROFILING
+				   -mno-mmx -mno-sse
 
 cflags-$(CONFIG_ARM64)		:= $(subst -pg,,$(KBUILD_CFLAGS))
 cflags-$(CONFIG_ARM)		:= $(subst -pg,,$(KBUILD_CFLAGS)) \
@@ -16,7 +16,7 @@ cflags-$(CONFIG_ARM)		:= $(subst -pg,,$(KBUILD_CFLAGS)) \
 
 cflags-$(CONFIG_EFI_ARMSTUB)	+= -I$(srctree)/scripts/dtc/libfdt
 
-KBUILD_CFLAGS			:= $(cflags-y) \
+KBUILD_CFLAGS			:= $(cflags-y) -DDISABLE_BRANCH_PROFILING \
 				   $(call cc-option,-ffreestanding) \
 				   $(call cc-option,-fno-stack-protector)
 
Signature · 1 line
2.5.0
#3 lore raw

PATCH 1/1 efi: stub: define DISABLE_BRANCH_PROFILING for all architectures

(+ Arnd)

Quoted 11 lines · Will Deacon
Quoted 9 lines · Ard Biesheuvel

This moves the DISABLE_BRANCH_PROFILING define from the x86 specific to the general CFLAGS definition for the stub. This fixes build errors when building for arm64 with CONFIG_PROFILE_ALL_BRANCHES_ENABLED.

---
 drivers/firmware/efi/libstub/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 7 lines

Cheers, Ard. The kernel now builds and boots as an EFI application for me when the dreaded #define if config option is enabled:

Will

@Matt: this is causing randconfig build errors for ARM in -next. Mind if we take this through some other tree?

Quoted 25 lines
Quoted 25 lines
drivers/firmware/efi/libstub/Makefile +2 -3
index 3c0467d3688c..c0ddd1b8dca3 100644
@@ -8,7 +8,7 @@ cflags-$(CONFIG_X86_32)               := -march=i386
 cflags-$(CONFIG_X86_64)              := -mcmodel=small
 cflags-$(CONFIG_X86)         += -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 \
                                 -fPIC -fno-strict-aliasing -mno-red-zone \
-                                -mno-mmx -mno-sse -DDISABLE_BRANCH_PROFILING
+                                -mno-mmx -mno-sse
 
 cflags-$(CONFIG_ARM64)               := $(subst -pg,,$(KBUILD_CFLAGS))
 cflags-$(CONFIG_ARM)         := $(subst -pg,,$(KBUILD_CFLAGS)) \
@@ -16,7 +16,7 @@ cflags-$(CONFIG_ARM)                := $(subst -pg,,$(KBUILD_CFLAGS)) \
 
 cflags-$(CONFIG_EFI_ARMSTUB) += -I$(srctree)/scripts/dtc/libfdt
 
-KBUILD_CFLAGS                        := $(cflags-y) \
+KBUILD_CFLAGS                        := $(cflags-y) -DDISABLE_BRANCH_PROFILING \
                                 $(call cc-option,-ffreestanding) \
                                 $(call cc-option,-fno-stack-protector)
 
--

2.5.0

#4 lore raw

PATCH 1/1 efi: stub: define DISABLE_BRANCH_PROFILING for all architectures

Quoted 17 lines · Ard Biesheuvel

(+ Arnd)

Quoted 14 lines · Will Deacon
Quoted 9 lines · Ard Biesheuvel

This moves the DISABLE_BRANCH_PROFILING define from the x86 specific to the general CFLAGS definition for the stub. This fixes build errors when building for arm64 with CONFIG_PROFILE_ALL_BRANCHES_ENABLED.

---
 drivers/firmware/efi/libstub/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Cheers, Ard. The kernel now builds and boots as an EFI application for me when the dreaded #define if config option is enabled:

Quoted 7 lines
Quoted 4 lines

Will

@Matt: this is causing randconfig build errors for ARM in -next. Mind if we take this through some other tree?

Go ahead.

#5 lore raw

PATCH 1/1 efi: stub: define DISABLE_BRANCH_PROFILING for all architectures

Quoted 23 lines · Matt Fleming
Quoted 22 lines · Ard Biesheuvel

(+ Arnd)

Quoted 18 lines · Will Deacon
Quoted 9 lines · Ard Biesheuvel

This moves the DISABLE_BRANCH_PROFILING define from the x86 specific to the general CFLAGS definition for the stub. This fixes build errors when building for arm64 with CONFIG_PROFILE_ALL_BRANCHES_ENABLED.

---
 drivers/firmware/efi/libstub/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Cheers, Ard. The kernel now builds and boots as an EFI application for me when the dreaded #define if config option is enabled:

Will

Quoted 6 lines
Quoted 2 lines

@Matt: this is causing randconfig build errors for ARM in -next. Mind if we take this through some other tree?

Go ahead.

I can take this via the arm64 tree, unless Arnd wants to queue it in arm-soc. Arnd?

Will

#6 lore raw

PATCH 1/1 efi: stub: define DISABLE_BRANCH_PROFILING for all architectures

Quoted 27 lines · Will Deacon
Quoted 26 lines · Matt Fleming
Quoted 24 lines · Ard Biesheuvel

(+ Arnd)

Quoted 11 lines · Will Deacon
Quoted 9 lines · Ard Biesheuvel

This moves the DISABLE_BRANCH_PROFILING define from the x86 specific to the general CFLAGS definition for the stub. This fixes build errors when building for arm64 with CONFIG_PROFILE_ALL_BRANCHES_ENABLED.

---
 drivers/firmware/efi/libstub/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 7 lines

Cheers, Ard. The kernel now builds and boots as an EFI application for me when the dreaded #define if config option is enabled:

Will

@Matt: this is causing randconfig build errors for ARM in -next. Mind if we take this through some other tree?

Quoted 6 lines
Quoted 3 lines

Go ahead.

I can take this via the arm64 tree, unless Arnd wants to queue it in arm-soc. Arnd?

Given that this fixes build errors, I've applied it in the arm64 tree, so it should appear in -next soon.

Will

#7 lore raw

PATCH 1/1 efi: stub: define DISABLE_BRANCH_PROFILING for all architectures

Quoted 3 lines · On Wednesday 06 January 2016 15:43:49 Will Deacon wrote:
Quoted 2 lines · Will Deacon

I can take this via the arm64 tree, unless Arnd wants to queue it in arm-soc. Arnd?

arm64 tree is fine with me.

Quoted 3 lines

Given that this fixes build errors, I've applied it in the arm64 tree, so it should appear in -next soon.

Thanks,

Arnd