diff mbox

arm: Fix armv8 compilation error

Message ID 1402345552-27131-1-git-send-email-drambo@broadcom.com
State New
Headers show

Commit Message

Darwin Rambo June 9, 2014, 8:25 p.m. UTC
From: "Shaibal.Dutta" <shaibal.dutta@broadcom.com>

Fix following compilation error when CONFIG_ARM64 is defined

Error: unknown or missing system register name at operand 2
-- `mrs x0,daifmsr daifset,#3'

Signed-off-by: Shaibal.Dutta <shaibal.dutta@broadcom.com>
Signed-off-by: Darwin Rambo <drambo@broadcom.com>
Reviewed-by: Darwin Rambo <drambo@broadcom.com>
---

 arch/arm/include/asm/proc-armv/system.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Albert ARIBAUD July 4, 2014, 9:41 p.m. UTC | #1
Hi Darwin,

On Mon, 9 Jun 2014 13:25:52 -0700, Darwin Rambo <drambo@broadcom.com>
wrote:

> From: "Shaibal.Dutta" <shaibal.dutta@broadcom.com>
> 
> Fix following compilation error when CONFIG_ARM64 is defined
> 
> Error: unknown or missing system register name at operand 2
> -- `mrs x0,daifmsr daifset,#3'
> 
> Signed-off-by: Shaibal.Dutta <shaibal.dutta@broadcom.com>
> Signed-off-by: Darwin Rambo <drambo@broadcom.com>
> Reviewed-by: Darwin Rambo <drambo@broadcom.com>
> ---

I don't get any such error. Which board and which compiler does it
appear for?

Amicalement,
Steve Rae July 4, 2014, 10:55 p.m. UTC | #2
Albert,

I don't think that there is any code currently submitted that triggers 
this error.
(it is "hidden" inside inline functions...)

However, you could add one line of code 'anywhere' to test this:
	test_and_set_bit(1, (volatile void *)0x12345678);

Thanks, Steve

PS.
- using: 
gcc-linaro-aarch64-linux-gnu-4.8-2014.01_linux/bin/aarch64-linux-gnu-
- and:    ./MAKEALL -a aarch64


On 14-07-04 02:41 PM, Albert ARIBAUD wrote:
> Hi Darwin,
>
> On Mon, 9 Jun 2014 13:25:52 -0700, Darwin Rambo <drambo@broadcom.com>
> wrote:
>
>> From: "Shaibal.Dutta" <shaibal.dutta@broadcom.com>
>>
>> Fix following compilation error when CONFIG_ARM64 is defined
>>
>> Error: unknown or missing system register name at operand 2
>> -- `mrs x0,daifmsr daifset,#3'
>>
>> Signed-off-by: Shaibal.Dutta <shaibal.dutta@broadcom.com>
>> Signed-off-by: Darwin Rambo <drambo@broadcom.com>
>> Reviewed-by: Darwin Rambo <drambo@broadcom.com>
>> ---
>
> I don't get any such error. Which board and which compiler does it
> appear for?
>
> Amicalement,
>
Albert ARIBAUD July 5, 2014, 9:03 a.m. UTC | #3
Hi Darwin,

On Mon, 9 Jun 2014 13:25:52 -0700, Darwin Rambo <drambo@broadcom.com>
wrote:

> From: "Shaibal.Dutta" <shaibal.dutta@broadcom.com>
> 
> Fix following compilation error when CONFIG_ARM64 is defined
> 
> Error: unknown or missing system register name at operand 2
> -- `mrs x0,daifmsr daifset,#3'
> 
> Signed-off-by: Shaibal.Dutta <shaibal.dutta@broadcom.com>
> Signed-off-by: Darwin Rambo <drambo@broadcom.com>
> Reviewed-by: Darwin Rambo <drambo@broadcom.com>
> ---
> 
>  arch/arm/include/asm/proc-armv/system.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/include/asm/proc-armv/system.h b/arch/arm/include/asm/proc-armv/system.h
> index 693d1f4..c61374e 100644
> --- a/arch/arm/include/asm/proc-armv/system.h
> +++ b/arch/arm/include/asm/proc-armv/system.h
> @@ -22,7 +22,7 @@
>  #define local_irq_save(flags)					\
>  	({							\
>  	asm volatile(						\
> -	"mrs	%0, daif"					\
> +	"mrs	%0, daif\n"					\
>  	"msr	daifset, #3"					\
>  	: "=r" (flags)						\
>  	:							\

Applied to u-boot-arm/master, thanks!

Amicalement,
diff mbox

Patch

diff --git a/arch/arm/include/asm/proc-armv/system.h b/arch/arm/include/asm/proc-armv/system.h
index 693d1f4..c61374e 100644
--- a/arch/arm/include/asm/proc-armv/system.h
+++ b/arch/arm/include/asm/proc-armv/system.h
@@ -22,7 +22,7 @@ 
 #define local_irq_save(flags)					\
 	({							\
 	asm volatile(						\
-	"mrs	%0, daif"					\
+	"mrs	%0, daif\n"					\
 	"msr	daifset, #3"					\
 	: "=r" (flags)						\
 	:							\