[PATCH] arm64: errata: use KBUILD_CFLAGS_MODULE for erratum #843419

Dann Frazier dann.frazier at canonical.com
Thu Oct 8 12:44:57 PDT 2015


On Thu, Oct 8, 2015 at 10:32 AM, Will Deacon <will.deacon at arm.com> wrote:
> 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 :)

> Cc: Ard Biesheuvel <ard.biesheuvel at linaro.org>
> Reported-by: Dann Frazier <dann.frazier at canonical.com>
> Signed-off-by: Will Deacon <will.deacon at arm.com>

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

Tested-by: dann frazier <dann.frazier at canonical.com>

> ---
>  arch/arm64/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index f9914d7c1bb0..d10b5d483022 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -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
>



More information about the linux-arm-kernel mailing list