Skip to contentSkip to conversation

MIPS: Guard some macros with __ASSEMBLY__ in asm.h

PATCH Applied Jiaxun Yang 3 participants 3 messages Mar 26, 2024 – Apr 15, 2024 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Guard some macros with __ASSEMBLY__ in asm.h

There are some assembly macros with very generic naming being defined asm.h. They are clashing with other macros from C code.

Guard them with __ASSEMBLY__ to prevent futher clashes.

---
 arch/mips/include/asm/asm.h | 3 +++
 1 file changed, 3 insertions(+)
arch/mips/include/asm/asm.h +3 -0
index 2e99450f4228..87ff609b53fe 100644
@@ -37,6 +37,7 @@
 #define CFI_SECTIONS
 #endif
 
+#ifdef __ASSEMBLY__
 /*
  * LEAF - declare leaf routine
  */
@@ -122,6 +123,8 @@ symbol		=	value
 #define ASM_PRINT(string)
 #endif
 
+#endif /* __ASSEMBLY__ */
+
 /*
  * Stack alignment
  */

---
base-commit: 084c8e315db34b59d38d06e684b1a0dd07d30287
change-id: 20240326-asm-guard-dddeb2321d69

Best regards,

Signature · 1 line
Jiaxun Yang <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jiaxun Yang

There are some assembly macros with very generic naming being defined asm.h. They are clashing with other macros from C code.

Quoted 8 lines

Guard them with __ASSEMBLY__ to prevent futher clashes.

---
  arch/mips/include/asm/asm.h | 3 +++
  1 file changed, 3 insertions(+)
maintainer Applied
#2 lore raw
In reply to Jiaxun Yang
Quoted 39 lines · Jiaxun Yang

There are some assembly macros with very generic naming being defined asm.h. They are clashing with other macros from C code.

Guard them with __ASSEMBLY__ to prevent futher clashes.

---
 arch/mips/include/asm/asm.h | 3 +++
 1 file changed, 3 insertions(+)
arch/mips/include/asm/asm.h +3 -1
index 2e99450f4228..87ff609b53fe 100644
@@ -37,6 +37,7 @@
 #define CFI_SECTIONS
 #endif
 
+#ifdef __ASSEMBLY__
 /*
  * LEAF - declare leaf routine
  */
@@ -122,6 +123,8 @@ symbol		=	value
 #define ASM_PRINT(string)
 #endif
 
+#endif /* __ASSEMBLY__ */
+
 /*
  * Stack alignment
  */
 
---

base-commit: 084c8e315db34b59d38d06e684b1a0dd07d30287
change-id: 20240326-asm-guard-dddeb2321d69

Quoted 3 lines

Best regards,

Signature · 1 line
Jiaxun Yang <[email protected]>

applied to mips-next.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]