forked from analogdevicesinc/linux
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linu…
…x/kernel/git/tip/tip Pull x86 fpu updates from Ingo Molnar: "The main x86 FPU changes in this cycle were: - a large series of cleanups, fixes and enhancements to re-enable the XSAVES instruction on Intel CPUs - which is the most advanced instruction to do FPU context switches (Yu-cheng Yu, Fenghua Yu) - Add FPU tracepoints for the FPU state machine (Dave Hansen)" * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Do not BUG_ON() in early FPU code x86/fpu/xstate: Re-enable XSAVES x86/fpu/xstate: Fix fpstate_init() for XRSTORS x86/fpu/xstate: Return NULL for disabled xstate component address x86/fpu/xstate: Fix __fpu_restore_sig() for XSAVES x86/fpu/xstate: Fix xstate_offsets, xstate_sizes for non-extended xstates x86/fpu/xstate: Fix XSTATE component offset print out x86/fpu/xstate: Fix PTRACE frames for XSAVES x86/fpu/xstate: Fix supervisor xstate component offset x86/fpu/xstate: Align xstate components according to CPUID x86/fpu/xstate: Copy xstate registers directly to the signal frame when compacted format is in use x86/fpu/xstate: Keep init_fpstate.xsave.header.xfeatures as zero for init optimization x86/fpu/xstate: Rename 'xstate_size' to 'fpu_kernel_xstate_size', to distinguish it from 'fpu_user_xstate_size' x86/fpu/xstate: Define and use 'fpu_user_xstate_size' x86/fpu: Add tracepoints to dump FPU state at key points
- Loading branch information
Showing
11 changed files
with
608 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
#undef TRACE_SYSTEM | ||
#define TRACE_SYSTEM x86_fpu | ||
|
||
#if !defined(_TRACE_FPU_H) || defined(TRACE_HEADER_MULTI_READ) | ||
#define _TRACE_FPU_H | ||
|
||
#include <linux/tracepoint.h> | ||
|
||
DECLARE_EVENT_CLASS(x86_fpu, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu), | ||
|
||
TP_STRUCT__entry( | ||
__field(struct fpu *, fpu) | ||
__field(bool, fpregs_active) | ||
__field(bool, fpstate_active) | ||
__field(int, counter) | ||
__field(u64, xfeatures) | ||
__field(u64, xcomp_bv) | ||
), | ||
|
||
TP_fast_assign( | ||
__entry->fpu = fpu; | ||
__entry->fpregs_active = fpu->fpregs_active; | ||
__entry->fpstate_active = fpu->fpstate_active; | ||
__entry->counter = fpu->counter; | ||
if (boot_cpu_has(X86_FEATURE_OSXSAVE)) { | ||
__entry->xfeatures = fpu->state.xsave.header.xfeatures; | ||
__entry->xcomp_bv = fpu->state.xsave.header.xcomp_bv; | ||
} | ||
), | ||
TP_printk("x86/fpu: %p fpregs_active: %d fpstate_active: %d counter: %d xfeatures: %llx xcomp_bv: %llx", | ||
__entry->fpu, | ||
__entry->fpregs_active, | ||
__entry->fpstate_active, | ||
__entry->counter, | ||
__entry->xfeatures, | ||
__entry->xcomp_bv | ||
) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_state, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_before_save, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_after_save, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_before_restore, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_after_restore, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_regs_activated, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_regs_deactivated, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_activate_state, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_deactivate_state, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_init_state, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_dropped, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_copy_src, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_copy_dst, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
DEFINE_EVENT(x86_fpu, x86_fpu_xstate_check_failed, | ||
TP_PROTO(struct fpu *fpu), | ||
TP_ARGS(fpu) | ||
); | ||
|
||
#undef TRACE_INCLUDE_PATH | ||
#define TRACE_INCLUDE_PATH asm/trace/ | ||
#undef TRACE_INCLUDE_FILE | ||
#define TRACE_INCLUDE_FILE fpu | ||
#endif /* _TRACE_FPU_H */ | ||
|
||
/* This part must be outside protection */ | ||
#include <trace/define_trace.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.