aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-03-26 16:59:15 +0200
committerArnd Bergmann <arnd@arndb.de>2018-04-19 13:28:51 +0200
commit2b5a9a37e97467fea67070a94529d6d07e549270 (patch)
tree4a92b8ee150e5afeb2e25c3b2ab6115b7f2fd9a7 /include
parentcompat: Make compat helpers independent of CONFIG_COMPAT (diff)
downloadlinux-dev-2b5a9a37e97467fea67070a94529d6d07e549270.tar.xz
linux-dev-2b5a9a37e97467fea67070a94529d6d07e549270.zip
time: Add an asm-generic/compat.h file
We have a couple of files that try to include asm/compat.h on architectures where this is available. Those should generally use the higher-level linux/compat.h file, but that in turn fails to include asm/compat.h when CONFIG_COMPAT is disabled, unless we can provide that header on all architectures. This adds the asm/compat.h for all remaining architectures to simplify the dependencies. Architectures that are getting removed in linux-4.17 are not changed here, to avoid needless conflicts with the removal patches. Those architectures are broken by this patch, but we have already shown that they have no users. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/compat.h3
-rw-r--r--include/linux/compat.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/include/asm-generic/compat.h b/include/asm-generic/compat.h
new file mode 100644
index 000000000000..28819451b6d1
--- /dev/null
+++ b/include/asm-generic/compat.h
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/* This is an empty stub for 32-bit-only architectures */
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 3f35f4cfb98d..48d29b1339be 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -18,8 +18,9 @@
#include <linux/uaccess.h>
#include <linux/unistd.h>
-#ifdef CONFIG_COMPAT
#include <asm/compat.h>
+
+#ifdef CONFIG_COMPAT
#include <asm/siginfo.h>
#include <asm/signal.h>
#endif