From patchwork Wed Apr 11 15:07:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 133145 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp744937ljb; Wed, 11 Apr 2018 08:09:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx49NAEU0eGPs25hFBU1wp4vbJfSnq6A71/bU5zCsPdrG3LnEEcl01w+zZ8T+gk8BE2ac5Iue X-Received: by 10.99.116.67 with SMTP id e3mr3681211pgn.369.1523459369938; Wed, 11 Apr 2018 08:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523459369; cv=none; d=google.com; s=arc-20160816; b=v9GVH+rpiBaYsf3vaxXh9rDaOkqKcR44U/XhjmPKImEfZZfYNtdSLrAe4qKbwyjbg9 sIppSpHIDc5whddIwpdkFhNqpRaabQcSWgV/xqxaOpkpsocQaD6N6OFwBurJGHQD9WTP hGC9RJPJMJV6OwOBruYAxXlV7Ze3ZtElZA7G2lQq8BPdWz6eVxwg68qN3WKzhLRhe1yy 4G/RbF0vWmOP43n/WoVi4Uylyyz7PV8o6PEnYuTwEjM9RGbskSTuamQB7JuNg2+xFyR4 OSPuFFEuZZE3mhYnoRak8x+vsmQMyf0lkvex6YVGXeK0EnZkL5PwVLBhUh65YXfs2Xfi rBzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=oOSeEaOMEF98k7jkbp7cxniM+ObhDIyYfSUgBRBq5rc=; b=NNC0E11qPAGS+n+8ZM+tTCMweLUwsK2Xjs7ZW9UxPZF+HljbPhFnFPuRIe6wkp5pMj TE2GvcCoFYjkN6sRE5txOpAhUF4azcinXy4n5Sw4k/uhecj/jq1mJde1q55o5HxQL0qV y+ERRHQM2Z5qhfTkks0i/wLQ17pGcNptG5pcVq9nDaYGqQ92CBSvfVHzQX/B8OELULtc O5VR4nS1fd62MDf7wzO2bM20uH4lfyRy7yba93rY97HE856FBl02M58U7e118cqmAgXW IcK2VH76L2sUEblAOscKnWKbxrZchFNUDqn5owqdbz1ZUlb0hclfDfdGCpAavSXpo7pN Ehng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2-v6si1295248plt.441.2018.04.11.08.09.29; Wed, 11 Apr 2018 08:09:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752997AbeDKPJY (ORCPT + 29 others); Wed, 11 Apr 2018 11:09:24 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:38433 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751546AbeDKPJX (ORCPT ); Wed, 11 Apr 2018 11:09:23 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0Lxrpw-1eRlVy1YtY-015JkG; Wed, 11 Apr 2018 17:08:38 +0200 From: Arnd Bergmann To: "David S. Miller" , Thomas Gleixner , Deepa Dinamani Cc: y2038@lists.linaro.org, Arnd Bergmann , "Eric W. Biederman" , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] sparc: compat: allow including asm/compat.h for 32-bit Date: Wed, 11 Apr 2018 17:07:58 +0200 Message-Id: <20180411150829.3881900-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:F0StjCM43m+Fsqz42HCF6xC0y0dwwrU/CJGBLhCOjpPD4UPF/YW +gH0pmhKqa7sul7nN9tUYEz89Zv0plWRkL8NZun+lN8iN9KTz/AaVP9fglQL0i/wn/qE3MR AUnNfyldEevH35boJ7XWNfsiX9oOwmHKkQ7SRj5QFzoF7zG6CoOBbuMQ4Yvcc4o3BkG/3Y7 IY30QiJkeL1MNkMj0DPjA== X-UI-Out-Filterresults: notjunk:1; V01:K0:wERnXFiNdh8=:yQQ0SySB+fERB38ASa/kE/ 4o3cb9fmKGzaDbTpsg92+o+bDnUnl/PkeGGU2t7fT64Gz1FYzr2F4eRX/0mAPSzMtpDKaJZBd pKfK7VA9qVCxLcXnDjeC7RiUacFYpiUkXvV1hhBeNqggOL1TMVb68xCIWCxrMwJoDhNUoIXGi exgVFux1AXQ/J4jwcXaBrmY/UHDJXIaqV4r5WjVMqxpFmBMn2y21gC0Y7ZpKewL74to736K58 zdE7HSmRutE+CiRTHDEOsFgce8YN1ZrlsPjPjMOguOoNO20C/vcfjZ+EuMkh+7v04jZwriGCK n86ttZeH7hr10nizYxY5sQWPzQya9Cxb5vF7578HwhW+PPcCImphmzAL5JuNjsTjLuD3kkLww nZCFG60QBSu7KtwZaiwHAWRKmdDctYMNtfPECPHDfodsMFSupF4OTG1PIrGjhtS/Gq6gbZ+nT ihg3Rjv2LfFlWhHYJ7qsYqxuqlE+86y8Y7vnafYw0sx4JUcWcYmSFCjtfHPb9aL9g04A0iHUj o4H1ZTAoFGH45bHLMhuqvFe2daAWx30WElB4PIhnvqi7poKLaysVe1cCqBY1eMk5wjBU68n9p sGyoMgU8UzGUNz8s6Gip3REUy0HD4djCVqQaIj4TZez6ohLmSWWHqRZdKwqT8EAo9Playdkdi ZOxKH8GxlPJ7XKYTu26vmuxQmpZMWHa+G9b2I2TOqEFPCluT/yfGeFErTP1tbwsGCrZD0RTIR jpWPBDWqxSJ957H5VlR1E0useCnoY4NKkGmAgQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We have several files on sparc that include linux/compat.h and expect asm/compat.h not to be included, otherwise we get a build failure. Since we need to include asm/compat.h for compat time_t handling on all 32-bit architectures now, this hides some portions of asm/compat.h in order to let the rest of the file get included. Signed-off-by: Arnd Bergmann --- arch/sparc/include/asm/compat.h | 4 ++++ 1 file changed, 4 insertions(+) This is the fix for the y2038 syscall series that missed the 4.17 merge window. I've now spent two more days doing extra build testing on all 64-bit archtectures building with and without CONFIG_COMPAT, as well as without CONFIG_64BIT. I did not run into any additional build failures after this patch, so my plan is to pick that up into my y2038 tree after -rc1 and send Thomas a pull request a few days later for inclusion in linux-4.18. -- 2.9.0 diff --git a/arch/sparc/include/asm/compat.h b/arch/sparc/include/asm/compat.h index 161aeacbc9ad..4eb51d2dae98 100644 --- a/arch/sparc/include/asm/compat.h +++ b/arch/sparc/include/asm/compat.h @@ -157,6 +157,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr) return (u32)(unsigned long)uptr; } +#ifdef CONFIG_COMPAT static inline void __user *arch_compat_alloc_user_space(long len) { struct pt_regs *regs = current_thread_info()->kregs; @@ -173,6 +174,7 @@ static inline void __user *arch_compat_alloc_user_space(long len) return (void __user *) usp; } +#endif struct compat_ipc64_perm { compat_key_t key; @@ -232,6 +234,7 @@ struct compat_shmid64_ds { unsigned int __unused2; }; +#ifdef CONFIG_COMPAT static inline int is_compat_task(void) { return test_thread_flag(TIF_32BIT); @@ -243,5 +246,6 @@ static inline bool in_compat_syscall(void) return pt_regs_trap_type(current_pt_regs()) == 0x110; } #define in_compat_syscall in_compat_syscall +#endif #endif /* _ASM_SPARC64_COMPAT_H */