From patchwork Fri Jun 17 23:54:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9185193 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 0029A601C0 for ; Fri, 17 Jun 2016 23:56:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DEEEA208C2 for ; Fri, 17 Jun 2016 23:56:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1324280B0; Fri, 17 Jun 2016 23:56:55 +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=BAD_ENC_HEADER,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 2217C208C2 for ; Fri, 17 Jun 2016 23:56:55 +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 1bE3be-0001Yl-GZ; Fri, 17 Jun 2016 23:55:22 +0000 Received: from mail-bn1bon0084.outbound.protection.outlook.com ([157.56.111.84] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bE3bQ-0000HS-1L for linux-arm-kernel@lists.infradead.org; Fri, 17 Jun 2016 23:55:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=nxSXuWAeeD7qytJtWyyRyDvcLD8CySGetdGbzomHy50=; b=tVeP+MAVxuPrihLklcQ/9yNVAUGnR/Sg0YrCzQ7py4k/PoXm9tGhl8tY72lPyLbAd4d9nW3dj9yvFZw5VU7/GMN6V/NaGhxSkEUQR28w9XlW7hy1ClkuAH4KhBiFqx1fSxsCoKZWJ9ZOqIZs7j7DJxQOHSj2IBJ4FHzMM+dpPMw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (50.233.148.158) by DM3PR07MB2249.namprd07.prod.outlook.com (10.164.33.147) with Microsoft SMTP Server (TLS) id 15.1.523.12; Fri, 17 Jun 2016 23:54:45 +0000 From: Yury Norov To: , , , , , , Subject: [PATCH 02/19] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option Date: Sat, 18 Jun 2016 02:54:11 +0300 Message-ID: <1466207668-10549-3-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1466207668-10549-1-git-send-email-ynorov@caviumnetworks.com> References: <1466207668-10549-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [50.233.148.158] X-ClientProxiedBy: BLUPR0201CA0015.namprd02.prod.outlook.com (10.163.116.25) To DM3PR07MB2249.namprd07.prod.outlook.com (10.164.33.147) X-MS-Office365-Filtering-Correlation-Id: 80d91e22-354a-4c16-08db-08d3970ac23b X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 2:yf5gAiq7ucEsqMyaVcAtaDjEtQt8tQeMbNrMca54Rug4JDjWc32ArIsXAPATGqWuBO2VbtkdMXrdxnbLX8KFD+8NQDTS8DDwthJA+ZjoEKVD7kQKyy2eXDdiAWHU0J9T4zRkh4iKp6xZ3F+zxzp8p0y6bDfqohnq6SZBBhGA9eiWsnlFNM1MzG+uwF+LLWpk; 3:AFJHyuLgUu9FGwH/VXHYVtzwxs/VRgS7k4kENe5f2zP6oBx3Onaruby4MHtsA6kv32TOPWDFXHaXytwq+Av6k7Sh3wJtLDPambaBqn55e7fZCjhkYGiAU8ifBKEe5Oll X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM3PR07MB2249; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 25:agU+zlyOflbEKoEhCZEMCL3xZXDwh5SjYAL4A38LWgEp39Pm+4QJp3+KBXdtghYkKKHZflV9TSAlDxDk/QL2Ay9mWwL2AvrkFnIjnMm1b++168pFxUphyVDOUlA+D3+xNUcTQthJVdJklS13PNwBkosH54VByE+AANxPAP8POW18tPrHWGlm8hwEvirUADE99KnqgEddGHh4PWkNUBMExSuWSr3U0AwG+HKNXZWepm0EiSkTMMDmBW3E3t/r+TzDwOuM9k6SVbd5eG8bKR2yI2YfTU2Oj4GTEgejB2jBhD2rYVSELDVBWjUiHrWtWbEbHq2iDCImrHfvUePOedu79pbou3gcz8OnMko1KTij9zGMCZ9dpUB04VxAAcKp0u2SXIA6iYIGFCAv4XKfkaus/tddocFT4dRRC52wZm6yroeDEdG0NW1CNRdpNBmJZD27KMHiYUQFugpxOFepO0lHLOSMuB0r2kLzZSt5yboPY4JNQKHoyLzCHllt424ldY6072Dre77WZ1rFoQMF80o6DTo+T7wdJyo0Fv3qMHZdy9ETw0PnGaNBYTaU/wy9/IMfOoUAEUWf2htOuMi5VqyImSf8G1GpMILbJbb4F1kQxQC+Adf9fgFNHjY6Qe5dBZv8JAfNyYnmKqxVJ3b8xNqijVtBTg/YPjOB9cLphfwXegRTawPYxuBXdK4xKzOo+8uZz/DKf3o/hgh6GwTfr+MLU4BuDw7SIZlzQECnvpS1ZyVwuhJ+taHYEajjk7A4fva3 X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 20:m0TeDDYd4h3U4rGXwVM4clz9dARS5qycWXt2ogdef5wG3NBDGwKR2kXzrlaRjcMcvzr76iYmIddkIDk59KidM5vdhR3EZvbOBzNUeDhovTulCSpsn+2aTKS6KUTd50aZYprX0LWKyBFcPH2Lvpar78NQ4+Yso7SJdsupiLHXUhzz4iEEdmt1BoQnisR9wj3bD60N7ldNjf/DEXE4idZ+tG59/dkTGSxS0LdoI6xYRvfXe+Zj9XCN3oPiA2NMGYA2vPayty8vnPw28q6KeL2Rf5oOu2+7Kx+NyE2y49qFwiwAUgR40bQcNsCuN5tn6na9+quKjbe4ccCPPYrE2q4XFqzIm7/7aaH/9RedZ4Xw9vfyO5wBdreqwAQ2YpQIZZi5vK+ZWecIcrFocj113z5Jf4pjQ0sBN8UuA5pSxYr/AaeH06mIGYfkgOXfCzwqCclfh52lUG7djYvUe4LNWiOi6BkWBj4Cjw3qcQds0RbFf2Mr+vSwMNbHF94WWW61gCyVHlhVp+/uKhnzJ3MnZ7OXzlsf33S52K8bGwofsqFd/IzMZH6aO0wOZThgnspeRxQ33fobkXpaU1HeVPDJhnLZuwmmWEhUnz4enmj+izHFvNM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(5213294742642); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:DM3PR07MB2249; BCL:0; PCL:0; RULEID:; SRVR:DM3PR07MB2249; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 4:y57WdUHqVU1PErKezN6VM9V/w0gPVXyeYdJC8k2uBX9xILWHuQHv/H6UXKhugC3KTEUwUFqEDjFbxgTSqJLjFYDno92JaKzZ6Lof3I0LZ99ENTL2xdDLsWS1yx1N0PYwKjYsq+snsB/H7yDsYBeZz5diRpYS+bWE/Wwf7rGBlfgLydqmLKFjDKIkuZA4K7wIEMmikRqsHmPVt0hgCCJFf7ps4DzzT0B5OkdORFmAsrVtZYcyYVvXKgPEGhXMrk5dwweloQVeuh2vCN7vX+HcytBenwJRJrA7a6hpAMuHvtz/A7szPQkUatjW7MLYQ58RTzbYttIPhnauCgq+0jEO3elMcH7eA3jQoVmTT0X+1qy1OAg7m64TsNwUeRiCtdKVTibtV7Tfo4PVOF4C4HihLgb/BBCA9/pygJzatVdgBso= X-Forefront-PRVS: 09760A0505 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(189002)(199003)(76176999)(50986999)(3846002)(6116002)(66066001)(586003)(575784001)(47776003)(97736004)(105586002)(5001770100001)(50226002)(189998001)(2201001)(2950100001)(229853001)(81166006)(77096005)(81156014)(8676002)(106356001)(68736007)(42186005)(36756003)(2906002)(76506005)(19580395003)(4326007)(19580405001)(101416001)(50466002)(48376002)(7846002)(92566002)(5004730100002)(5003940100001)(33646002)(15760500001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR07MB2249; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR07MB2249; 23:F3mM9ZD35mqTHi7azdv5PF9CzkA3WxxpY5W1pkqPJ?= =?us-ascii?Q?AGCgWvQrHCZdocfsM4Bv1k4hNGPqcYkSsIP474WI+pv0QqZl7z6YFNEOp+bG?= =?us-ascii?Q?nNlCnb9pizXIz67xmD5Jvxc/MOYB1KvPw7WoFlFxDSmwcxwFrZCAsspsXEnM?= =?us-ascii?Q?LFnEbNpaRhe/GiZZqV5jPj8e3kQE7OdlWvoUuOJ8TIAN89FoG29LHUXRHZ9i?= =?us-ascii?Q?vvaIZbL+MOzsOYddAVjsgnVU10cD2z1ynscIAffLB+5ri3yeJZHmvVHjwytx?= =?us-ascii?Q?zBdGcblfiGElaH3D1gOfRPKQLcYJiX8Kyj7SgVGA8puTNNwZUOQEhPwCkme+?= =?us-ascii?Q?rWXQFtdKTDSUObkN6qeCxzEEc0KfmrBqkfVOuaU4QVIz4f3smmW+PCNPqUOU?= =?us-ascii?Q?QWjJ1arGAwTmBZwQYo8LK6P+e1CPejdQPMA2q+KT8zF4VxuEdpBKX3GC14T2?= =?us-ascii?Q?vAxIDon8ZF+2QB9QQBXQ+8myE6Qg2c9jL9OuAEO2kmquTrd2xfBDQrh9q9HB?= =?us-ascii?Q?aKLxUjSYWeXU9P3U31Kx6D7TeYPvIjYU4iG7PzYxZ6Mif/ZIw2YtMR7MMoud?= =?us-ascii?Q?ymKuTvR/WlFhjZMHk23vvFY0Yo3WzqvCFyXSjsHMwNFrwu96ml/jBmZfyiIH?= =?us-ascii?Q?zjpcgqUzGioARA9tgQJ0lrXDPRm7WblUXI+5ar++CWFhq26I5EimC5fKzIar?= =?us-ascii?Q?sNwwjWahI01RL35hCPWe+XFo2BVuR1vDR1U44Fw0KwPbmObZrBXhzWkt8l+k?= =?us-ascii?Q?mNXQpg1sfoqIfBioWbPAJHkNARTBJojjsTK9z3F1+/aOtGqSEhAIoXNIz0fl?= =?us-ascii?Q?XGSWotsEryT5wAkcyhm0h4h0+strqJbUPYywo8TW0qt/xMDqbyPrs0+kUiQ3?= =?us-ascii?Q?81xP3qJ5EuOc0UbZeLgn/4tf2CwzsUh9z2R7v8QVyK74dvuG2pg8wgS06SS1?= =?us-ascii?Q?vQaxPXq1mrt8Mm8txjDAPwEbDBl6+2toNisM4/VBuArjhgcqw3VP4u6657ua?= =?us-ascii?Q?ykar7CeinPZJO1Ahf77fM0P0a/PH8f/YOqOvQfrMKIpSwW8skA2JdNy53Hyo?= =?us-ascii?Q?/TRmetQOXs0mUDKReWCtuWxMUDojWeJKaVRTnvzXjWBGyBFfn7SKNMhikJRn?= =?us-ascii?Q?1kgHL6Z7o0YX3ljS604XnXrXcGhFQGgnVD1gobXHEfaQ0UVPnLSBA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 6:j4/a6ConY7/+a5HQbkT2DQCOGu5u0/a8dYTgDY7bjN6I7STvv6X7YQfc6DqtlOCbHlrJ5pq9QEDj4ialfKTNfLnv/X1NVqt2ej+x7P3GxS7Oh/nsknJFKKcVZjoP8AvxNaMjcgJvaeZxFMir597EAvXmxmod3vQZ3mAyECZES18kYIHl1qD4EaMSaVBVdcqQcPf20ssPuLQiB7ju+baKYnhpbWu5ibCJnqFFN3SALDLhURr5+NdPs41Zo+vcZcuFnXupAoeyNmywMadgQ02ogC+NOHkc4igrYPTPQZ2HT8g=; 5:FDBJi4sysapwmZUSvRfatpJd99n2AigMbF10W6Wd9BGVjN0Y+IOLtMLds2xhfg3QfaXHrHYil3tsdUlhr3cDdmiPZDYk3F5b8ByUFfgzsJeppXqXRC0554UCguFcyuajM4QM3rqOxbRj4N9k9QKFXA==; 24:fXO5ICR04chTdyI4mx3BVOzx+hV7suM7F9laJD7wCFoPWVMUkFjg45qeD529kZYpZGJUMDGJQI+Prtm+2t3Dzkq7B+umoGQkOJ96qMgRU4k=; 7:q3j1ytEnWGkCHIwEJuxBlbNICivP2qVz0X2FzVDZOjCuHb11ba5QzlCHXrg/FMiG6T9OokerQofUeD1CvrOg9duCc5T92jociIOdqI/4ERx1wlVmchgZKn17aeVpBLnkg7LEObqZ1kQdUYSfTZJRUbosugsJNHImr8R1eadDZa2/HkH9ZBanH6YAET3o1z4yLyFtjeo23iMF6+FBHKslOBT+tLKMqE9Ua4K8GiySd3XFPWcRgTv6KSkkcxVty0ve SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2016 23:54:45.0585 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2249 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160617_165508_548169_A3F6FA75 X-CRM114-Status: UNSURE ( 9.19 ) 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, manuel.montezelo@gmail.com, 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, maxim.kuvyrkov@linaro.org, schwidefsky@de.ibm.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, linyongting@huawei.com, davem@davemloft.net, 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 d794384..fdfc4ad 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -234,6 +234,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 0d3e59f..d5ca749 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 CLKSRC_OF select CLONE_BACKWARDS diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 90542db..d84122a 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 28c63fe..097e7a5 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 deba266..b1376a9 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 3ae8525..29bbcb1 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 3cc8498..efa10d3 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 5b7a45d..c337192 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 636e072..3c5f3d6 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 ac91939..231b519 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 9627e81..002b06f 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig @@ -1,6 +1,7 @@ config MN10300 def_bool y select HAVE_EXIT_THREAD + 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 51a56c8..f9273c9 100644 --- a/arch/nios2/Kconfig +++ b/arch/nios2/Kconfig @@ -1,5 +1,6 @@ config NIOS2 def_bool y + select ARCH_32BIT_OFF_T select CLKSRC_OF select GENERIC_ATOMIC64 select GENERIC_CLOCKEVENTS diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index 142cb05..499649a 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 dc11738..1cd0e29 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 01f7464..4d589ae 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 507d631..0a9484b 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 e803a83..8f5f753 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -54,6 +54,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 546293d..f8f6cfe 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -46,6 +46,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 4820a02..79434be 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig @@ -4,6 +4,7 @@ config TILE def_bool y select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE + select ARCH_32BIT_OFF_T if !64BIT select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAVE_NMI_SAFE_CMPXCHG 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 0a7b885..406b8d3 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 64336f6..1eeca06 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 BUILDTIME_EXTABLE_SORT 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