From patchwork Tue May 24 00:04:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9132535 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 92FCC607D3 for ; Tue, 24 May 2016 00:08:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EECB2824F for ; Tue, 24 May 2016 00:08:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52DB728260; Tue, 24 May 2016 00:08:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 70B1A2824F for ; Tue, 24 May 2016 00:08:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b4zrz-0006Ku-EV; Tue, 24 May 2016 00:06:47 +0000 Received: from mail-bn1on0070.outbound.protection.outlook.com ([157.56.110.70] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b4zr5-0005RI-08 for linux-arm-kernel@lists.infradead.org; Tue, 24 May 2016 00:05:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Qr0z2mEVSbcsRCHapxDPb1o7sT6qHID5sOiVImnjtfY=; b=paH59bBQeIimq7z3iYK5h++wsDhnjPClnqxfvxoT28mfYEeyeVQI12QjOLqjb2UBCrvsaDw/u/ddNiG1XELlUG+FkKJ54iqq8G3z53YnLQxht5j70CDkOkynpQULIBmOFKeEc4YUAbm+jN3Yl00YpDktwZH3HREDcC+oBw2u8UA= Authentication-Results: arndb.de; dkim=none (message not signed) header.d=none;arndb.de; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (50.233.148.158) by DM3PR07MB2235.namprd07.prod.outlook.com (10.164.33.145) with Microsoft SMTP Server (TLS) id 15.1.501.7; Tue, 24 May 2016 00:05:30 +0000 From: Yury Norov To: , , , , , , , Subject: [PATCH 07/23] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option Date: Tue, 24 May 2016 03:04:36 +0300 Message-ID: <1464048292-30136-8-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> References: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [50.233.148.158] X-ClientProxiedBy: SN1PR16CA0006.namprd16.prod.outlook.com (10.169.34.16) To DM3PR07MB2235.namprd07.prod.outlook.com (10.164.33.145) X-MS-Office365-Filtering-Correlation-Id: 26077113-8d52-4d53-8918-08d383671e56 X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2235; 2:SID6gaAZn/ORuXtzC+GpyHYPDw9To/xdidtcrIFgeLoI1rQ7oKXkP+ST1ZIKHQcQZo0M/R6222KAnmYZlHtf+JkJKC1DytfOmsntaU+FLmpJ39POVB5T8bvqD33cKTfWjw5NplOJb91Ex51gXvyLhEblbRthMTWy63IZx7Glb/KRFsu0HkrOQAPOhWVSKKff; 3:bbkjqoGDqrHIBavhLYkYpiOS2RqaHVG8/vMNuyInCZpxSHdCfUpoap7BcOyZt0fm/FBNFQ/5C3bGQnstQ8NWz0H0yUBMAWU1Ypf1r4ZpdxnMlJ1e0wKluK0U1CbWj8ll X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM3PR07MB2235; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2235; 25:BE9yUupubhus+2pVHQZP5ju7b9XMaxL7txcvlLfDxQwl3/8Pn0DWbSnnM6X6RF0MswRcA1kB+nfGgehqdW2ttPQDLpW0gCgx0EItvN2z0wth3saOmDlt7VfBA+a+D1VdK7oYWeaONXus3HCNfa11ByTw5d8aPD/qN1HPcdPFUmNyFTF4AUZyG8/f6jG0xySg4GqYQxwutXNwdFhvbEotj256N58PSiOGdFan0+wVno26bgI6u1DbNVyyk9Hvl6oqz0uOOUv37tEipu0urDEUkEI8juZT+xO8QyPg65wanY3cvDR5VW956d9AlrU5btv8sbV7BP98jfEsDXDesTK9bQMGMUjpSNBPuFHNl3m2K43EMQ+Baox4Tgfg+8p9v4szc4HfBQ/VgANB9XKgswqbyQx40/Ng9++0BCuRgE1dr9Rq3KXgfIhAoCTPDnAA/vxnA6K27Mtx2nUR+krOuB8xJGvDKAmyFOBa4AB7tbaFrkBFKcXyXbf7XmUrqtxBAbcOjj/ixjBLJPaeIXO1OGz+F0FcO1jdH4Df1nPiN4KnnzmRfOL8EBgIepf8oLOBMgVUDsNZvhlsfv6zhrIu7WTizbbAURTkDMT87l1JDK9lxEirjwSGJQKvH1GrwBWtLUOYkIS/Tg9HBmbLqJCIUoVYjj+2fGqaB4ORnvrczD3mVX5bMzb4tXUeymIFpsEjUE8T6IFHbgac4BMGCHjKNEkCOF49oBvzhTKOKKrxF8vZHPXJBwlz6RBmQhIAMNFRdinB X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2235; 20:15v1M96GB7zRpgO+ym+KANgLDrEN9nS28AK5bZ1PInUg4bMlTc/myCF7GHOqSuYnWF/9W7tXvhfbF2pggslyNVRc+e4wFLgwaUmfZ7TkPzTVrQRl8gCsS5YC55NljVKh0RtKFncfhYBkfb9MFWjHZrex8QGqMb5y70hIpnszwwpAG4Zww0Gy5eIS01lvOWNfrncyHwo/aGfFj/hPv4iCJWIUwpBJ/+qVnfH9wSLHOOvOsJRJ9fcZaoHXa9iztSQkuDGQyNW4mG6lvmj1WOxh9B7Lm0TO1vN+QM7G4DvvHoFI3rqYzuYJqeAcgHTY7ZfNaQGcDvJuMWDvS9ugJGBBSukQfZsPGG++k/sI+cCozKzvM8QLYySLRH76sLoTbP24JvRU0yS+hds8dc/VgDnMiSpPquHyMilB3ax/nwJUCBo2imBM51k0eXngLH5UpVGx9iEW+PtpUd+aykNBX+sE4QW8CFAW496FKiWfpOA/Gb0sprTZmXjmRpbC2Mpj7iKwDsyhzc8d01S0LsEK2k4E/RmkDkrEskj4bETTYvoTpp0v3H7olDCGY286yiTJpCzubAxFtLo/uFcAZ7iP57wt6F0TpDLX1cQiWQMfcHc6xFQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:DM3PR07MB2235; BCL:0; PCL:0; RULEID:; SRVR:DM3PR07MB2235; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2235; 4:rsZ53J8quRVUKeXrMhUxFBxAMLKpWoI56OgczajHFXIK6sQrqWBGYYyIfHSysijJzN6kId87rCAtWKNFs0uwg0E9QFJ0dg2+858Fx8dELv52zV6CnjsIYCJ2p/8C7pGLB28L+POrDQc/SVjpe7mYj59y6g32k0QNZb+LASDzI//KgT//K52TZofS5j4h3iVNZCRleGWAbTiLs1Q5B5nZooqf6OwdMq0oeQw+YWFFEvZN456AqKGNNpWLAMqSJorBLb8o6Qx4y868Y7buudwTQ/ggq1ZnYxN0mTuF0e+wMLXTQBVA9F6RKNJkL8+nXLszkYJbjnmU7oDlMbrZel6RLaXu1siQwzyx5eXuGhZDQczXBmX87YtXZzOmFlHbsm9M X-Forefront-PRVS: 09525C61DB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(2906002)(5008740100001)(5001770100001)(92566002)(19580405001)(586003)(50226002)(77096005)(6116002)(19580395003)(229853001)(189998001)(50466002)(48376002)(36756003)(2201001)(66066001)(8676002)(33646002)(47776003)(81166006)(50986999)(575784001)(5003940100001)(42186005)(2950100001)(76176999)(76506005)(4326007)(5004730100002)(15760500001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR07MB2235; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2235; 23:Vf5X7vZ2+NytiRm81SBP8dHsoD212n6ViN6CBb/gIVI9jA331iMes3dIl0K1OhCqrR6zP/dVbigjvSFx3qH0RWeUBA8BAh/oKGaBcSVSDvxChVEdr2GKWvM5mjsmvdKcsXztUES9u5Cet+/1deXIQe7T5vKLJCFTcuInH/YYWBJcJCUSVY7OBvGLVXyzybwdX0NX01uQRSnkVcNXyy4mTH6FporXfkco9CmxIAgD4aa9abLWKUW53JB8yDTn4XYfSnRuq6S8oZA7hJOw6e22x7gR5jbMxjw+1CW760kkSl56AroywbA1tR0yxkSQ8c4BUg1DAJGnc05eVvcJp3/evxnYXwpA8DfW2eL7feZCFnHPt/YwGSM1uh33W2w9ch3DvOydTi/pYrNQAfsIcy2D91YdVS1A3tC3ysiF1QW6b40/abkPoGC7EoUwi0UWMLpYEMhzxZoan9mUKflr0LmJPEkEjnkKmuUKTFYykjBXBOhtlh3fgR7LyMZIr7gqVAlyGZstwvGsvV4zgmm+SOqx8WIlbMYyAwUGZuK6imhao91gg/4XY/kYITm43OJXMFzwk3ofL6WBE4EGRFKyqJDE76cVVi5F5HuoY57X0OEMM+WMt2CA3Nq2kDO7qlifl0tZ9Asp79VxY/NGJUJzf2qw1XsrwoUUaUmudlBOOxFYviwB85pntDKSCMGSVPeo8He5041McH1shtuN35cfwcEqFTW0lRMgZrR9Wlx7CU6RG8jsDRI3a6kmn3KAlj0aqYYsUPgsBbN/hPdFxvFegfZYLF/hgwn6pRL4fefqcKlrAO4ohkoId5xVQpfpcL9pbLMNqn9GbvTE8UEn3vQrfIEfTLhcc8Eo2Nevx/qlHIvlhb0vL5M6iZ/kvqHy8KB++uCwn1cY3TMpHQAhpAjPEekLop/DXTCo3UKVPwwifY70+/5Tg5DYWms2xn2arAGm2Eo0 X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2235; 5:9iNTqwF4hRjwMZ93zRp7A8/tXwX/1KwDCxGmzDu+DF5YHDDcZwQBBmt1YwFd030Z3lhETy8Ja62g5uQA3P7lNxEr0j5apGE4V9bVr2gXUVEh27peKCrWxVyA8kMDDHYsmOPRrC7ezPR0V9o1vjUiLA==; 24:mAPKu7JRVDDyLOYojL4WB4yvBO3o7Lu1bssnrugdiRRWCT2jXhYieb3FMheOo2y8na1TDZhcZ99xXrfn2R6PAWJRxeBgl60bB20PgzJUd8k=; 7:U1gon23MTqbzdmuLT0iTAHkNyN5NCxf4NL167LDxefZwO6D5ho8/yFPdsRHdPddBEKNgU28AZDdrmu7wsvM9ZQU2RqXtD4NcCliQa0CU5KJi8wSO2CJiddjerfx0zfeaCCNn4mr/hGgkBxI7ht1XqisiMkYOcdzm4UGwAiZmChmmxLpGSCHSc9F0oCAGPsFl SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2016 00:05:30.1042 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2235 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160523_170551_457252_903396B2 X-CRM114-Status: UNSURE ( 8.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kilobyte@angband.pl, pinskia@gmail.com, szabolcs.nagy@arm.com, Nathan_Lynch@mentor.com, heiko.carstens@de.ibm.com, agraf@suse.de, geert@linux-m68k.org, Prasun.Kapoor@caviumnetworks.com, klimov.linux@gmail.com, broonie@kernel.org, ynorov@caviumnetworks.com, schwidefsky@de.ibm.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, joseph@codesourcery.com, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP All new 32-bit architectures should have 64-bit off_t type, but existing architectures has 32-bit ones. To handle it, new config option is added to arch/Kconfig that defaults ARCH_32BIT_OFF_T to be disabled for non-64 bit architectures. All existing 32-bit architectures enable it explicitly here. New option affects force_o_largefile() behaviour. Namely, if off_t is 64-bits long, we have no reason to reject user to open big files. Note that even if architectures has only 64-bit off_t in the kernel (arc, c6x, h8300, hexagon, metag, nios2, openrisc, tile32 and unicore32), a libc may use 32-bit off_t, and therefore want to limit the file size to 4GB unless specified differently in the open flags. Signed-off-by: Yury Norov --- arch/Kconfig | 4 ++++ arch/arc/Kconfig | 1 + arch/arm/Kconfig | 1 + arch/blackfin/Kconfig | 1 + arch/cris/Kconfig | 1 + arch/frv/Kconfig | 1 + arch/h8300/Kconfig | 1 + arch/hexagon/Kconfig | 1 + arch/m32r/Kconfig | 1 + arch/m68k/Kconfig | 1 + arch/metag/Kconfig | 1 + arch/microblaze/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/mn10300/Kconfig | 1 + arch/nios2/Kconfig | 1 + arch/openrisc/Kconfig | 1 + arch/parisc/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/score/Kconfig | 1 + arch/sh/Kconfig | 1 + arch/sparc/Kconfig | 1 + arch/tile/Kconfig | 1 + arch/unicore32/Kconfig | 1 + arch/x86/Kconfig | 1 + arch/x86/um/Kconfig | 1 + arch/xtensa/Kconfig | 1 + include/linux/fcntl.h | 2 +- 27 files changed, 30 insertions(+), 1 deletion(-) diff --git a/arch/Kconfig b/arch/Kconfig index 92fcbd4..a2b7cf3 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -230,6 +230,10 @@ config ARCH_THREAD_INFO_ALLOCATOR config ARCH_WANTS_DYNAMIC_TASK_STRUCT bool +config ARCH_32BIT_OFF_T + bool + depends on !64BIT + config HAVE_REGS_AND_STACK_ACCESS_API bool help diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index a876743..13f66cc 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -9,6 +9,7 @@ config ARC def_bool y select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC + select ARCH_32BIT_OFF_T select BUILDTIME_EXTABLE_SORT select COMMON_CLK select CLONE_BACKWARDS diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cdfa6c2..efe3ca2 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1,6 +1,7 @@ config ARM bool default y + select ARCH_32BIT_OFF_T select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_ELF_RANDOMIZE diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index a63c122..ef4368e 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -12,6 +12,7 @@ config RWSEM_XCHGADD_ALGORITHM config BLACKFIN def_bool y + select ARCH_32BIT_OFF_T select HAVE_ARCH_KGDB select HAVE_ARCH_TRACEHOOK select HAVE_DYNAMIC_FTRACE diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index e086f9e..5bc9203 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig @@ -50,6 +50,7 @@ config LOCKDEP_SUPPORT config CRIS bool default y + select ARCH_32BIT_OFF_T select HAVE_IDE select GENERIC_ATOMIC64 select HAVE_UID16 diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index eefd9a4..2f14904 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig @@ -1,6 +1,7 @@ config FRV bool default y + select ARCH_32BIT_OFF_T select HAVE_IDE select HAVE_ARCH_TRACEHOOK select HAVE_PERF_EVENTS diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 986ea84..8c221f1 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig @@ -1,5 +1,6 @@ config H8300 def_bool y + select ARCH_32BIT_OFF_T select GENERIC_ATOMIC64 select HAVE_UID16 select VIRT_TO_BUS diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index 57298e7..df84602 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig @@ -3,6 +3,7 @@ comment "Linux Kernel Configuration for Hexagon" config HEXAGON def_bool y + select ARCH_32BIT_OFF_T select HAVE_OPROFILE # Other pending projects/to-do items. # select HAVE_REGS_AND_STACK_ACCESS_API diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index c82b292..7866bca 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -1,6 +1,7 @@ config M32R bool default y + select ARCH_32BIT_OFF_T select HAVE_IDE select HAVE_OPROFILE select INIT_ALL_POSSIBLE diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 498b567..e9897e4 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -1,6 +1,7 @@ config M68K bool default y + select ARCH_32BIT_OFF_T select ARCH_MIGHT_HAVE_PC_PARPORT if ISA select HAVE_IDE select HAVE_AOUT if MMU diff --git a/arch/metag/Kconfig b/arch/metag/Kconfig index a0fa88d..5b7620a 100644 --- a/arch/metag/Kconfig +++ b/arch/metag/Kconfig @@ -1,5 +1,6 @@ config METAG def_bool y + select ARCH_32BIT_OFF_T select EMBEDDED select GENERIC_ATOMIC64 select GENERIC_CLOCKEVENTS diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 3d793b5..bdb0f83 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig @@ -1,5 +1,6 @@ config MICROBLAZE def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_GCOV_PROFILE_ALL select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_WANT_IPC_PARSE_VERSION diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 2018c2b..079a6d2 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -1,6 +1,7 @@ config MIPS bool default y + select ARCH_32BIT_OFF_T if !64BIT select ARCH_SUPPORTS_UPROBES select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index 06ddb55..bc1aae5 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig @@ -1,5 +1,6 @@ config MN10300 def_bool y + select ARCH_32BIT_OFF_T select HAVE_OPROFILE select HAVE_UID16 select GENERIC_IRQ_SHOW diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig index 4375554..a38fc38 100644 --- a/arch/nios2/Kconfig +++ b/arch/nios2/Kconfig @@ -1,5 +1,6 @@ config NIOS2 def_bool y + select ARCH_32BIT_OFF_T select ARCH_WANT_OPTIONAL_GPIOLIB select CLKSRC_OF select GENERIC_ATOMIC64 diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index e118c02..0271714 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig @@ -5,6 +5,7 @@ config OPENRISC def_bool y + select ARCH_32BIT_OFF_T select OF select OF_EARLY_FLATTREE select IRQ_DOMAIN diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 88cfaa8..affad75 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -1,5 +1,6 @@ config PARISC def_bool y + select ARCH_32BIT_OFF_T if !64BIT select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS select ARCH_MIGHT_HAVE_PC_PARPORT select HAVE_IDE diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 7cd32c0..2c7a795 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -85,6 +85,7 @@ config ARCH_HAS_DMA_SET_COHERENT_MASK config PPC bool default y + select ARCH_32BIT_OFF_T if PPC32 select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO select BINFMT_ELF diff --git a/arch/score/Kconfig b/arch/score/Kconfig index 366e1b5..bc7bc7a 100644 --- a/arch/score/Kconfig +++ b/arch/score/Kconfig @@ -2,6 +2,7 @@ menu "Machine selection" config SCORE def_bool y + select ARCH_32BIT_OFF_T select GENERIC_IRQ_SHOW select GENERIC_IOMAP select GENERIC_ATOMIC64 diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 7ed20fc..2438390 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -52,6 +52,7 @@ config SUPERH config SUPERH32 def_bool ARCH = "sh" + select ARCH_32BIT_OFF_T select HAVE_KPROBES select HAVE_KRETPROBES select HAVE_IOREMAP_PROT if MMU && !X2TLB diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 57ffaf2..c88b82d 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -45,6 +45,7 @@ config SPARC config SPARC32 def_bool !64BIT + select ARCH_32BIT_OFF_T select GENERIC_ATOMIC64 select CLZ_TAB select HAVE_UID16 diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 8171930..f9d61e7 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig @@ -3,6 +3,7 @@ config TILE def_bool y + select ARCH_32BIT_OFF_T if !64BIT select HAVE_PERF_EVENTS select USE_PMC if PERF_EVENTS select HAVE_DMA_API_DEBUG diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index e5602ee..b995104 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -1,6 +1,7 @@ config UNICORE32 def_bool y select ARCH_HAS_DEVMEM_IS_ALLOWED + select ARCH_32BIT_OFF_T select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO select HAVE_MEMBLOCK diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 2dc18605..3628b14 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -20,6 +20,7 @@ config X86 select ACPI_LEGACY_TABLES_LOOKUP if ACPI select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI select ANON_INODES + select ARCH_32BIT_OFF_T if X86_32 select ARCH_CLOCKSOURCE_DATA select ARCH_DISCARD_MEMBLOCK select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig index ed56a1c..8436bcd 100644 --- a/arch/x86/um/Kconfig +++ b/arch/x86/um/Kconfig @@ -21,6 +21,7 @@ config 64BIT config X86_32 def_bool !64BIT select HAVE_AOUT + select ARCH_32BIT_OFF_T select ARCH_WANT_IPC_PARSE_VERSION select MODULES_USE_ELF_REL select CLONE_BACKWARDS diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index e832d3e..b68de31 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -3,6 +3,7 @@ config ZONE_DMA config XTENSA def_bool y + select ARCH_32BIT_OFF_T select ARCH_WANT_FRAME_POINTERS select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_OPTIONAL_GPIOLIB diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h index 76ce329..46960a1 100644 --- a/include/linux/fcntl.h +++ b/include/linux/fcntl.h @@ -5,7 +5,7 @@ #ifndef force_o_largefile -#define force_o_largefile() (BITS_PER_LONG != 32) +#define force_o_largefile() (!IS_ENABLED(CONFIG_ARCH_32BIT_OFF_T)) #endif #if BITS_PER_LONG == 32