diff options
| author | Sumit Singh <sumsingh@nvidia.com> | 2014-04-02 15:03:15 +0530 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-09-10 12:07:01 +0200 |
| commit | a73ee335b305b230fa67f67f7cbd365157eee457 (patch) | |
| tree | e6d4a08c7ba2f2530e69e52dccaeb2afb1d5efed /include/asm-generic/atomic.h | |
| parent | a5a41011a159de6f3551b6ef99eb3a2d2fffbae7 (diff) | |
asm-generic: atomic.h: 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: I6ac26653ec3d62f74d8c21f250dcdaf9dfb75b9b
Signed-off-by: Alex Van Brunt <avanbrunt@nvidia.com>
(cherry picked from commit 7360c3df73afa07361eecab730903e0697d3408f)
Signed-off-by: Sumit Singh <sumsingh@nvidia.com>
Reviewed-on: http://git-master/r/415628
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Diffstat (limited to 'include/asm-generic/atomic.h')
| -rw-r--r-- | include/asm-generic/atomic.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index 33bd2de3b..b049c2e09 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h @@ -6,6 +6,7 @@ * * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) + * 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 Licence @@ -44,6 +45,10 @@ #define atomic_read(v) (*(volatile int *)&(v)->counter) #endif +#ifndef cpu_relaxed_read_atomic +#define cpu_relaxed_read_atomic(v) atomic_read(v) +#endif + /** * atomic_set - set atomic variable * @v: pointer of type atomic_t |
