summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-20 10:23:12 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-20 10:23:12 -1000
commit1bd2400fba444db006c1949f6ea02cbc5543cee7 (patch)
treef1aa93a5146eaf20018d6b1b75098d96263a02dc
parentf3b035ba59944ca48a2d5efce40a0c43e52fa97c (diff)
parent27441d76b3d6604de9162c4c24d034bcfe3249de (diff)
Merge tag 'x86_cleanups_for_v7.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cleanups from Borislav Petkov: - The usual pile of cleanups all over the place * tag 'x86_cleanups_for_v7.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/asm: Remove CR4 read fault handler x86/um: Remove unused <asm/required-features.h> header x86/cpu: Constify struct x86_cpu_id x86/asm/string_64: Remove unused linux/jump_label.h include x86/mtrr: Fix kernel-doc notation of amd_set_mtrr()
-rw-r--r--arch/x86/include/asm/special_insns.h13
-rw-r--r--arch/x86/include/asm/string_64.h1
-rw-r--r--arch/x86/kernel/cpu/common.c2
-rw-r--r--arch/x86/kernel/cpu/mtrr/amd.c9
-rw-r--r--arch/x86/um/asm/required-features.h9
5 files changed, 5 insertions, 29 deletions
diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h
index 46aa2c9c1bda..6c80f69cf62b 100644
--- a/arch/x86/include/asm/special_insns.h
+++ b/arch/x86/include/asm/special_insns.h
@@ -46,20 +46,7 @@ static __always_inline void native_write_cr3(unsigned long val)
static inline unsigned long native_read_cr4(void)
{
unsigned long val;
-#ifdef CONFIG_X86_32
- /*
- * This could fault if CR4 does not exist. Non-existent CR4
- * is functionally equivalent to CR4 == 0. Keep it simple and pretend
- * that CR4 == 0 on CPUs that don't have CR4.
- */
- asm volatile("1: mov %%cr4, %0\n"
- "2:\n"
- _ASM_EXTABLE(1b, 2b)
- : "=r" (val) : "0" (0));
-#else
- /* CR4 always exists on x86_64. */
asm volatile("mov %%cr4,%0" : "=r" (val));
-#endif
return val;
}
diff --git a/arch/x86/include/asm/string_64.h b/arch/x86/include/asm/string_64.h
index 4635616863f5..0ea680bf403a 100644
--- a/arch/x86/include/asm/string_64.h
+++ b/arch/x86/include/asm/string_64.h
@@ -3,7 +3,6 @@
#define _ASM_X86_STRING_64_H
#ifdef __KERNEL__
-#include <linux/jump_label.h>
/* Written 2002 by Andi Kleen */
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index c7352827f491..593ca8ce3894 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1427,7 +1427,7 @@ static bool __init vulnerable_to_its(u64 x86_arch_cap_msr)
return false;
}
-static struct x86_cpu_id cpu_latest_microcode[] = {
+static const struct x86_cpu_id cpu_latest_microcode[] __initconst = {
#include "microcode/intel-ucode-defs.h"
{}
};
diff --git a/arch/x86/kernel/cpu/mtrr/amd.c b/arch/x86/kernel/cpu/mtrr/amd.c
index a73715d6f05c..9e440e30c179 100644
--- a/arch/x86/kernel/cpu/mtrr/amd.c
+++ b/arch/x86/kernel/cpu/mtrr/amd.c
@@ -51,11 +51,10 @@ amd_get_mtrr(unsigned int reg, unsigned long *base,
/**
* amd_set_mtrr - Set variable MTRR register on the local CPU.
- *
- * @reg The register to set.
- * @base The base address of the region.
- * @size The size of the region. If this is 0 the region is disabled.
- * @type The type of the region.
+ * @reg: The register to set.
+ * @base: The base address of the region.
+ * @size: The size of the region. If this is 0 the region is disabled.
+ * @type: The type of the region.
*
* Returns nothing.
*/
diff --git a/arch/x86/um/asm/required-features.h b/arch/x86/um/asm/required-features.h
deleted file mode 100644
index dfb967b2d2f3..000000000000
--- a/arch/x86/um/asm/required-features.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __UM_REQUIRED_FEATURES_H
-#define __UM_REQUIRED_FEATURES_H
-
-/*
- * Nothing to see, just need something for the i386 and x86_64 asm
- * headers to include.
- */
-
-#endif