summaryrefslogtreecommitdiff
path: root/arch/arm64
diff options
context:
space:
mode:
authorSumit Singh <sumsingh@nvidia.com>2014-04-18 20:19:46 +0530
committerRiham Haidar <rhaidar@nvidia.com>2014-06-13 11:54:19 -0700
commit39e218ca7a2820577234f40053283a42e1d46b37 (patch)
treef444cfbf1909310e5293065e8684dcd23c0d4484 /arch/arm64
parent2c6c579ed26b72190bd0782703d7f0b65174a858 (diff)
arm64: asm: relaxed.h: defined relaxed.h
Defined a new header file relaxed.h, which contains arm64 specific macros which will be used to improve power efficiency of arm64. bug 1440421 Change-Id: Iee14115490cb16001d5eac9e309ee6e088b88f44 Signed-off-by: Sumit Singh <sumsingh@nvidia.com> Reviewed-on: http://git-master/r/398323 (cherry picked from commit beb69cd6d2893c36712d4f927e41da0de729d651) Reviewed-on: http://git-master/r/422212 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/include/asm/relaxed.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/relaxed.h b/arch/arm64/include/asm/relaxed.h
new file mode 100644
index 000000000000..08a217934c41
--- /dev/null
+++ b/arch/arm64/include/asm/relaxed.h
@@ -0,0 +1,33 @@
+/*
+ * arm64/include/asm/relaxed.h
+ *
+ * Copyright (c) 2014 NVIDIA Corporation. All rights reserved.
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _ASM_RELAXED_H_
+#define _ASM_RELAXED_H_
+
+#include <asm/atomic.h>
+
+#ifndef cpu_relaxed_read_short
+#define cpu_relaxed_read_short(p) ldax16(p)
+#endif
+
+#ifndef cpu_relaxed_read
+#define cpu_relaxed_read(p) ldax32(p)
+#endif
+
+#ifndef cpu_relaxed_read_long
+#define cpu_relaxed_read_long(p) ldax64((u64 *)p)
+#endif
+
+#include <asm-generic/relaxed.h>
+#endif /*_ASM_RELAXED_H_*/