All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: smp: Fix compilation error
@ 2018-12-29  1:43 Shaokun Zhang
  2019-01-02 22:28 ` John Stultz
  2019-01-03 15:39 ` Mark Rutland
  0 siblings, 2 replies; 6+ messages in thread
From: Shaokun Zhang @ 2018-12-29  1:43 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Shaokun Zhang, Catalin Marinas, Will Deacon

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)
 /* 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__
 
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: smp: Fix compilation error
  2018-12-29  1:43 [PATCH] arm64: smp: Fix compilation error Shaokun Zhang
@ 2019-01-02 22:28 ` John Stultz
  2019-01-03 15:45   ` Will Deacon
  2019-01-03 15:39 ` Mark Rutland
  1 sibling, 1 reply; 6+ messages in thread
From: John Stultz @ 2019-01-02 22:28 UTC (permalink / raw)
  To: Shaokun Zhang; +Cc: Catalin Marinas, Will Deacon, linux-arm-kernel

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>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: smp: Fix compilation error
  2018-12-29  1:43 [PATCH] arm64: smp: Fix compilation error Shaokun Zhang
  2019-01-02 22:28 ` John Stultz
@ 2019-01-03 15:39 ` Mark Rutland
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Rutland @ 2019-01-03 15:39 UTC (permalink / raw)
  To: Shaokun Zhang; +Cc: Catalin Marinas, Will Deacon, linux-arm-kernel

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.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: smp: Fix compilation error
  2019-01-02 22:28 ` John Stultz
@ 2019-01-03 15:45   ` Will Deacon
  2019-01-04 20:17     ` Florian Fainelli
  0 siblings, 1 reply; 6+ messages in thread
From: Will Deacon @ 2019-01-03 15:45 UTC (permalink / raw)
  To: John Stultz; +Cc: Shaokun Zhang, Catalin Marinas, linux-arm-kernel

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: smp: Fix compilation error
  2019-01-03 15:45   ` Will Deacon
@ 2019-01-04 20:17     ` Florian Fainelli
  2019-01-07 10:18       ` Will Deacon
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2019-01-04 20:17 UTC (permalink / raw)
  To: Will Deacon, John Stultz; +Cc: Shaokun Zhang, Catalin Marinas, linux-arm-kernel

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
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: smp: Fix compilation error
  2019-01-04 20:17     ` Florian Fainelli
@ 2019-01-07 10:18       ` Will Deacon
  0 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2019-01-07 10:18 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Shaokun Zhang, Catalin Marinas, John Stultz, linux-arm-kernel

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-07 10:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-29  1:43 [PATCH] arm64: smp: Fix compilation error Shaokun Zhang
2019-01-02 22:28 ` John Stultz
2019-01-03 15:45   ` Will Deacon
2019-01-04 20:17     ` Florian Fainelli
2019-01-07 10:18       ` Will Deacon
2019-01-03 15:39 ` Mark Rutland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.