diff options
author | Ingo Molnar <mingo@kernel.org> | 2021-11-16 06:13:05 +0100 |
---|---|---|
committer | Dave Hansen <dave.hansen@linux.intel.com> | 2021-12-03 09:30:45 -0800 |
commit | e1cd82a339024beda8439fb2e20718363ee989a8 (patch) | |
tree | 8edcd8ceb00ed27e4371987d2c18bbf415903fdc | |
parent | d58071a8a76d779eedab38033ae4c821c30295a5 (diff) | |
download | linux-e1cd82a339024beda8439fb2e20718363ee989a8.tar.gz linux-e1cd82a339024beda8439fb2e20718363ee989a8.tar.bz2 linux-e1cd82a339024beda8439fb2e20718363ee989a8.zip |
x86/mm: Add missing <asm/cpufeatures.h> dependency to <asm/page_64.h>
In the following commit:
025768a966a3 x86/cpu: Use alternative to generate the TASK_SIZE_MAX constant
... we added the new task_size_max() inline, which uses X86_FEATURE_LA57,
but doesn't include <asm/cpufeatures.h> which defines the constant.
Due to the way alternatives macros work currently this doesn't get reported as an
immediate build error, only as a link error, if a .c file happens to include
<asm/page.h> first:
> ld: kernel/fork.o:(.altinstructions+0x98): undefined reference to `X86_FEATURE_LA57'
In the current upstream kernel no .c file includes <asm/page.h> before including
some other header that includes <asm/cpufeatures.h>, which is why this dependency
bug went unnoticed.
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/include/asm/page_64.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/page_64.h b/arch/x86/include/asm/page_64.h index 4bde0dc66100..e9c86299b835 100644 --- a/arch/x86/include/asm/page_64.h +++ b/arch/x86/include/asm/page_64.h @@ -5,6 +5,7 @@ #include <asm/page_64_types.h> #ifndef __ASSEMBLY__ +#include <asm/cpufeatures.h> #include <asm/alternative.h> /* duplicated to the one in bootmem.h */ |