Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: asm: Rename some macros to avoid build errors

Use ASM_ prefix to rename some macros (PANIC and PRINT), in order to
avoid build errors (all users are updated as well):

1, PANIC conflicts with drivers/scsi/smartpqi/smartpqi_init.c
2, PRINT conflicts with net/netfilter/nf_conntrack_h323_asn1.c and net/
mac80211/debugfs_sta.c

Fixes: d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to inst.h")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Huacai Chen and committed by
Thomas Bogendoerfer
da706e50 109111b3

+16 -16
+2 -2
arch/mips/dec/int-handler.S
··· 304 304 */ 305 305 FEXPORT(dec_intr_unimplemented) 306 306 move a1,t0 # cheats way of printing an arg! 307 - PANIC("Unimplemented cpu interrupt! CP0_CAUSE: 0x%08x"); 307 + ASM_PANIC("Unimplemented cpu interrupt! CP0_CAUSE: 0x%08x"); 308 308 309 309 FEXPORT(asic_intr_unimplemented) 310 310 move a1,t0 # cheats way of printing an arg! 311 - PANIC("Unimplemented asic interrupt! ASIC ISR: 0x%08x"); 311 + ASM_PANIC("Unimplemented asic interrupt! ASIC ISR: 0x%08x");
+10 -10
arch/mips/include/asm/asm.h
··· 74 74 .globl symbol; \ 75 75 symbol = value 76 76 77 - #define PANIC(msg) \ 77 + #define TEXT(msg) \ 78 + .pushsection .data; \ 79 + 8: .asciiz msg; \ 80 + .popsection; 81 + 82 + #define ASM_PANIC(msg) \ 78 83 .set push; \ 79 84 .set reorder; \ 80 - PTR_LA a0, 8f; \ 85 + PTR_LA a0, 8f; \ 81 86 jal panic; \ 82 87 9: b 9b; \ 83 88 .set pop; \ ··· 92 87 * Print formatted string 93 88 */ 94 89 #ifdef CONFIG_PRINTK 95 - #define PRINT(string) \ 90 + #define ASM_PRINT(string) \ 96 91 .set push; \ 97 92 .set reorder; \ 98 - PTR_LA a0, 8f; \ 93 + PTR_LA a0, 8f; \ 99 94 jal printk; \ 100 95 .set pop; \ 101 96 TEXT(string) 102 97 #else 103 - #define PRINT(string) 98 + #define ASM_PRINT(string) 104 99 #endif 105 - 106 - #define TEXT(msg) \ 107 - .pushsection .data; \ 108 - 8: .asciiz msg; \ 109 - .popsection; 110 100 111 101 /* 112 102 * Stack alignment
+3 -3
arch/mips/kernel/genex.S
··· 501 501 .macro __BUILD_silent exception 502 502 .endm 503 503 504 - /* Gas tries to parse the PRINT argument as a string containing 504 + /* Gas tries to parse the ASM_PRINT argument as a string containing 505 505 string escapes and emits bogus warnings if it believes to 506 506 recognize an unknown escape code. So make the arguments 507 507 start with an n and gas will believe \n is ok ... */ 508 508 .macro __BUILD_verbose nexception 509 509 LONG_L a1, PT_EPC(sp) 510 510 #ifdef CONFIG_32BIT 511 - PRINT("Got \nexception at %08lx\012") 511 + ASM_PRINT("Got \nexception at %08lx\012") 512 512 #endif 513 513 #ifdef CONFIG_64BIT 514 - PRINT("Got \nexception at %016lx\012") 514 + ASM_PRINT("Got \nexception at %016lx\012") 515 515 #endif 516 516 .endm 517 517
+1 -1
arch/mips/kernel/scall64-o32.S
··· 41 41 #if 0 42 42 SAVE_ALL 43 43 move a1, v0 44 - PRINT("Scall %ld\n") 44 + ASM_PRINT("Scall %ld\n") 45 45 RESTORE_ALL 46 46 #endif 47 47