Skip to content

Commit e1cd82a

Browse files
Ingo Molnarhansendc
authored andcommitted
x86/mm: Add missing <asm/cpufeatures.h> dependency to <asm/page_64.h>
In the following commit: 025768a 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 <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent d58071a commit e1cd82a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/include/asm/page_64.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <asm/page_64_types.h>
66

77
#ifndef __ASSEMBLY__
8+
#include <asm/cpufeatures.h>
89
#include <asm/alternative.h>
910

1011
/* duplicated to the one in bootmem.h */

0 commit comments

Comments
 (0)