Skip to contentSkip to conversation

x86/entry: add compatibility with IAS

PATCH New Jian Cai 1 participant 1 message Jul 14, 2020 x86

lore
Share & tools
lore

Jian Cai

author
#0 lore raw

PATCH v2 1/1 x86/entry: add compatibility with IAS

Clang's integrated assembler does not allow symbols with non-absolute values to be reassigned. This patch allows the affected code to be compatible with IAS.

Compile-/Assemble-tested against Linux v5.8-rc5 with LLVM/Clang v11.0.0-git

---

Thanks Nick and Sedat for explaining the process of submitting patches. Include the changelog as follows,

Changes v1 -> v2:
Update the patch based on Arvind Sankar <[email protected]>'s comments. Also include addtional information in the Tested-by tag.

 arch/x86/include/asm/idtentry.h | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
arch/x86/include/asm/idtentry.h +6 -8
index f3d70830bf2a..5efaaed34eda 100644
@@ -469,16 +469,15 @@ __visible noinstr void func(struct pt_regs *regs,			\
 	.align 8
 SYM_CODE_START(irq_entries_start)
     vector=FIRST_EXTERNAL_VECTOR
-    pos = .
     .rept (FIRST_SYSTEM_VECTOR - FIRST_EXTERNAL_VECTOR)
 	UNWIND_HINT_IRET_REGS
+0 :
 	.byte	0x6a, vector
 	jmp	asm_common_interrupt
 	nop
 	/* Ensure that the above is 8 bytes max */
-	. = pos + 8
-    pos=pos+8
-    vector=vector+1
+	. = 0b + 8
+	vector = vector+1
     .endr
 SYM_CODE_END(irq_entries_start)
 
@@ -486,16 +485,15 @@ SYM_CODE_END(irq_entries_start)
 	.align 8
 SYM_CODE_START(spurious_entries_start)
     vector=FIRST_SYSTEM_VECTOR
-    pos = .
     .rept (NR_VECTORS - FIRST_SYSTEM_VECTOR)
 	UNWIND_HINT_IRET_REGS
+0 :
 	.byte	0x6a, vector
 	jmp	asm_spurious_interrupt
 	nop
 	/* Ensure that the above is 8 bytes max */
-	. = pos + 8
-    pos=pos+8
-    vector=vector+1
+	. = 0b + 8
+	vector = vector+1
     .endr
 SYM_CODE_END(spurious_entries_start)
 #endif
Signature · 1 line
2.27.0.389.gc38d7665816-goog