ARM: replace BSYM() with badr assembly macro
BSYM() was invented to allow us to work around a problem with the assembler, where local symbols resolved by the assembler for the 'adr' instruction did not take account of their ISA. Since we don't want BSYM() used elsewhere, replace BSYM() with a new macro 'badr', which is like the 'adr' pseudo-op, but with the BSYM() mechanics integrated into it. This ensures that the BSYM()-ification is only used in conjunction with 'adr'. Acked-by: Dave Martin <Dave.Martin@arm.com> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
@@ -177,6 +177,21 @@
|
||||
restore_irqs_notrace \oldcpsr
|
||||
.endm
|
||||
|
||||
/*
|
||||
* Assembly version of "adr rd, BSYM(sym)". This should only be used to
|
||||
* reference local symbols in the same assembly file which are to be
|
||||
* resolved by the assembler. Other usage is undefined.
|
||||
*/
|
||||
.irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo
|
||||
.macro badr\c, rd, sym
|
||||
#ifdef CONFIG_THUMB2_KERNEL
|
||||
adr\c \rd, \sym + 1
|
||||
#else
|
||||
adr\c \rd, \sym
|
||||
#endif
|
||||
.endm
|
||||
.endr
|
||||
|
||||
/*
|
||||
* Get current thread_info.
|
||||
*/
|
||||
@@ -326,7 +341,7 @@
|
||||
THUMB( orr \reg , \reg , #PSR_T_BIT )
|
||||
bne 1f
|
||||
orr \reg, \reg, #PSR_A_BIT
|
||||
adr lr, BSYM(2f)
|
||||
badr lr, 2f
|
||||
msr spsr_cxsf, \reg
|
||||
__MSR_ELR_HYP(14)
|
||||
__ERET
|
||||
|
Reference in New Issue
Block a user