Patch "ARM: 8971/1: replace the sole use of a symbol with its definition" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ARM: 8971/1: replace the sole use of a symbol with its definition

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arm-8971-1-replace-the-sole-use-of-a-symbol-with-its.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e792b100c7cc6944af2b5094304c6a8a2b760418
Author: Jian Cai <caij2003@xxxxxxxxx>
Date:   Wed Apr 29 01:20:11 2020 +0100

    ARM: 8971/1: replace the sole use of a symbol with its definition
    
    commit a780e485b5768e78aef087502499714901b68cc4 upstream.
    
    ALT_UP_B macro sets symbol up_b_offset via .equ to an expression
    involving another symbol. The macro gets expanded twice when
    arch/arm/kernel/sleep.S is assembled, creating a scenario where
    up_b_offset is set to another expression involving symbols while its
    current value is based on symbols. LLVM integrated assembler does not
    allow such cases, and based on the documentation of binutils, "Values
    that are based on expressions involving other symbols are allowed, but
    some targets may restrict this to only being done once per assembly", so
    it may be better to avoid such cases as it is not clearly stated which
    targets should support or disallow them. The fix in this case is simple,
    as up_b_offset has only one use, so we can replace the use with the
    definition and get rid of up_b_offset.
    
     Link:https://github.com/ClangBuiltLinux/linux/issues/920
    
     Reviewed-by: Stefan Agner <stefan@xxxxxxxx>
    
    Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
    Signed-off-by: Jian Cai <caij2003@xxxxxxxxx>
    Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxx>
    Signed-off-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index 3546d294d55f..feac2c8b86f2 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -269,10 +269,9 @@
 	.endif							;\
 	.popsection
 #define ALT_UP_B(label)					\
-	.equ	up_b_offset, label - 9998b			;\
 	.pushsection ".alt.smp.init", "a"			;\
 	.long	9998b						;\
-	W(b)	. + up_b_offset					;\
+	W(b)	. + (label - 9998b)					;\
 	.popsection
 #else
 #define ALT_SMP(instr...)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux