linux/arch/x86/kernel/fpu
Thomas Gleixner 154fcf3a78 x86/msr: Prepare for including <linux/percpu.h> into <asm/msr.h>
To clean up the per CPU insanity of UP which causes sparse to be rightfully
unhappy and prevents the usage of the generic per CPU accessors on cpu_info
it is necessary to include <linux/percpu.h> into <asm/msr.h>.

Including <linux/percpu.h> into <asm/msr.h> is impossible because it ends
up in header dependency hell. The problem is that <asm/processor.h>
includes <asm/msr.h>. The inclusion of <linux/percpu.h> results in a
compile fail where the compiler cannot longer handle an include in
<asm/cpufeature.h> which references boot_cpu_data which is
defined in <asm/processor.h>.

The only reason why <asm/msr.h> is included in <asm/processor.h> are the
set/get_debugctlmsr() inlines. They are defined there because <asm/processor.h>
is such a nice dump ground for everything. In fact they belong obviously
into <asm/debugreg.h>.

Move them to <asm/debugreg.h> and fix up the resulting damage which is just
exposing the reliance on random include chains.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20240304005104.454678686@linutronix.de
2024-03-04 12:01:39 +01:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
bugs.c x86/msr: Prepare for including <linux/percpu.h> into <asm/msr.h> 2024-03-04 12:01:39 +01:00
context.h x86/fpu: Invalidate FPU state correctly on exec() 2023-08-24 11:01:45 +02:00
core.c arch/x86: Fix typos 2024-01-03 11:46:22 +01:00
init.c x86/fpu: Mark init functions __init 2023-06-16 10:16:01 +02:00
internal.h x86/fpu/signal: Prepare for variable sigframe length 2021-10-26 10:18:09 +02:00
legacy.h x86/fpu: Remove .fixup usage 2021-12-11 09:09:48 +01:00
regset.c x86: Add PTRACE interface for shadow stack 2023-08-02 15:01:51 -07:00
signal.c x86/fpu: Stop relying on userspace for info to fault in xsave buffer 2024-01-30 07:25:48 -08:00
xstate.c - A kernel-doc fix 2023-10-30 12:36:41 -10:00
xstate.h x86/fpu: Allow caller to constrain xfeatures when copying to uabi buffer 2023-10-12 11:08:58 -04:00