Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/msr: Add explicit includes of <asm/msr.h>

For historic reasons there are some TSC-related functions in the
<asm/msr.h> header, even though there's an <asm/tsc.h> header.

To facilitate the relocation of rdtsc{,_ordered}() from <asm/msr.h>
to <asm/tsc.h> and to eventually eliminate the inclusion of
<asm/msr.h> in <asm/tsc.h>, add an explicit <asm/msr.h> dependency
to the source files that reference definitions from <asm/msr.h>.

[ mingo: Clarified the changelog. ]

Signed-off-by: Xin Li (Intel) <xin@zytor.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Uros Bizjak <ubizjak@gmail.com>
Link: https://lore.kernel.org/r/20250501054241.1245648-1-xin@zytor.com

authored by

Xin Li (Intel) and committed by
Ingo Molnar
efef7f18 bdfda83a

+139 -9
+1
arch/x86/coco/sev/core.c
··· 43 43 #include <asm/apic.h> 44 44 #include <asm/cpuid.h> 45 45 #include <asm/cmdline.h> 46 + #include <asm/msr.h> 46 47 47 48 #define DR7_RESET_VALUE 0x400 48 49
+1
arch/x86/events/amd/core.c
··· 9 9 #include <linux/jiffies.h> 10 10 #include <asm/apicdef.h> 11 11 #include <asm/apic.h> 12 + #include <asm/msr.h> 12 13 #include <asm/nmi.h> 13 14 14 15 #include "../perf_event.h"
+1
arch/x86/events/amd/ibs.c
··· 15 15 #include <linux/sched/clock.h> 16 16 17 17 #include <asm/apic.h> 18 + #include <asm/msr.h> 18 19 19 20 #include "../perf_event.h" 20 21
+2
arch/x86/events/amd/iommu.c
··· 16 16 #include <linux/slab.h> 17 17 #include <linux/amd-iommu.h> 18 18 19 + #include <asm/msr.h> 20 + 19 21 #include "../perf_event.h" 20 22 #include "iommu.h" 21 23
+1
arch/x86/events/amd/lbr.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <linux/perf_event.h> 3 + #include <asm/msr.h> 3 4 #include <asm/perf_event.h> 4 5 5 6 #include "../perf_event.h"
+1
arch/x86/events/amd/power.c
··· 11 11 #include <linux/slab.h> 12 12 #include <linux/perf_event.h> 13 13 #include <asm/cpu_device_id.h> 14 + #include <asm/msr.h> 14 15 #include "../perf_event.h" 15 16 16 17 /* Event code: LSB 8 bits, passed in attr->config any other bit is reserved. */
+1
arch/x86/events/core.c
··· 32 32 33 33 #include <asm/apic.h> 34 34 #include <asm/stacktrace.h> 35 + #include <asm/msr.h> 35 36 #include <asm/nmi.h> 36 37 #include <asm/smp.h> 37 38 #include <asm/alternative.h>
+1
arch/x86/events/intel/bts.c
··· 17 17 18 18 #include <linux/sizes.h> 19 19 #include <asm/perf_event.h> 20 + #include <asm/msr.h> 20 21 21 22 #include "../perf_event.h" 22 23
+1
arch/x86/events/intel/core.c
··· 23 23 #include <asm/intel_pt.h> 24 24 #include <asm/apic.h> 25 25 #include <asm/cpu_device_id.h> 26 + #include <asm/msr.h> 26 27 27 28 #include "../perf_event.h" 28 29
+1
arch/x86/events/intel/cstate.c
··· 111 111 #include <linux/nospec.h> 112 112 #include <asm/cpu_device_id.h> 113 113 #include <asm/intel-family.h> 114 + #include <asm/msr.h> 114 115 #include "../perf_event.h" 115 116 #include "../probe.h" 116 117
+1
arch/x86/events/intel/ds.c
··· 10 10 #include <asm/tlbflush.h> 11 11 #include <asm/insn.h> 12 12 #include <asm/io.h> 13 + #include <asm/msr.h> 13 14 #include <asm/timer.h> 14 15 15 16 #include "../perf_event.h"
+1
arch/x86/events/intel/knc.c
··· 5 5 #include <linux/types.h> 6 6 7 7 #include <asm/hardirq.h> 8 + #include <asm/msr.h> 8 9 9 10 #include "../perf_event.h" 10 11
+1
arch/x86/events/intel/p4.c
··· 13 13 #include <asm/cpu_device_id.h> 14 14 #include <asm/hardirq.h> 15 15 #include <asm/apic.h> 16 + #include <asm/msr.h> 16 17 17 18 #include "../perf_event.h" 18 19
+1
arch/x86/events/intel/p6.c
··· 3 3 #include <linux/types.h> 4 4 5 5 #include <asm/cpu_device_id.h> 6 + #include <asm/msr.h> 6 7 7 8 #include "../perf_event.h" 8 9
+1
arch/x86/events/intel/pt.c
··· 24 24 #include <asm/io.h> 25 25 #include <asm/intel_pt.h> 26 26 #include <asm/cpu_device_id.h> 27 + #include <asm/msr.h> 27 28 28 29 #include "../perf_event.h" 29 30 #include "pt.h"
+1
arch/x86/events/intel/uncore.c
··· 3 3 4 4 #include <asm/cpu_device_id.h> 5 5 #include <asm/intel-family.h> 6 + #include <asm/msr.h> 6 7 #include "uncore.h" 7 8 #include "uncore_discovery.h" 8 9
+1
arch/x86/events/intel/uncore_discovery.c
··· 5 5 */ 6 6 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 7 7 8 + #include <asm/msr.h> 8 9 #include "uncore.h" 9 10 #include "uncore_discovery.h" 10 11
+1
arch/x86/events/intel/uncore_nhmex.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* Nehalem-EX/Westmere-EX uncore support */ 3 3 #include <asm/cpu_device_id.h> 4 + #include <asm/msr.h> 4 5 #include "uncore.h" 5 6 6 7 /* NHM-EX event control */
+1
arch/x86/events/intel/uncore_snb.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* Nehalem/SandBridge/Haswell/Broadwell/Skylake uncore support */ 3 + #include <asm/msr.h> 3 4 #include "uncore.h" 4 5 #include "uncore_discovery.h" 5 6
+1
arch/x86/events/intel/uncore_snbep.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* SandyBridge-EP/IvyTown uncore support */ 3 3 #include <asm/cpu_device_id.h> 4 + #include <asm/msr.h> 4 5 #include "uncore.h" 5 6 #include "uncore_discovery.h" 6 7
+2
arch/x86/events/msr.c
··· 3 3 #include <linux/sysfs.h> 4 4 #include <linux/nospec.h> 5 5 #include <asm/cpu_device_id.h> 6 + #include <asm/msr.h> 7 + 6 8 #include "probe.h" 7 9 8 10 enum perf_msr_id {
+1
arch/x86/events/perf_event.h
··· 17 17 #include <asm/fpu/xstate.h> 18 18 #include <asm/intel_ds.h> 19 19 #include <asm/cpu.h> 20 + #include <asm/msr.h> 20 21 21 22 /* To enable MSR tracing please use the generic trace points. */ 22 23
+2
arch/x86/events/probe.c
··· 2 2 #include <linux/export.h> 3 3 #include <linux/types.h> 4 4 #include <linux/bits.h> 5 + 6 + #include <asm/msr.h> 5 7 #include "probe.h" 6 8 7 9 static umode_t
+1
arch/x86/events/rapl.c
··· 65 65 #include <linux/nospec.h> 66 66 #include <asm/cpu_device_id.h> 67 67 #include <asm/intel-family.h> 68 + #include <asm/msr.h> 68 69 #include "perf_event.h" 69 70 #include "probe.h" 70 71
+1
arch/x86/events/utils.c
··· 2 2 #include <asm/insn.h> 3 3 #include <linux/mm.h> 4 4 5 + #include <asm/msr.h> 5 6 #include "perf_event.h" 6 7 7 8 static int decode_branch_type(struct insn *insn)
+1
arch/x86/events/zhaoxin/core.c
··· 15 15 #include <asm/cpufeature.h> 16 16 #include <asm/hardirq.h> 17 17 #include <asm/apic.h> 18 + #include <asm/msr.h> 18 19 19 20 #include "../perf_event.h" 20 21
+1
arch/x86/hyperv/hv_apic.c
··· 28 28 #include <asm/hypervisor.h> 29 29 #include <asm/mshyperv.h> 30 30 #include <asm/apic.h> 31 + #include <asm/msr.h> 31 32 32 33 #include <asm/trace/hyperv.h> 33 34
+1
arch/x86/hyperv/hv_init.c
··· 21 21 #include <asm/hypervisor.h> 22 22 #include <hyperv/hvhdk.h> 23 23 #include <asm/mshyperv.h> 24 + #include <asm/msr.h> 24 25 #include <asm/idtentry.h> 25 26 #include <asm/set_memory.h> 26 27 #include <linux/kexec.h>
+1
arch/x86/hyperv/hv_spinlock.c
··· 15 15 #include <asm/mshyperv.h> 16 16 #include <asm/paravirt.h> 17 17 #include <asm/apic.h> 18 + #include <asm/msr.h> 18 19 19 20 static bool hv_pvspin __initdata = true; 20 21
+1
arch/x86/hyperv/hv_vtl.c
··· 11 11 #include <asm/desc.h> 12 12 #include <asm/i8259.h> 13 13 #include <asm/mshyperv.h> 14 + #include <asm/msr.h> 14 15 #include <asm/realmode.h> 15 16 #include <asm/reboot.h> 16 17 #include <../kernel/smpboot.h>
+1
arch/x86/hyperv/ivm.c
··· 22 22 #include <asm/realmode.h> 23 23 #include <asm/e820/api.h> 24 24 #include <asm/desc.h> 25 + #include <asm/msr.h> 25 26 #include <uapi/asm/vmx.h> 26 27 27 28 #ifdef CONFIG_AMD_MEM_ENCRYPT
+1
arch/x86/include/asm/fred.h
··· 9 9 #include <linux/const.h> 10 10 11 11 #include <asm/asm.h> 12 + #include <asm/msr.h> 12 13 #include <asm/trapnr.h> 13 14 14 15 /*
+1
arch/x86/include/asm/kvm_host.h
··· 34 34 #include <asm/desc.h> 35 35 #include <asm/mtrr.h> 36 36 #include <asm/msr-index.h> 37 + #include <asm/msr.h> 37 38 #include <asm/asm.h> 38 39 #include <asm/irq_remapping.h> 39 40 #include <asm/kvm_page_track.h>
+2
arch/x86/include/asm/microcode.h
··· 2 2 #ifndef _ASM_X86_MICROCODE_H 3 3 #define _ASM_X86_MICROCODE_H 4 4 5 + #include <asm/msr.h> 6 + 5 7 struct cpu_signature { 6 8 unsigned int sig; 7 9 unsigned int pf;
+1
arch/x86/include/asm/mshyperv.h
··· 8 8 #include <linux/io.h> 9 9 #include <asm/nospec-branch.h> 10 10 #include <asm/paravirt.h> 11 + #include <asm/msr.h> 11 12 #include <hyperv/hvhdk.h> 12 13 13 14 /*
+1
arch/x86/include/asm/msr.h
··· 12 12 #include <uapi/asm/msr.h> 13 13 #include <asm/shared/msr.h> 14 14 15 + #include <linux/types.h> 15 16 #include <linux/percpu.h> 16 17 17 18 struct msr_info {
+2
arch/x86/include/asm/resctrl.h
··· 9 9 #include <linux/resctrl_types.h> 10 10 #include <linux/sched.h> 11 11 12 + #include <asm/msr.h> 13 + 12 14 /* 13 15 * This value can never be a valid CLOSID, and is used when mapping a 14 16 * (closid, rmid) pair to an index and back. On x86 only the RMID is
+1
arch/x86/include/asm/suspend_32.h
··· 9 9 10 10 #include <asm/desc.h> 11 11 #include <asm/fpu/api.h> 12 + #include <asm/msr.h> 12 13 13 14 /* image of the saved processor state */ 14 15 struct saved_context {
+1
arch/x86/include/asm/suspend_64.h
··· 9 9 10 10 #include <asm/desc.h> 11 11 #include <asm/fpu/api.h> 12 + #include <asm/msr.h> 12 13 13 14 /* 14 15 * Image of the saved processor state, used by the low level ACPI suspend to
+2
arch/x86/include/asm/switch_to.h
··· 52 52 } while (0) 53 53 54 54 #ifdef CONFIG_X86_32 55 + #include <asm/msr.h> 56 + 55 57 static inline void refresh_sysenter_cs(struct thread_struct *thread) 56 58 { 57 59 /* Only happens when SEP is enabled, no need to test "SEP"arately: */
+1
arch/x86/kernel/acpi/sleep.c
··· 16 16 #include <asm/cacheflush.h> 17 17 #include <asm/realmode.h> 18 18 #include <asm/hypervisor.h> 19 + #include <asm/msr.h> 19 20 #include <asm/smp.h> 20 21 21 22 #include <linux/ftrace.h>
+1
arch/x86/kernel/apic/apic.c
··· 59 59 #include <asm/time.h> 60 60 #include <asm/smp.h> 61 61 #include <asm/mce.h> 62 + #include <asm/msr.h> 62 63 #include <asm/tsc.h> 63 64 #include <asm/hypervisor.h> 64 65 #include <asm/cpu_device_id.h>
+1
arch/x86/kernel/apic/apic_numachip.c
··· 14 14 #include <linux/init.h> 15 15 #include <linux/pgtable.h> 16 16 17 + #include <asm/msr.h> 17 18 #include <asm/numachip/numachip.h> 18 19 #include <asm/numachip/numachip_csr.h> 19 20
+1
arch/x86/kernel/cet.c
··· 2 2 3 3 #include <linux/ptrace.h> 4 4 #include <asm/bugs.h> 5 + #include <asm/msr.h> 5 6 #include <asm/traps.h> 6 7 7 8 enum cp_error_code {
+1
arch/x86/kernel/cpu/amd.c
··· 21 21 #include <asm/delay.h> 22 22 #include <asm/debugreg.h> 23 23 #include <asm/resctrl.h> 24 + #include <asm/msr.h> 24 25 #include <asm/sev.h> 25 26 26 27 #ifdef CONFIG_X86_64
+1
arch/x86/kernel/cpu/aperfmperf.c
··· 20 20 #include <asm/cpu.h> 21 21 #include <asm/cpu_device_id.h> 22 22 #include <asm/intel-family.h> 23 + #include <asm/msr.h> 23 24 24 25 #include "cpu.h" 25 26
+1
arch/x86/kernel/cpu/bus_lock.c
··· 10 10 #include <asm/cmdline.h> 11 11 #include <asm/traps.h> 12 12 #include <asm/cpu.h> 13 + #include <asm/msr.h> 13 14 14 15 enum split_lock_detect_state { 15 16 sld_off = 0,
+1
arch/x86/kernel/cpu/feat_ctl.c
··· 4 4 #include <asm/cpu.h> 5 5 #include <asm/cpufeature.h> 6 6 #include <asm/msr-index.h> 7 + #include <asm/msr.h> 7 8 #include <asm/processor.h> 8 9 #include <asm/vmx.h> 9 10
+1
arch/x86/kernel/cpu/hygon.c
··· 15 15 #include <asm/cacheinfo.h> 16 16 #include <asm/spec-ctrl.h> 17 17 #include <asm/delay.h> 18 + #include <asm/msr.h> 18 19 19 20 #include "cpu.h" 20 21
+1
arch/x86/kernel/cpu/mce/inject.c
··· 28 28 #include <asm/apic.h> 29 29 #include <asm/irq_vectors.h> 30 30 #include <asm/mce.h> 31 + #include <asm/msr.h> 31 32 #include <asm/nmi.h> 32 33 #include <asm/smp.h> 33 34
+1
arch/x86/kernel/cpu/microcode/core.c
··· 37 37 #include <asm/perf_event.h> 38 38 #include <asm/processor.h> 39 39 #include <asm/cmdline.h> 40 + #include <asm/msr.h> 40 41 #include <asm/setup.h> 41 42 42 43 #include "internal.h"
+1
arch/x86/kernel/cpu/mshyperv.c
··· 30 30 #include <asm/reboot.h> 31 31 #include <asm/nmi.h> 32 32 #include <clocksource/hyperv_timer.h> 33 + #include <asm/msr.h> 33 34 #include <asm/numa.h> 34 35 #include <asm/svm.h> 35 36
+1
arch/x86/kernel/cpu/resctrl/core.c
··· 22 22 #include <linux/cpuhotplug.h> 23 23 24 24 #include <asm/cpu_device_id.h> 25 + #include <asm/msr.h> 25 26 #include <asm/resctrl.h> 26 27 #include "internal.h" 27 28
+1
arch/x86/kernel/cpu/resctrl/monitor.c
··· 23 23 #include <linux/slab.h> 24 24 25 25 #include <asm/cpu_device_id.h> 26 + #include <asm/msr.h> 26 27 #include <asm/resctrl.h> 27 28 28 29 #include "internal.h"
+1
arch/x86/kernel/cpu/resctrl/pseudo_lock.c
··· 25 25 #include <asm/cpu_device_id.h> 26 26 #include <asm/resctrl.h> 27 27 #include <asm/perf_event.h> 28 + #include <asm/msr.h> 28 29 29 30 #include "../../events/perf_event.h" /* For X86_CONFIG() */ 30 31 #include "internal.h"
+1
arch/x86/kernel/cpu/resctrl/rdtgroup.c
··· 28 28 29 29 #include <uapi/linux/magic.h> 30 30 31 + #include <asm/msr.h> 31 32 #include <asm/resctrl.h> 32 33 #include "internal.h" 33 34
+1
arch/x86/kernel/cpu/sgx/main.c
··· 14 14 #include <linux/slab.h> 15 15 #include <linux/sysfs.h> 16 16 #include <linux/vmalloc.h> 17 + #include <asm/msr.h> 17 18 #include <asm/sgx.h> 18 19 #include "driver.h" 19 20 #include "encl.h"
+1
arch/x86/kernel/cpu/topology.c
··· 30 30 #include <asm/hypervisor.h> 31 31 #include <asm/io_apic.h> 32 32 #include <asm/mpspec.h> 33 + #include <asm/msr.h> 33 34 #include <asm/smp.h> 34 35 35 36 #include "cpu.h"
+1
arch/x86/kernel/cpu/topology_amd.c
··· 3 3 4 4 #include <asm/apic.h> 5 5 #include <asm/memtype.h> 6 + #include <asm/msr.h> 6 7 #include <asm/processor.h> 7 8 8 9 #include "cpu.h"
+1
arch/x86/kernel/cpu/tsx.c
··· 12 12 13 13 #include <asm/cmdline.h> 14 14 #include <asm/cpu.h> 15 + #include <asm/msr.h> 15 16 16 17 #include "cpu.h" 17 18
+1
arch/x86/kernel/cpu/zhaoxin.c
··· 4 4 5 5 #include <asm/cpu.h> 6 6 #include <asm/cpufeature.h> 7 + #include <asm/msr.h> 7 8 8 9 #include "cpu.h" 9 10
+1
arch/x86/kernel/fpu/core.c
··· 11 11 #include <asm/fpu/sched.h> 12 12 #include <asm/fpu/signal.h> 13 13 #include <asm/fpu/types.h> 14 + #include <asm/msr.h> 14 15 #include <asm/traps.h> 15 16 #include <asm/irq_regs.h> 16 17
+1
arch/x86/kernel/fpu/xstate.c
··· 21 21 #include <asm/fpu/xcr.h> 22 22 23 23 #include <asm/cpuid.h> 24 + #include <asm/msr.h> 24 25 #include <asm/tlbflush.h> 25 26 #include <asm/prctl.h> 26 27 #include <asm/elf.h>
+1
arch/x86/kernel/fpu/xstate.h
··· 5 5 #include <asm/cpufeature.h> 6 6 #include <asm/fpu/xstate.h> 7 7 #include <asm/fpu/xcr.h> 8 + #include <asm/msr.h> 8 9 9 10 #ifdef CONFIG_X86_64 10 11 DECLARE_PER_CPU(u64, xfd_state);
+1
arch/x86/kernel/fred.c
··· 3 3 4 4 #include <asm/desc.h> 5 5 #include <asm/fred.h> 6 + #include <asm/msr.h> 6 7 #include <asm/tlbflush.h> 7 8 #include <asm/traps.h> 8 9
+1
arch/x86/kernel/hpet.c
··· 12 12 #include <asm/hpet.h> 13 13 #include <asm/time.h> 14 14 #include <asm/mwait.h> 15 + #include <asm/msr.h> 15 16 16 17 #undef pr_fmt 17 18 #define pr_fmt(fmt) "hpet: " fmt
+1
arch/x86/kernel/kvm.c
··· 40 40 #include <asm/mtrr.h> 41 41 #include <asm/tlb.h> 42 42 #include <asm/cpuidle_haltpoll.h> 43 + #include <asm/msr.h> 43 44 #include <asm/ptrace.h> 44 45 #include <asm/reboot.h> 45 46 #include <asm/svm.h>
+1
arch/x86/kernel/paravirt.c
··· 33 33 #include <asm/tlb.h> 34 34 #include <asm/io_bitmap.h> 35 35 #include <asm/gsseg.h> 36 + #include <asm/msr.h> 36 37 37 38 /* stub always returning 0. */ 38 39 DEFINE_ASM_FUNC(paravirt_ret0, "xor %eax,%eax", .entry.text);
+1
arch/x86/kernel/process.c
··· 52 52 #include <asm/unwind.h> 53 53 #include <asm/tdx.h> 54 54 #include <asm/mmu_context.h> 55 + #include <asm/msr.h> 55 56 #include <asm/shstk.h> 56 57 57 58 #include "process.h"
+1
arch/x86/kernel/process_64.c
··· 57 57 #include <asm/unistd.h> 58 58 #include <asm/fsgsbase.h> 59 59 #include <asm/fred.h> 60 + #include <asm/msr.h> 60 61 #ifdef CONFIG_IA32_EMULATION 61 62 /* Not included via unistd.h */ 62 63 #include <asm/unistd_32_ia32.h>
+1 -1
arch/x86/kernel/trace_clock.c
··· 4 4 */ 5 5 #include <asm/trace_clock.h> 6 6 #include <asm/barrier.h> 7 - #include <asm/msr.h> 7 + #include <asm/tsc.h> 8 8 9 9 /* 10 10 * trace_clock_x86_tsc(): A clock that is just the cycle counter.
+1
arch/x86/kernel/traps.c
··· 68 68 #include <asm/vdso.h> 69 69 #include <asm/tdx.h> 70 70 #include <asm/cfi.h> 71 + #include <asm/msr.h> 71 72 72 73 #ifdef CONFIG_X86_64 73 74 #include <asm/x86_init.h>
+1
arch/x86/kernel/tsc.c
··· 29 29 #include <asm/apic.h> 30 30 #include <asm/cpu_device_id.h> 31 31 #include <asm/i8259.h> 32 + #include <asm/msr.h> 32 33 #include <asm/topology.h> 33 34 #include <asm/uv/uv.h> 34 35 #include <asm/sev.h>
+1
arch/x86/kernel/tsc_sync.c
··· 21 21 #include <linux/kernel.h> 22 22 #include <linux/smp.h> 23 23 #include <linux/nmi.h> 24 + #include <asm/msr.h> 24 25 #include <asm/tsc.h> 25 26 26 27 struct tsc_adjust {
+1
arch/x86/kvm/svm/avic.c
··· 20 20 #include <linux/kvm_host.h> 21 21 22 22 #include <asm/irq_remapping.h> 23 + #include <asm/msr.h> 23 24 24 25 #include "trace.h" 25 26 #include "lapic.h"
+1
arch/x86/kvm/svm/sev.c
··· 26 26 #include <asm/fpu/xcr.h> 27 27 #include <asm/fpu/xstate.h> 28 28 #include <asm/debugreg.h> 29 + #include <asm/msr.h> 29 30 #include <asm/sev.h> 30 31 31 32 #include "mmu.h"
+1
arch/x86/kvm/svm/svm.c
··· 31 31 #include <linux/string_choices.h> 32 32 33 33 #include <asm/apic.h> 34 + #include <asm/msr.h> 34 35 #include <asm/perf_event.h> 35 36 #include <asm/tlbflush.h> 36 37 #include <asm/desc.h>
+1
arch/x86/kvm/vmx/nested.c
··· 6 6 7 7 #include <asm/debugreg.h> 8 8 #include <asm/mmu_context.h> 9 + #include <asm/msr.h> 9 10 10 11 #include "x86.h" 11 12 #include "cpuid.h"
+1
arch/x86/kvm/vmx/pmu_intel.c
··· 13 13 #include <linux/types.h> 14 14 #include <linux/kvm_host.h> 15 15 #include <linux/perf_event.h> 16 + #include <asm/msr.h> 16 17 #include <asm/perf_event.h> 17 18 #include "x86.h" 18 19 #include "cpuid.h"
+1
arch/x86/kvm/vmx/sgx.c
··· 2 2 /* Copyright(c) 2021 Intel Corporation. */ 3 3 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 4 4 5 + #include <asm/msr.h> 5 6 #include <asm/sgx.h> 6 7 7 8 #include "x86.h"
+1
arch/x86/kvm/vmx/vmx.c
··· 46 46 #include <asm/perf_event.h> 47 47 #include <asm/mmu_context.h> 48 48 #include <asm/mshyperv.h> 49 + #include <asm/msr.h> 49 50 #include <asm/mwait.h> 50 51 #include <asm/spec-ctrl.h> 51 52 #include <asm/vmx.h>
+1
arch/x86/lib/insn-eval.c
··· 13 13 #include <asm/insn.h> 14 14 #include <asm/insn-eval.h> 15 15 #include <asm/ldt.h> 16 + #include <asm/msr.h> 16 17 #include <asm/vm86.h> 17 18 18 19 #undef pr_fmt
+1 -1
arch/x86/lib/kaslr.c
··· 8 8 */ 9 9 #include <asm/asm.h> 10 10 #include <asm/kaslr.h> 11 - #include <asm/msr.h> 11 + #include <asm/tsc.h> 12 12 #include <asm/archrandom.h> 13 13 #include <asm/e820/api.h> 14 14 #include <asm/shared/io.h>
+1
arch/x86/mm/tlb.c
··· 19 19 #include <asm/cache.h> 20 20 #include <asm/cacheflush.h> 21 21 #include <asm/apic.h> 22 + #include <asm/msr.h> 22 23 #include <asm/perf_event.h> 23 24 #include <asm/tlb.h> 24 25
+3 -2
arch/x86/pci/mmconfig-shared.c
··· 22 22 #include <linux/slab.h> 23 23 #include <linux/mutex.h> 24 24 #include <linux/rculist.h> 25 - #include <asm/e820/api.h> 26 - #include <asm/pci_x86.h> 27 25 #include <asm/acpi.h> 26 + #include <asm/e820/api.h> 27 + #include <asm/msr.h> 28 + #include <asm/pci_x86.h> 28 29 29 30 /* Indicate if the ECAM resources have been placed into the resource table */ 30 31 static bool pci_mmcfg_running_state;
+1
arch/x86/power/cpu.c
··· 27 27 #include <asm/mmu_context.h> 28 28 #include <asm/cpu_device_id.h> 29 29 #include <asm/microcode.h> 30 + #include <asm/msr.h> 30 31 #include <asm/fred.h> 31 32 32 33 #ifdef CONFIG_X86_32
+1
arch/x86/realmode/init.c
··· 9 9 #include <asm/realmode.h> 10 10 #include <asm/tlbflush.h> 11 11 #include <asm/crash.h> 12 + #include <asm/msr.h> 12 13 #include <asm/sev.h> 13 14 14 15 struct real_mode_header *real_mode_header;
+1
arch/x86/virt/svm/sev.c
··· 30 30 #include <asm/cpuid.h> 31 31 #include <asm/cmdline.h> 32 32 #include <asm/iommu.h> 33 + #include <asm/msr.h> 33 34 34 35 /* 35 36 * The RMP entry information as returned by the RMPREAD instruction.
+1
arch/x86/xen/enlighten_pv.c
··· 61 61 #include <asm/processor.h> 62 62 #include <asm/proto.h> 63 63 #include <asm/msr-index.h> 64 + #include <asm/msr.h> 64 65 #include <asm/traps.h> 65 66 #include <asm/setup.h> 66 67 #include <asm/desc.h>
+1
arch/x86/xen/pmu.c
··· 2 2 #include <linux/types.h> 3 3 #include <linux/interrupt.h> 4 4 5 + #include <asm/msr.h> 5 6 #include <asm/xen/hypercall.h> 6 7 #include <xen/xen.h> 7 8 #include <xen/page.h>
+1
arch/x86/xen/suspend.c
··· 13 13 #include <asm/xen/hypercall.h> 14 14 #include <asm/xen/page.h> 15 15 #include <asm/fixmap.h> 16 + #include <asm/msr.h> 16 17 17 18 #include "xen-ops.h" 18 19
-2
drivers/accel/habanalabs/common/habanalabs_ioctl.c
··· 17 17 #include <linux/uaccess.h> 18 18 #include <linux/vmalloc.h> 19 19 20 - #include <asm/msr.h> 21 - 22 20 /* make sure there is space for all the signed info */ 23 21 static_assert(sizeof(struct cpucp_info) <= SEC_DEV_INFO_BUF_SZ); 24 22
+1
drivers/acpi/acpi_extlog.c
··· 15 15 #include <acpi/ghes.h> 16 16 #include <asm/cpu.h> 17 17 #include <asm/mce.h> 18 + #include <asm/msr.h> 18 19 19 20 #include "apei/apei-internal.h" 20 21 #include <ras/ras_event.h>
+1
drivers/acpi/processor_perflib.c
··· 20 20 #include <acpi/processor.h> 21 21 #ifdef CONFIG_X86 22 22 #include <asm/cpufeature.h> 23 + #include <asm/msr.h> 23 24 #endif 24 25 25 26 #define ACPI_PROCESSOR_FILE_PERFORMANCE "performance"
+5 -1
drivers/acpi/processor_throttling.c
··· 18 18 #include <linux/sched.h> 19 19 #include <linux/cpufreq.h> 20 20 #include <linux/acpi.h> 21 + #include <linux/uaccess.h> 21 22 #include <acpi/processor.h> 22 23 #include <asm/io.h> 23 - #include <linux/uaccess.h> 24 + #include <asm/asm.h> 25 + #ifdef CONFIG_X86 26 + #include <asm/msr.h> 27 + #endif 24 28 25 29 /* ignore_tpc: 26 30 * 0 -> acpi processor driver doesn't ignore _TPC values
+1
drivers/char/agp/nvidia-agp.c
··· 11 11 #include <linux/page-flags.h> 12 12 #include <linux/mm.h> 13 13 #include <linux/jiffies.h> 14 + #include <asm/msr.h> 14 15 #include "agp.h" 15 16 16 17 /* NVIDIA registers */
+2
drivers/cpufreq/amd-pstate-ut.c
··· 31 31 32 32 #include <acpi/cppc_acpi.h> 33 33 34 + #include <asm/msr.h> 35 + 34 36 #include "amd-pstate.h" 35 37 36 38
-1
drivers/cpufreq/elanfreq.c
··· 21 21 #include <linux/cpufreq.h> 22 22 23 23 #include <asm/cpu_device_id.h> 24 - #include <asm/msr.h> 25 24 #include <linux/timex.h> 26 25 #include <linux/io.h> 27 26
-1
drivers/cpufreq/sc520_freq.c
··· 21 21 #include <linux/io.h> 22 22 23 23 #include <asm/cpu_device_id.h> 24 - #include <asm/msr.h> 25 24 26 25 #define MMCR_BASE 0xfffef000 /* The default base address */ 27 26 #define OFFS_CPUCTL 0x2 /* CPU Control Register */
+1
drivers/crypto/ccp/sev-dev.c
··· 33 33 #include <asm/cacheflush.h> 34 34 #include <asm/e820/types.h> 35 35 #include <asm/sev.h> 36 + #include <asm/msr.h> 36 37 37 38 #include "psp-dev.h" 38 39 #include "sev-dev.h"
+1
drivers/edac/ie31200_edac.c
··· 52 52 53 53 #include <linux/io-64-nonatomic-lo-hi.h> 54 54 #include <asm/mce.h> 55 + #include <asm/msr.h> 55 56 #include "edac_module.h" 56 57 57 58 #define EDAC_MOD_STR "ie31200_edac"
+1
drivers/edac/mce_amd.c
··· 3 3 #include <linux/slab.h> 4 4 5 5 #include <asm/cpu.h> 6 + #include <asm/msr.h> 6 7 7 8 #include "mce_amd.h" 8 9
+4
drivers/hwmon/hwmon-vid.c
··· 15 15 #include <linux/kernel.h> 16 16 #include <linux/hwmon-vid.h> 17 17 18 + #ifdef CONFIG_X86 19 + #include <asm/msr.h> 20 + #endif 21 + 18 22 /* 19 23 * Common code for decoding VID pins. 20 24 *
+1
drivers/idle/intel_idle.c
··· 56 56 #include <asm/intel-family.h> 57 57 #include <asm/mwait.h> 58 58 #include <asm/spec-ctrl.h> 59 + #include <asm/msr.h> 59 60 #include <asm/tsc.h> 60 61 #include <asm/fpu/api.h> 61 62 #include <asm/smp.h>
+1
drivers/misc/cs5535-mfgpt.c
··· 16 16 #include <linux/platform_device.h> 17 17 #include <linux/cs5535.h> 18 18 #include <linux/slab.h> 19 + #include <asm/msr.h> 19 20 20 21 #define DRV_NAME "cs5535-mfgpt" 21 22
+4
drivers/net/vmxnet3/vmxnet3_drv.c
··· 27 27 #include <linux/module.h> 28 28 #include <net/ip6_checksum.h> 29 29 30 + #ifdef CONFIG_X86 31 + #include <asm/msr.h> 32 + #endif 33 + 30 34 #include "vmxnet3_int.h" 31 35 #include "vmxnet3_xdp.h" 32 36
+1
drivers/platform/x86/intel/ifs/core.c
··· 8 8 #include <linux/slab.h> 9 9 10 10 #include <asm/cpu_device_id.h> 11 + #include <asm/msr.h> 11 12 12 13 #include "ifs.h" 13 14
+1
drivers/platform/x86/intel/ifs/load.c
··· 5 5 #include <linux/sizes.h> 6 6 #include <asm/cpu.h> 7 7 #include <asm/microcode.h> 8 + #include <asm/msr.h> 8 9 9 10 #include "ifs.h" 10 11
+1
drivers/platform/x86/intel/ifs/runtest.c
··· 7 7 #include <linux/nmi.h> 8 8 #include <linux/slab.h> 9 9 #include <linux/stop_machine.h> 10 + #include <asm/msr.h> 10 11 11 12 #include "ifs.h" 12 13
+1
drivers/platform/x86/intel/pmc/cnp.c
··· 10 10 11 11 #include <linux/smp.h> 12 12 #include <linux/suspend.h> 13 + #include <asm/msr.h> 13 14 #include "core.h" 14 15 15 16 /* Cannon Lake: PGD PFET Enable Ack Status Register(s) bitmap */
+1
drivers/platform/x86/intel/speed_select_if/isst_if_common.c
··· 21 21 22 22 #include <asm/cpu_device_id.h> 23 23 #include <asm/intel-family.h> 24 + #include <asm/msr.h> 24 25 25 26 #include "isst_if_common.h" 26 27
+1
drivers/platform/x86/intel/speed_select_if/isst_if_mbox_msr.c
··· 18 18 #include <uapi/linux/isst_if.h> 19 19 #include <asm/cpu_device_id.h> 20 20 #include <asm/intel-family.h> 21 + #include <asm/msr.h> 21 22 22 23 #include "isst_if_common.h" 23 24
+1
drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
··· 27 27 #include <linux/kernel.h> 28 28 #include <linux/minmax.h> 29 29 #include <linux/module.h> 30 + #include <asm/msr.h> 30 31 #include <uapi/linux/isst_if.h> 31 32 32 33 #include "isst_tpmi_core.h"
+1
drivers/platform/x86/intel/turbo_max_3.c
··· 17 17 18 18 #include <asm/cpu_device_id.h> 19 19 #include <asm/intel-family.h> 20 + #include <asm/msr.h> 20 21 21 22 #define MSR_OC_MAILBOX 0x150 22 23 #define MSR_OC_MAILBOX_CMD_OFFSET 32
+1
drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c
··· 21 21 #include <linux/suspend.h> 22 22 #include <asm/cpu_device_id.h> 23 23 #include <asm/intel-family.h> 24 + #include <asm/msr.h> 24 25 25 26 #include "uncore-frequency-common.h" 26 27
+1
drivers/powercap/intel_rapl_common.c
··· 28 28 #include <asm/cpu_device_id.h> 29 29 #include <asm/intel-family.h> 30 30 #include <asm/iosf_mbi.h> 31 + #include <asm/msr.h> 31 32 32 33 /* bitmasks for RAPL MSRs, used by primitive access functions */ 33 34 #define ENERGY_STATUS_MASK 0xffffffff
+1
drivers/powercap/intel_rapl_msr.c
··· 24 24 25 25 #include <asm/cpu_device_id.h> 26 26 #include <asm/intel-family.h> 27 + #include <asm/msr.h> 27 28 28 29 /* Local defines */ 29 30 #define MSR_PLATFORM_POWER_LIMIT 0x0000065C
+1
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c
··· 9 9 #include <linux/module.h> 10 10 #include <linux/pci.h> 11 11 #include <linux/thermal.h> 12 + #include <asm/msr.h> 12 13 #include "int340x_thermal_zone.h" 13 14 #include "processor_thermal_device.h" 14 15 #include "../intel_soc_dts_iosf.h"
+1
drivers/thermal/intel/intel_tcc_cooling.c
··· 11 11 #include <linux/module.h> 12 12 #include <linux/thermal.h> 13 13 #include <asm/cpu_device_id.h> 14 + #include <asm/msr.h> 14 15 15 16 #define TCC_PROGRAMMABLE BIT(30) 16 17 #define TCC_LOCKED BIT(31)
+1
drivers/thermal/intel/x86_pkg_temp_thermal.c
··· 20 20 #include <linux/debugfs.h> 21 21 22 22 #include <asm/cpu_device_id.h> 23 + #include <asm/msr.h> 23 24 24 25 #include "thermal_interrupt.h" 25 26
+1
drivers/video/fbdev/geode/display_gx.c
··· 13 13 #include <asm/io.h> 14 14 #include <asm/div64.h> 15 15 #include <asm/delay.h> 16 + #include <asm/msr.h> 16 17 #include <linux/cs5535.h> 17 18 18 19 #include "gxfb.h"
+1
drivers/video/fbdev/geode/gxfb_core.c
··· 29 29 #include <linux/pci.h> 30 30 #include <linux/cs5535.h> 31 31 32 + #include <asm/msr.h> 32 33 #include <asm/olpc.h> 33 34 34 35 #include "gxfb.h"
+1
drivers/video/fbdev/geode/lxfb_ops.c
··· 11 11 #include <linux/delay.h> 12 12 #include <linux/cs5535.h> 13 13 14 + #include <asm/msr.h> 14 15 #include "lxfb.h" 15 16 16 17 /* TODO