[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180705213604.18883-2-deepa.kernel@gmail.com>
Date: Thu, 5 Jul 2018 14:35:58 -0700
From: Deepa Dinamani <deepa.kernel@...il.com>
To: tglx@...utronix.de, linux-kernel@...r.kernel.org
Cc: arnd@...db.de, y2038@...ts.linaro.org, catalin.marinas@....com
Subject: [PATCH v2 1/7] arm64: Make basic compat_* types always available
As we repurpose more compat syscalls to be used in non CONFIG_COMPAT
usecases as part of solving y2038, we need to make these basic types
available unconditionally.
Signed-off-by: Deepa Dinamani <deepa.kernel@...il.com>
Cc: catalin.marinas@....com
---
arch/arm64/include/asm/compat.h | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h
index 1a037b94eba1..2dbb179b5dc4 100644
--- a/arch/arm64/include/asm/compat.h
+++ b/arch/arm64/include/asm/compat.h
@@ -16,21 +16,14 @@
#ifndef __ASM_COMPAT_H
#define __ASM_COMPAT_H
#ifdef __KERNEL__
-#ifdef CONFIG_COMPAT
-/*
- * Architecture specific compatibility types
- */
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/sched/task_stack.h>
-#define COMPAT_USER_HZ 100
-#ifdef __AARCH64EB__
-#define COMPAT_UTS_MACHINE "armv8b\0\0"
-#else
-#define COMPAT_UTS_MACHINE "armv8l\0\0"
-#endif
+/*
+ * Architecture specific compatibility types
+ */
typedef u32 compat_size_t;
typedef s32 compat_ssize_t;
@@ -65,6 +58,15 @@ typedef u32 compat_ulong_t;
typedef u64 compat_u64;
typedef u32 compat_uptr_t;
+#ifdef CONFIG_COMPAT
+
+#define COMPAT_USER_HZ 100
+#ifdef __AARCH64EB__
+#define COMPAT_UTS_MACHINE "armv8b\0\0"
+#else
+#define COMPAT_UTS_MACHINE "armv8l\0\0"
+#endif
+
struct compat_stat {
#ifdef __AARCH64EB__
short st_dev;
--
2.17.1
Powered by blists - more mailing lists