Skip to contentSkip to conversation

arm64: errata: use KBUILD_CFLAGS_MODULE for erratum #843419

PATCH New Will Deacon 3 participants 4 messages Oct 8, 2015 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: errata: use KBUILD_CFLAGS_MODULE for erratum #843419

Commit df057cc7b4fa ("arm64: errata: add module build workaround for erratum #843419") sets CFLAGS_MODULE to ensure that the large memory model is used by the compiler when building kernel modules.

However, CFLAGS_MODULE is an environment variable and intended to be overridden on the command line, which appears to be the case with the Ubuntu kernel packaging system, so use KBUILD_CFLAGS_MODULE instead.

---
 arch/arm64/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/Makefile +1 -1
index f9914d7c1bb0..d10b5d483022 100644
@@ -42,7 +42,7 @@ endif
 CHECKFLAGS	+= -D__aarch64__
 
 ifeq ($(CONFIG_ARM64_ERRATUM_843419), y)
-CFLAGS_MODULE	+= -mcmodel=large
+KBUILD_CFLAGS_MODULE	+= -mcmodel=large
 endif
 
 # Default value
Signature · 1 line
2.1.4
maintainer
#1 lore raw

PATCH 1/1 arm64: errata: use KBUILD_CFLAGS_MODULE for erratum #843419

Quoted 11 lines · Will Deacon

Commit df057cc7b4fa ("arm64: errata: add module build workaround for erratum #843419") sets CFLAGS_MODULE to ensure that the large memory model is used by the compiler when building kernel modules.

However, CFLAGS_MODULE is an environment variable and intended to be overridden on the command line, which appears to be the case with the Ubuntu kernel packaging system, so use KBUILD_CFLAGS_MODULE instead.

Just you case you forgot, I think you also need:

Fixes df057cc7b4fa ("arm64: errata: add module build workaround for erratum #843419")
Signature · 1 line
Catalin
#2 lore raw

PATCH 1/1 arm64: errata: use KBUILD_CFLAGS_MODULE for erratum #843419

Quoted 9 lines · Catalin Marinas
Quoted 8 lines · Will Deacon

Commit df057cc7b4fa ("arm64: errata: add module build workaround for erratum #843419") sets CFLAGS_MODULE to ensure that the large memory model is used by the compiler when building kernel modules.

However, CFLAGS_MODULE is an environment variable and intended to be overridden on the command line, which appears to be the case with the Ubuntu kernel packaging system, so use KBUILD_CFLAGS_MODULE instead.

Quoted 8 lines
Quoted 3 lines

Just you case you forgot, I think you also need:

Fixes df057cc7b4fa ("arm64: errata: add module build workaround for erratum #843419")

Yup, got those suckers locally :)

Will

#3 lore raw

PATCH 1/1 arm64: errata: use KBUILD_CFLAGS_MODULE for erratum #843419

In reply to Will Deacon
Quoted 7 lines · Will Deacon

Commit df057cc7b4fa ("arm64: errata: add module build workaround for erratum #843419") sets CFLAGS_MODULE to ensure that the large memory model is used by the compiler when building kernel modules.

However, CFLAGS_MODULE is an environment variable and intended to be overridden on the command line, which appears to be the case with the Ubuntu kernel packaging system, so use KBUILD_CFLAGS_MODULE instead.

Oh - didn't notice you'd beat me to it :)

Quoted 3 lines

fwiw, I did a full Ubuntu build w/ this and can confirm modules load again.

Quoted 20 lines
---
 arch/arm64/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/Makefile +1 -2
index f9914d7c1bb0..d10b5d483022 100644
@@ -42,7 +42,7 @@ endif
 CHECKFLAGS     += -D__aarch64__
 
 ifeq ($(CONFIG_ARM64_ERRATUM_843419), y)
-CFLAGS_MODULE  += -mcmodel=large
+KBUILD_CFLAGS_MODULE   += -mcmodel=large
 endif
 
 # Default value
--

2.1.4