x86/segment: Remove .fixup usage
Create and use EX_TYPE_ZERO_REG to clear the register and retry the segment load on exception. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/20211110101325.663529463@infradead.org
This commit is contained in:
parent
1c3b9091d0
commit
5fc77b916c
|
@ -45,5 +45,6 @@
|
|||
|
||||
#define EX_TYPE_IMM_REG 17 /* reg := (long)imm */
|
||||
#define EX_TYPE_EFAULT_REG (EX_TYPE_IMM_REG | EX_DATA_IMM(-EFAULT))
|
||||
#define EX_TYPE_ZERO_REG (EX_TYPE_IMM_REG | EX_DATA_IMM(0))
|
||||
|
||||
#endif
|
||||
|
|
|
@ -307,14 +307,7 @@ do { \
|
|||
\
|
||||
asm volatile(" \n" \
|
||||
"1: movl %k0,%%" #seg " \n" \
|
||||
\
|
||||
".section .fixup,\"ax\" \n" \
|
||||
"2: xorl %k0,%k0 \n" \
|
||||
" jmp 1b \n" \
|
||||
".previous \n" \
|
||||
\
|
||||
_ASM_EXTABLE(1b, 2b) \
|
||||
\
|
||||
_ASM_EXTABLE_TYPE_REG(1b, 1b, EX_TYPE_ZERO_REG, %k0)\
|
||||
: "+r" (__val) : : "memory"); \
|
||||
} while (0)
|
||||
|
||||
|
|
Loading…
Reference in New Issue