Skip to content

Commit 4bf5d56

Browse files
arndbKAGA-KOKO
authored andcommitted
x86/pti: Mark constant arrays as __initconst
I'm seeing build failures from the two newly introduced arrays that are marked 'const' and '__initdata', which are mutually exclusive: arch/x86/kernel/cpu/common.c:882:43: error: 'cpu_no_speculation' causes a section type conflict with 'e820_table_firmware_init' arch/x86/kernel/cpu/common.c:895:43: error: 'cpu_no_meltdown' causes a section type conflict with 'e820_table_firmware_init' The correct annotation is __initconst. Fixes: fec9434 ("x86/pti: Do not enable PTI on CPUs which are not vulnerable to Meltdown") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Ricardo Neri <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Thomas Garnier <[email protected]> Cc: David Woodhouse <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 9005c68 commit 4bf5d56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kernel/cpu/common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ static void identify_cpu_without_cpuid(struct cpuinfo_x86 *c)
900900
#endif
901901
}
902902

903-
static const __initdata struct x86_cpu_id cpu_no_speculation[] = {
903+
static const __initconst struct x86_cpu_id cpu_no_speculation[] = {
904904
{ X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_CEDARVIEW, X86_FEATURE_ANY },
905905
{ X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_CLOVERVIEW, X86_FEATURE_ANY },
906906
{ X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_LINCROFT, X86_FEATURE_ANY },
@@ -913,7 +913,7 @@ static const __initdata struct x86_cpu_id cpu_no_speculation[] = {
913913
{}
914914
};
915915

916-
static const __initdata struct x86_cpu_id cpu_no_meltdown[] = {
916+
static const __initconst struct x86_cpu_id cpu_no_meltdown[] = {
917917
{ X86_VENDOR_AMD },
918918
{}
919919
};

0 commit comments

Comments
 (0)