diff options
author | Sumit Singh <sumsingh@nvidia.com> | 2014-04-19 13:12:58 +0530 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-06-13 11:54:11 -0700 |
commit | c3efa37ecb2c569d26463529027885727f3250ba (patch) | |
tree | 0bd8af57e572e1d9b415be1bc54e248c25a42f01 /arch/arm64 | |
parent | cc1fbd57e8f9a277bd3cb1c618fd7c8811292a56 (diff) |
arm64: atomic.h: defining relaxed atomic_read
Defining relaxed version of atomic read as cpu_relaxed_read_atomic
which will be used for improving power efficiency for arm64.
bug 1440421
Change-Id: I5a88b8e66ec3021335905109010efc856ffa7c7e
Signed-off-by: Alex Van Brunt <avanbrunt@nvidia.com>
(cherry picked from commit f53c05073d148adfe7abe153f1569c4bd655fb44)
Signed-off-by: Sumit Singh <sumsingh@nvidia.com>
Reviewed-on: http://git-master/r/415639
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/include/asm/atomic.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/atomic.h b/arch/arm64/include/asm/atomic.h index 735e3317ba02..916b16889f24 100644 --- a/arch/arm64/include/asm/atomic.h +++ b/arch/arm64/include/asm/atomic.h @@ -4,6 +4,7 @@ * Copyright (C) 1996 Russell King. * Copyright (C) 2002 Deep Blue Solutions Ltd. * Copyright (C) 2012 ARM Ltd. + * Copyright (C) 2014, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -37,6 +38,7 @@ */ #define atomic_read(v) (*(volatile int *)&(v)->counter) #define atomic_set(v,i) (((v)->counter) = (i)) +#define cpu_relaxed_read_atomic(v) ldax32((volatile int *)&(v->counter)) /* * Macros for generating inline functions to use special load and store |