Message ID | 1546047797-48275-1-git-send-email-zhangshaokun@hisilicon.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: smp: Fix compilation error | expand |
On Fri, Dec 28, 2018 at 5:44 PM Shaokun Zhang <zhangshaokun@hisilicon.com> wrote: > > For arm64: updates for 4.21, there is a compilation error: > arch/arm64/kernel/head.S: Assembler messages: > arch/arm64/kernel/head.S:824: Error: missing ')' > arch/arm64/kernel/head.S:824: Error: missing ')' > arch/arm64/kernel/head.S:824: Error: missing ')' > arch/arm64/kernel/head.S:824: Error: unexpected characters following instruction at operand 2 -- `mov x2,#(2)|(2U<<(8))' > scripts/Makefile.build:391: recipe for target 'arch/arm64/kernel/head.o' failed > make[1]: *** [arch/arm64/kernel/head.o] Error 1 > GCC version is gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 I hit this as well this morning! Thanks for sending this out! > Let's fix it using the UL() macro. > > Fixes: 66f16a24512f ("arm64: smp: Rework early feature mismatched detection") > > Cc: Catalin Marinas <catalin.marinas@arm.com> > Cc: Will Deacon <will.deacon@arm.com> > Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com> Looks like this fixes the build issue! Tested-by: John Stultz <john.stultz@linaro.org>
On Sat, Dec 29, 2018 at 09:43:17AM +0800, Shaokun Zhang wrote: > For arm64: updates for 4.21, there is a compilation error: > arch/arm64/kernel/head.S: Assembler messages: > arch/arm64/kernel/head.S:824: Error: missing ')' > arch/arm64/kernel/head.S:824: Error: missing ')' > arch/arm64/kernel/head.S:824: Error: missing ')' > arch/arm64/kernel/head.S:824: Error: unexpected characters following instruction at operand 2 -- `mov x2,#(2)|(2U<<(8))' > scripts/Makefile.build:391: recipe for target 'arch/arm64/kernel/head.o' failed > make[1]: *** [arch/arm64/kernel/head.o] Error 1 > GCC version is gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 > > Let's fix it using the UL() macro. > > Fixes: 66f16a24512f ("arm64: smp: Rework early feature mismatched detection") > > Cc: Catalin Marinas <catalin.marinas@arm.com> > Cc: Will Deacon <will.deacon@arm.com> > Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com> > --- > arch/arm64/include/asm/smp.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h > index 1895561839a9..99c9ed170072 100644 > --- a/arch/arm64/include/asm/smp.h > +++ b/arch/arm64/include/asm/smp.h > @@ -25,12 +25,12 @@ > /* The cpu invoked ops->cpu_die, synchronise it with cpu_kill */ > #define CPU_KILL_ME (1) > /* The cpu couldn't die gracefully and is looping in the kernel */ > -#define CPU_STUCK_IN_KERNEL (2) > +#define CPU_STUCK_IN_KERNEL UL(2) I don't think we need this here. If we want this for consistenty, it should be applied to all of the CPU_* definitions, and should probably rethink CPU_MMU_OFF. > /* Fatal system error detected by secondary CPU, crash the system */ > #define CPU_PANIC_KERNEL (3) > > #define CPU_STUCK_REASON_52_BIT_VA (1U << CPU_STUCK_REASON_SHIFT) > -#define CPU_STUCK_REASON_NO_GRAN (2U << CPU_STUCK_REASON_SHIFT) > +#define CPU_STUCK_REASON_NO_GRAN (UL(2) << CPU_STUCK_REASON_SHIFT) We'll need this for CPU_STUCK_REASON_52_BIT_VA, too. Thanks, Mark.
On Wed, Jan 02, 2019 at 02:28:38PM -0800, John Stultz wrote: > On Fri, Dec 28, 2018 at 5:44 PM Shaokun Zhang > <zhangshaokun@hisilicon.com> wrote: > > > > For arm64: updates for 4.21, there is a compilation error: > > arch/arm64/kernel/head.S: Assembler messages: > > arch/arm64/kernel/head.S:824: Error: missing ')' > > arch/arm64/kernel/head.S:824: Error: missing ')' > > arch/arm64/kernel/head.S:824: Error: missing ')' > > arch/arm64/kernel/head.S:824: Error: unexpected characters following instruction at operand 2 -- `mov x2,#(2)|(2U<<(8))' > > scripts/Makefile.build:391: recipe for target 'arch/arm64/kernel/head.o' failed > > make[1]: *** [arch/arm64/kernel/head.o] Error 1 > > GCC version is gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 > > I hit this as well this morning! Thanks for sending this out! > > > Let's fix it using the UL() macro. > > > > Fixes: 66f16a24512f ("arm64: smp: Rework early feature mismatched detection") > > > > Cc: Catalin Marinas <catalin.marinas@arm.com> > > Cc: Will Deacon <will.deacon@arm.com> > > Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com> > > Looks like this fixes the build issue! > > Tested-by: John Stultz <john.stultz@linaro.org> Thanks, I'll pick this up with some minor tweaks so that we consistently use UL() for all the shifts in this file that aren't guarded by #ifndef __ASSEMBLY__. Will
On 1/3/19 7:45 AM, Will Deacon wrote: > On Wed, Jan 02, 2019 at 02:28:38PM -0800, John Stultz wrote: >> On Fri, Dec 28, 2018 at 5:44 PM Shaokun Zhang >> <zhangshaokun@hisilicon.com> wrote: >>> >>> For arm64: updates for 4.21, there is a compilation error: >>> arch/arm64/kernel/head.S: Assembler messages: >>> arch/arm64/kernel/head.S:824: Error: missing ')' >>> arch/arm64/kernel/head.S:824: Error: missing ')' >>> arch/arm64/kernel/head.S:824: Error: missing ')' >>> arch/arm64/kernel/head.S:824: Error: unexpected characters following instruction at operand 2 -- `mov x2,#(2)|(2U<<(8))' >>> scripts/Makefile.build:391: recipe for target 'arch/arm64/kernel/head.o' failed >>> make[1]: *** [arch/arm64/kernel/head.o] Error 1 >>> GCC version is gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 >> >> I hit this as well this morning! Thanks for sending this out! >> >>> Let's fix it using the UL() macro. >>> >>> Fixes: 66f16a24512f ("arm64: smp: Rework early feature mismatched detection") >>> >>> Cc: Catalin Marinas <catalin.marinas@arm.com> >>> Cc: Will Deacon <will.deacon@arm.com> >>> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com> >> >> Looks like this fixes the build issue! >> >> Tested-by: John Stultz <john.stultz@linaro.org> > > Thanks, I'll pick this up with some minor tweaks so that we consistently > use UL() for all the shifts in this file that aren't guarded by #ifndef > __ASSEMBLY__. Did you get a chance to submit a fix to Linus' yet? Thanks
On Fri, Jan 04, 2019 at 12:17:00PM -0800, Florian Fainelli wrote: > On 1/3/19 7:45 AM, Will Deacon wrote: > > On Wed, Jan 02, 2019 at 02:28:38PM -0800, John Stultz wrote: > >> On Fri, Dec 28, 2018 at 5:44 PM Shaokun Zhang > >> <zhangshaokun@hisilicon.com> wrote: > >>> > >>> For arm64: updates for 4.21, there is a compilation error: > >>> arch/arm64/kernel/head.S: Assembler messages: > >>> arch/arm64/kernel/head.S:824: Error: missing ')' > >>> arch/arm64/kernel/head.S:824: Error: missing ')' > >>> arch/arm64/kernel/head.S:824: Error: missing ')' > >>> arch/arm64/kernel/head.S:824: Error: unexpected characters following instruction at operand 2 -- `mov x2,#(2)|(2U<<(8))' > >>> scripts/Makefile.build:391: recipe for target 'arch/arm64/kernel/head.o' failed > >>> make[1]: *** [arch/arm64/kernel/head.o] Error 1 > >>> GCC version is gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 > >> > >> I hit this as well this morning! Thanks for sending this out! > >> > >>> Let's fix it using the UL() macro. > >>> > >>> Fixes: 66f16a24512f ("arm64: smp: Rework early feature mismatched detection") > >>> > >>> Cc: Catalin Marinas <catalin.marinas@arm.com> > >>> Cc: Will Deacon <will.deacon@arm.com> > >>> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com> > >> > >> Looks like this fixes the build issue! > >> > >> Tested-by: John Stultz <john.stultz@linaro.org> > > > > Thanks, I'll pick this up with some minor tweaks so that we consistently > > use UL() for all the shifts in this file that aren't guarded by #ifndef > > __ASSEMBLY__. > > Did you get a chance to submit a fix to Linus' yet? Thanks Yup, landed in -rc1 as 1236cd2bad8b. Will
diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h index 1895561839a9..99c9ed170072 100644 --- a/arch/arm64/include/asm/smp.h +++ b/arch/arm64/include/asm/smp.h @@ -25,12 +25,12 @@ /* The cpu invoked ops->cpu_die, synchronise it with cpu_kill */ #define CPU_KILL_ME (1) /* The cpu couldn't die gracefully and is looping in the kernel */ -#define CPU_STUCK_IN_KERNEL (2) +#define CPU_STUCK_IN_KERNEL UL(2) /* Fatal system error detected by secondary CPU, crash the system */ #define CPU_PANIC_KERNEL (3) #define CPU_STUCK_REASON_52_BIT_VA (1U << CPU_STUCK_REASON_SHIFT) -#define CPU_STUCK_REASON_NO_GRAN (2U << CPU_STUCK_REASON_SHIFT) +#define CPU_STUCK_REASON_NO_GRAN (UL(2) << CPU_STUCK_REASON_SHIFT) #ifndef __ASSEMBLY__
For arm64: updates for 4.21, there is a compilation error: arch/arm64/kernel/head.S: Assembler messages: arch/arm64/kernel/head.S:824: Error: missing ')' arch/arm64/kernel/head.S:824: Error: missing ')' arch/arm64/kernel/head.S:824: Error: missing ')' arch/arm64/kernel/head.S:824: Error: unexpected characters following instruction at operand 2 -- `mov x2,#(2)|(2U<<(8))' scripts/Makefile.build:391: recipe for target 'arch/arm64/kernel/head.o' failed make[1]: *** [arch/arm64/kernel/head.o] Error 1 GCC version is gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 Let's fix it using the UL() macro. Fixes: 66f16a24512f ("arm64: smp: Rework early feature mismatched detection") Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com> --- arch/arm64/include/asm/smp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)