Commit 6ee93f8d authored by Jian Cai's avatar Jian Cai Committed by Thomas Gleixner

x86/entry: Add compatibility with IAS

Clang's integrated assembler does not allow symbols with non-absolute
values to be reassigned. Modify the interrupt entry loop macro to be
compatible with IAS by using a label and an offset.
Reported-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Reported-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
Suggested-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Suggested-by: default avatarBrian Gerst <brgerst@gmail.com>
Suggested-by: default avatarArvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: default avatarJian Cai <caij2003@gmail.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> #
Link: https://github.com/ClangBuiltLinux/linux/issues/1043
Link: https://lkml.kernel.org/r/20200714233024.1789985-1-caij2003@gmail.com
parent bd87e6f6
...@@ -469,16 +469,15 @@ __visible noinstr void func(struct pt_regs *regs, \ ...@@ -469,16 +469,15 @@ __visible noinstr void func(struct pt_regs *regs, \
.align 8 .align 8
SYM_CODE_START(irq_entries_start) SYM_CODE_START(irq_entries_start)
vector=FIRST_EXTERNAL_VECTOR vector=FIRST_EXTERNAL_VECTOR
pos = .
.rept (FIRST_SYSTEM_VECTOR - FIRST_EXTERNAL_VECTOR) .rept (FIRST_SYSTEM_VECTOR - FIRST_EXTERNAL_VECTOR)
UNWIND_HINT_IRET_REGS UNWIND_HINT_IRET_REGS
0 :
.byte 0x6a, vector .byte 0x6a, vector
jmp asm_common_interrupt jmp asm_common_interrupt
nop nop
/* Ensure that the above is 8 bytes max */ /* Ensure that the above is 8 bytes max */
. = pos + 8 . = 0b + 8
pos=pos+8 vector = vector+1
vector=vector+1
.endr .endr
SYM_CODE_END(irq_entries_start) SYM_CODE_END(irq_entries_start)
...@@ -486,16 +485,15 @@ SYM_CODE_END(irq_entries_start) ...@@ -486,16 +485,15 @@ SYM_CODE_END(irq_entries_start)
.align 8 .align 8
SYM_CODE_START(spurious_entries_start) SYM_CODE_START(spurious_entries_start)
vector=FIRST_SYSTEM_VECTOR vector=FIRST_SYSTEM_VECTOR
pos = .
.rept (NR_VECTORS - FIRST_SYSTEM_VECTOR) .rept (NR_VECTORS - FIRST_SYSTEM_VECTOR)
UNWIND_HINT_IRET_REGS UNWIND_HINT_IRET_REGS
0 :
.byte 0x6a, vector .byte 0x6a, vector
jmp asm_spurious_interrupt jmp asm_spurious_interrupt
nop nop
/* Ensure that the above is 8 bytes max */ /* Ensure that the above is 8 bytes max */
. = pos + 8 . = 0b + 8
pos=pos+8 vector = vector+1
vector=vector+1
.endr .endr
SYM_CODE_END(spurious_entries_start) SYM_CODE_END(spurious_entries_start)
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment