summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/fpu/xstate.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-11-10 13:01:14 +0300
committerPeter Zijlstra <peterz@infradead.org>2021-12-11 11:09:48 +0300
commit1c3b9091d084d92c70a4260553853509637276b9 (patch)
treeccccaaac0f47bd5da646ed43664c7c1c513d4d9a /arch/x86/kernel/fpu/xstate.h
parente2b48e43284c0916ebf8e4240199b9d9747e337a (diff)
downloadlinux-1c3b9091d084d92c70a4260553853509637276b9.tar.xz
x86/fpu: Remove .fixup usage
Employ EX_TYPE_EFAULT_REG to store '-EFAULT' into the %[err] register on exception. All the callers only ever test for 0, so the change from -1 to -EFAULT is immaterial. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/20211110101325.604494664@infradead.org
Diffstat (limited to 'arch/x86/kernel/fpu/xstate.h')
-rw-r--r--arch/x86/kernel/fpu/xstate.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/kernel/fpu/xstate.h b/arch/x86/kernel/fpu/xstate.h
index 86ea7c0fa2f6..e0c9264b1dd0 100644
--- a/arch/x86/kernel/fpu/xstate.h
+++ b/arch/x86/kernel/fpu/xstate.h
@@ -108,11 +108,7 @@ static inline u64 xfeatures_mask_independent(void)
"\n" \
"xor %[err], %[err]\n" \
"3:\n" \
- ".pushsection .fixup,\"ax\"\n" \
- "4: movl $-2, %[err]\n" \
- "jmp 3b\n" \
- ".popsection\n" \
- _ASM_EXTABLE(661b, 4b) \
+ _ASM_EXTABLE_TYPE_REG(661b, 3b, EX_TYPE_EFAULT_REG, %[err]) \
: [err] "=r" (err) \
: "D" (st), "m" (*st), "a" (lmask), "d" (hmask) \
: "memory")