Commit da706e50 authored by Huacai Chen's avatar Huacai Chen Committed by Thomas Bogendoerfer
Browse files

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: d339cd02 ("MIPS: Move unaligned load/store helpers to inst.h")
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarHuacai Chen <chenhc@lemote.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 109111b3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -304,8 +304,8 @@ spurious:
 */
		FEXPORT(dec_intr_unimplemented)
		move	a1,t0			# cheats way of printing an arg!
		PANIC("Unimplemented cpu interrupt! CP0_CAUSE: 0x%08x");
		ASM_PANIC("Unimplemented cpu interrupt! CP0_CAUSE: 0x%08x");

		FEXPORT(asic_intr_unimplemented)
		move	a1,t0			# cheats way of printing an arg!
		PANIC("Unimplemented asic interrupt! ASIC ISR: 0x%08x");
		ASM_PANIC("Unimplemented asic interrupt! ASIC ISR: 0x%08x");
+10 −10
Original line number Diff line number Diff line
@@ -74,7 +74,12 @@ symbol: .insn
		.globl	symbol;				\
symbol		=	value

#define PANIC(msg)					\
#define TEXT(msg)					\
		.pushsection .data;			\
8:		.asciiz msg;				\
		.popsection;

#define ASM_PANIC(msg)					\
		.set	push;				\
		.set	reorder;			\
		PTR_LA	a0, 8f;				\
@@ -87,7 +92,7 @@ symbol = value
 * Print formatted string
 */
#ifdef CONFIG_PRINTK
#define PRINT(string)					\
#define ASM_PRINT(string)				\
		.set	push;				\
		.set	reorder;			\
		PTR_LA	a0, 8f;				\
@@ -95,14 +100,9 @@ symbol = value
		.set	pop;				\
		TEXT(string)
#else
#define PRINT(string)
#define ASM_PRINT(string)
#endif

#define TEXT(msg)					\
		.pushsection .data;			\
8:		.asciiz msg;				\
		.popsection;

/*
 * Stack alignment
 */
+3 −3
Original line number Diff line number Diff line
@@ -501,17 +501,17 @@ NESTED(nmi_handler, PT_SIZE, sp)
	.macro	__BUILD_silent exception
	.endm

	/* Gas tries to parse the PRINT argument as a string containing
	/* Gas tries to parse the ASM_PRINT argument as a string containing
	   string escapes and emits bogus warnings if it believes to
	   recognize an unknown escape code.  So make the arguments
	   start with an n and gas will believe \n is ok ...  */
	.macro	__BUILD_verbose nexception
	LONG_L	a1, PT_EPC(sp)
#ifdef CONFIG_32BIT
	PRINT("Got \nexception at %08lx\012")
	ASM_PRINT("Got \nexception at %08lx\012")
#endif
#ifdef CONFIG_64BIT
	PRINT("Got \nexception at %016lx\012")
	ASM_PRINT("Got \nexception at %016lx\012")
#endif
	.endm

+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ NESTED(handle_sys, PT_SIZE, sp)
#if 0
 SAVE_ALL
 move a1, v0
 PRINT("Scall %ld\n")
 ASM_PRINT("Scall %ld\n")
 RESTORE_ALL
#endif