diff mbox

Add write memory barrier for aarch64

Message ID 1407483930-17040-1-git-send-email-ankit.jindal@linaro.org
State New
Headers show

Commit Message

Ankit Jindal Aug. 8, 2014, 7:45 a.m. UTC
This patch updates odp_sync_stores routine to add write memory barrier for
aarch64.

Signed-off-by: Ankit Jindal <ankit.jindal@linaro.org>
Signed-off-by: Tushar Jagad <tushar.jagad@linaro.org>
---
 include/odp_sync.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Anders Roxell Aug. 8, 2014, 9:46 a.m. UTC | #1
On 2014-08-08 13:15, Ankit Jindal wrote:
> This patch updates odp_sync_stores routine to add write memory barrier for
> aarch64.
> 
> Signed-off-by: Ankit Jindal <ankit.jindal@linaro.org>
> Signed-off-by: Tushar Jagad <tushar.jagad@linaro.org>
> ---
>  include/odp_sync.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/odp_sync.h b/include/odp_sync.h
> index c106c75..ba73ac0 100644
> --- a/include/odp_sync.h
> +++ b/include/odp_sync.h
> @@ -31,7 +31,7 @@ static inline void odp_sync_stores(void)
>  
>  	__asm__  __volatile__ ("sfence\n" : : : "memory");
>  
> -#elif defined __arm__
> +#elif defined __arm_ || defined __aarch64__

change __arm_ to __arm__ right?

>  
>  	__asm__ __volatile__ ("dmb st" : : : "memory");
>  
> -- 
> 1.7.9.5
> 
> 
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp

Don't we need to add it in this file as well?
platform/linux-generic/include/odp_spin_internal.h
and maybe add __ARM_ARCH == 8 there as well?

Cheers,
Anders
Ankit Jindal Aug. 8, 2014, 10:44 a.m. UTC | #2
On 8 August 2014 15:16, Anders Roxell <anders.roxell@linaro.org> wrote:
> On 2014-08-08 13:15, Ankit Jindal wrote:
>> This patch updates odp_sync_stores routine to add write memory barrier for
>> aarch64.
>>
>> Signed-off-by: Ankit Jindal <ankit.jindal@linaro.org>
>> Signed-off-by: Tushar Jagad <tushar.jagad@linaro.org>
>> ---
>>  include/odp_sync.h |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/odp_sync.h b/include/odp_sync.h
>> index c106c75..ba73ac0 100644
>> --- a/include/odp_sync.h
>> +++ b/include/odp_sync.h
>> @@ -31,7 +31,7 @@ static inline void odp_sync_stores(void)
>>
>>       __asm__  __volatile__ ("sfence\n" : : : "memory");
>>
>> -#elif defined __arm__
>> +#elif defined __arm_ || defined __aarch64__
>
> change __arm_ to __arm__ right?

Oops, will send next version.

>
>>
>>       __asm__ __volatile__ ("dmb st" : : : "memory");
>>
>> --
>> 1.7.9.5
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>
> Don't we need to add it in this file as well?
> platform/linux-generic/include/odp_spin_internal.h
> and maybe add __ARM_ARCH == 8 there as well?
I do not think this is required for aarch64.
>
> Cheers,
> Anders
Thanks,
Ankit
diff mbox

Patch

diff --git a/include/odp_sync.h b/include/odp_sync.h
index c106c75..ba73ac0 100644
--- a/include/odp_sync.h
+++ b/include/odp_sync.h
@@ -31,7 +31,7 @@  static inline void odp_sync_stores(void)
 
 	__asm__  __volatile__ ("sfence\n" : : : "memory");
 
-#elif defined __arm__
+#elif defined __arm_ || defined __aarch64__
 
 	__asm__ __volatile__ ("dmb st" : : : "memory");