From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932725AbeCLRxs (ORCPT ); Mon, 12 Mar 2018 13:53:48 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:34784 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932231AbeCLRxq (ORCPT ); Mon, 12 Mar 2018 13:53:46 -0400 X-Google-Smtp-Source: AG47ELtbDAXrhxblHX2VGYqK9dEDLSM2ejTEzinvLwx5hl95ae8aMJ+u9Et/f5j7iZr1HIQVgDactA== From: Deepa Dinamani To: arnd@arndb.de, tglx@linutronix.de, john.stultz@linaro.org Cc: linux-kernel@vger.kernel.org, y2038@lists.linaro.org Subject: [PATCH v4 01/10] compat: Make compat helpers independent of CONFIG_COMPAT Date: Mon, 12 Mar 2018 10:52:58 -0700 Message-Id: <20180312175307.11032-2-deepa.kernel@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180312175307.11032-1-deepa.kernel@gmail.com> References: <20180312175307.11032-1-deepa.kernel@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Many of the compat time syscalls are also repurposed as 32 bit native syscalls to provide backward compatibility while adding new y2038 safe sycalls. Enabling the helpers makes this possible. Signed-off-by: Arnd Bergmann Signed-off-by: Deepa Dinamani --- include/linux/compat.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/linux/compat.h b/include/linux/compat.h index 16c3027074a2..bdf1908a392e 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -8,8 +8,6 @@ #include -#ifdef CONFIG_COMPAT - #include #include /* for HZ */ #include @@ -20,9 +18,11 @@ #include #include +#ifdef CONFIG_COMPAT #include #include #include +#endif #ifndef COMPAT_USE_64BIT_TIME #define COMPAT_USE_64BIT_TIME 0 @@ -59,6 +59,8 @@ } \ static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) +#ifdef CONFIG_COMPAT + #ifndef compat_user_stack_pointer #define compat_user_stack_pointer() current_user_stack_pointer() #endif @@ -891,7 +893,9 @@ static inline struct compat_timeval ns_to_compat_timeval(s64 nsec) #else /* !CONFIG_COMPAT */ #define is_compat_task() (0) +#ifndef in_compat_syscall static inline bool in_compat_syscall(void) { return false; } +#endif #endif /* CONFIG_COMPAT */ -- 2.14.1