arm64: errata: use KBUILD_CFLAGS_MODULE for erratum #843419
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
@@ -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
Catalin Marinas
maintainerPATCH 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") setsCFLAGS_MODULEto ensure that the large memory model is used by the compiler when building kernel modules.However,
CFLAGS_MODULEis 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 useKBUILD_CFLAGS_MODULEinstead.Cc Ard Biesheuvel <[email protected]>Reported-by Dann Frazier <[email protected]>Signed-off-by Will Deacon <[email protected]>
Just you case you forgot, I think you also need:
Signature · 1 line
Catalin
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") setsCFLAGS_MODULEto ensure that the large memory model is used by the compiler when building kernel modules.However,
CFLAGS_MODULEis 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 useKBUILD_CFLAGS_MODULEinstead.
Quoted 8 lines
Quoted 3 lines
Cc Ard Biesheuvel <[email protected]>Reported-by Dann Frazier <[email protected]>Signed-off-by Will Deacon <[email protected]>Just you case you forgot, I think you also need:
Fixes df057cc7b4fa ("arm64: errata: add module build workaround for erratum #843419")Cc <[email protected]>
Yup, got those suckers locally :)
Will
PATCH 1/1 arm64: errata: use KBUILD_CFLAGS_MODULE for erratum #843419
In reply to Will DeaconQuoted 7 lines · Will Deacon
Commit
df057cc7b4fa("arm64: errata: add module build workaround for erratum #843419") setsCFLAGS_MODULEto ensure that the large memory model is used by the compiler when building kernel modules.However,
CFLAGS_MODULEis 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 useKBUILD_CFLAGS_MODULEinstead.
Oh - didn't notice you'd beat me to it :)
Quoted 3 lines
Cc Ard Biesheuvel <[email protected]>Reported-by Dann Frazier <[email protected]>Signed-off-by Will Deacon <[email protected]>
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@@ -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