Skip to content

Commit a96bfed

Browse files
committed
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM fix from Russell King: - fix gcc 10 compiler regression with cpu_init() * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9081/1: fix gcc-10 thumb2-kernel regression
2 parents 13311e7 + dad7b98 commit a96bfed

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

arch/arm/kernel/setup.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,11 @@ void notrace cpu_init(void)
545545
* In Thumb-2, msr with an immediate value is not allowed.
546546
*/
547547
#ifdef CONFIG_THUMB2_KERNEL
548-
#define PLC "r"
548+
#define PLC_l "l"
549+
#define PLC_r "r"
549550
#else
550-
#define PLC "I"
551+
#define PLC_l "I"
552+
#define PLC_r "I"
551553
#endif
552554

553555
/*
@@ -569,15 +571,15 @@ void notrace cpu_init(void)
569571
"msr cpsr_c, %9"
570572
:
571573
: "r" (stk),
572-
PLC (PSR_F_BIT | PSR_I_BIT | IRQ_MODE),
574+
PLC_r (PSR_F_BIT | PSR_I_BIT | IRQ_MODE),
573575
"I" (offsetof(struct stack, irq[0])),
574-
PLC (PSR_F_BIT | PSR_I_BIT | ABT_MODE),
576+
PLC_r (PSR_F_BIT | PSR_I_BIT | ABT_MODE),
575577
"I" (offsetof(struct stack, abt[0])),
576-
PLC (PSR_F_BIT | PSR_I_BIT | UND_MODE),
578+
PLC_r (PSR_F_BIT | PSR_I_BIT | UND_MODE),
577579
"I" (offsetof(struct stack, und[0])),
578-
PLC (PSR_F_BIT | PSR_I_BIT | FIQ_MODE),
580+
PLC_r (PSR_F_BIT | PSR_I_BIT | FIQ_MODE),
579581
"I" (offsetof(struct stack, fiq[0])),
580-
PLC (PSR_F_BIT | PSR_I_BIT | SVC_MODE)
582+
PLC_l (PSR_F_BIT | PSR_I_BIT | SVC_MODE)
581583
: "r14");
582584
#endif
583585
}

0 commit comments

Comments
 (0)