mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

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
38 lines
897 B
C
38 lines
897 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright 2001-2002 Pavel Machek <pavel@suse.cz>
|
|
* Based on code
|
|
* Copyright 2001 Patrick Mochel <mochel@osdl.org>
|
|
*/
|
|
#ifndef _ASM_X86_SUSPEND_32_H
|
|
#define _ASM_X86_SUSPEND_32_H
|
|
|
|
#include <asm/desc.h>
|
|
#include <asm/fpu/api.h>
|
|
#include <asm/msr.h>
|
|
|
|
/* image of the saved processor state */
|
|
struct saved_context {
|
|
unsigned long cr0, cr2, cr3, cr4;
|
|
u64 misc_enable;
|
|
struct saved_msrs saved_msrs;
|
|
struct desc_ptr gdt_desc;
|
|
struct desc_ptr idt;
|
|
u16 ldt;
|
|
u16 tss;
|
|
unsigned long tr;
|
|
unsigned long safety;
|
|
unsigned long return_address;
|
|
/*
|
|
* On x86_32, all segment registers except gs are saved at kernel
|
|
* entry in pt_regs.
|
|
*/
|
|
u16 gs;
|
|
bool misc_enable_saved;
|
|
} __attribute__((packed));
|
|
|
|
/* routines for saving/restoring kernel state */
|
|
extern char core_restore_code[];
|
|
extern char restore_registers[];
|
|
|
|
#endif /* _ASM_X86_SUSPEND_32_H */
|