From patchwork Tue Apr 5 22:08:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 8755931 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C53F69F3D1 for ; Tue, 5 Apr 2016 22:13:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8E4642013A for ; Tue, 5 Apr 2016 22:13:56 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 519A3200D4 for ; Tue, 5 Apr 2016 22:13: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 1anZCJ-0007JS-DA; Tue, 05 Apr 2016 22:11:43 +0000 Received: from mail-bn1on0084.outbound.protection.outlook.com ([157.56.110.84] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1anZBc-0006Vh-5w for linux-arm-kernel@lists.infradead.org; Tue, 05 Apr 2016 22:11:09 +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=SbX6+iq8kMo8+Z2VmH3x3NomI4Mo+g8NtEy51BT8QLw=; b=L4KNespk1vpXNr6pGt16Z3wK38hlggJ9OX+f6u/m+86XwVtS9XYnovIfLZ50WJAPpgBtlsTZOBxyWXvvWRNXltAAc0Adz7AAxefC3MSbolrRDQJ9Ui6nNQ1XRIR8jEUo/uU2N9yVSF8CXSz0Q8DDCfIJz2kac2b5uGu3J1XoZSo= 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 (95.143.213.121) by BY2PR07MB614.namprd07.prod.outlook.com (10.141.222.146) with Microsoft SMTP Server (TLS) id 15.1.447.15; Tue, 5 Apr 2016 22:10:37 +0000 From: Yury Norov To: , , , Subject: [PATCH 07/25] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option Date: Wed, 6 Apr 2016 01:08:29 +0300 Message-ID: <1459894127-17698-8-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459894127-17698-1-git-send-email-ynorov@caviumnetworks.com> References: <1459894127-17698-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: AM2PR03CA0014.eurprd03.prod.outlook.com (10.160.207.24) To BY2PR07MB614.namprd07.prod.outlook.com (10.141.222.146) X-MS-Office365-Filtering-Correlation-Id: 9179d0f4-5f92-4391-3528-08d35d9f1e04 X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB614; 2:nEADapXvnuXi1I4gxzvEJstuUpUnqJtsf2bBH3404v47sVB9YFVaOQWy6QGK1qlUBZ6xsrljTIDZidoxnhExoskjlAmXagO3mZVboc1FKz6W6NlaeQGd7dPFrEve8oekBKfw2wfQoh14etLL2qdN6Gx/qZfBeWUGUSA1SzdMQsAgdF8+pbVw4hHVZw90UfG/; 3:GdGkJxpg9STDvKwAS6NMNX3xGFl1trwqzaIJ9FkS5NMcYI/2vFtB27uDC4pBK+vwZYDwsaVVwPMrPTGQf4kHIVpvZqEvmwUeKgC3ihxQNESoj+USIFRlw/w2Xz2F+apX; 25:yeHUyN7zXBkSxwJ+5azqscMU7GjQI8JaYPd4nw1tyDDuTwDQKpQDOXuZqwyT0ucEubC5ER0/xweeMBMXuO0uncxUGDV7yqzbUBJa4n9mNNHXJCvLp0JvKqIr3OfVpz3sKl3CWeR0MlU75IOBywxdCxMLCEukeYUVZTPjsnlFCeWPUwkl4Q10/lIRCrN8X3WJdNzIR6EdWMExfEB9R2ptv6TcrGym6t4d+NNRekX9+vllkFWOFxHeayyeZB4qZf9z5UbGrpbOI/oSNRHGHO/LXE5j1zuyq1vx8J9Caws5vPrGQS4Ocu2sBKFEtwJ+t4mu5yn0+730+qIgtmz7QH9LlOyMU8ksHcjNo45HlrsLA0U= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB614; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB614; 20:NHya4xtfWVpOPnPpR3PQAWuHoZJjVGtFcE+VYuQIgvivVBt812mVte+VG1NHUEB2IGb7RfViioWMA5+Amx9IhKbbIJyFN6+iuGos1/JDh8ny75Tgzl6UqtRvPHabAXAssOJQvfmeUXttNOVXoZwCjwhhwi1RBIWornwYB192N/XwlhAxMuGu1APm07ySbfzTZZZpgij0mR08743abocjxsYjMrOgthQtmg4uWtOV+p1OnLVVHYFeA4G5vf1BAUVYHhH1ZJ87lNMlvvqbo1qotvfap7FqVxZk9GpeE/PBEC//hyzRJ+5uEbAG8AOiQPAspRjLsnQ6V5fA2RXL86sVvf0unjJFOM59bEFbd0Cwen7Npk0fQnR8S0M86mw+Mo08b6sP/RaS1aXRWiSbU5jj8644EMpIok8yt1R6B+ar4PT+ScjKPHfBHSzkvrZU9PUe79MJFLQkakD/X4UXA1F3ZZEzLQrZeJDGx52SCxtmpUPK+HrdODeK+3w9WVR2/5/YKDE5/+iWTi0Se4BPNbeApc0Ozn0D0aoAIJYVj2HcgXGMjSuC+X8ssWzKJ+OuThn3df83S6fPeeC0B3QycLzfvofxIQ7Y8uUYwL6meL1bBrc= 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:BY2PR07MB614; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB614; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB614; 4:w8HQat2aanECmYMshDoBppH4l087Tt74ns2BYvqMhZz9v0R4W2pWEt9x6cJkM3rVHvedG7rD0le763JWLMH9k9UvWPoQm8z4RFk300nlWdc/GBDOUXNvxJqCJebOpdtfamBXnSSdCHWU8NPLsP34SAtCflO7tI+18ktwG3WH7/zWK2H2+12IQwbFyGf80clwGVqkltXARmsNEpqnPTSFLTdeKHm157SBAU5CXmdYAhcCP06VJvXvASXvzmByYeFrhFjOV8hC9DPDBEVxtRS667E6AuTE+uyBN9DEUv7X4eYsttiYgBtGASrU14IfP1WipkXATbEXVvCbNrftpdTDEGRmMdl2VuhNUVRzQISMj0k3QSGZA1mtZqJxpNsMI75/ X-Forefront-PRVS: 0903DD1D85 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(1096002)(575784001)(5008740100001)(6116002)(92566002)(33646002)(36756003)(47776003)(3846002)(5001770100001)(50466002)(2201001)(586003)(50226001)(2950100001)(48376002)(229853001)(19580405001)(76506005)(5003940100001)(19580395003)(42186005)(81166005)(66066001)(77096005)(5004730100002)(2906002)(189998001)(50986999)(76176999)(4326007)(15760500001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB614; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR07MB614; 23:h2aKKZ1asfqa2xFEEibQ9GBioxzgExobDTOn1lUzZT?= =?us-ascii?Q?4uKIBHUb5uZhZ18ZiO62aOtITvBM4g9eZrcXLh/sJRgd4HA7eDYIe+8YhhoX?= =?us-ascii?Q?jgoFmFn5SBUmMFLnI932n3W/ZNsj4RdNHzJhsVMEueOg/Ct7VtW2709wY0Ye?= =?us-ascii?Q?HKaxTYPtKuOxPzrhuFiSVYEV/nr5N/lGeunw/GozfR226y+R/cj8YguXf8wS?= =?us-ascii?Q?g6nsRoTv5sxVS8YD+zNUXSMtwLqkMw0vA5XWVfxQy8QEgNaXci9s3wAWLKfy?= =?us-ascii?Q?Fx5CW/+s5KuOduk12S0N9UD5T5rmoaUTP0MSBOzwnV5QhCZzKi9dj8Er9Vkq?= =?us-ascii?Q?cOGAd6Rv1ipSSZMAijGj0ooqII9QXorTZfMFQtC5f89/RCTvkYvqx/fNA/BS?= =?us-ascii?Q?+FsgWbcj8+d9pgROPJmRvA56kr+yqZ4A6wTaNPaRDaw4lHArO8SEgJN6XCfF?= =?us-ascii?Q?R4PC9zBQlBmFZjOJdQ2gW2Bv5hviZIJYd5jFBYDu6LUqkKhb9sZKJ4XeeqWH?= =?us-ascii?Q?uxBdDavLRNvmMd1PUKWL24cGpTUw2n5It3Jg0PiVOMVyV+K99JxJzo1S43t4?= =?us-ascii?Q?CpdvLhNUrMytqyw1FEg5ALz8/mrmZp106kxgKbe2FIx7B2Ejeo3qRsbQifEH?= =?us-ascii?Q?5kjmgvXRPnUwvnQ1a1W1+Z1GwwrnD6NQV05IcQQh8KYTfkIysi1XeuHlAcqZ?= =?us-ascii?Q?0MKZemXy+dBNAycxTAqwr3ySG4DanSHsEtf9KG/4qhfEupekDLQ/bRlERkHZ?= =?us-ascii?Q?Bh7UnqONTfBGmsC3n4o8VJ35KhhrByabacCdn0oA/yycob6fzUsZwGfaHbNC?= =?us-ascii?Q?b7hvSOlgO9ACg1aJxw8s0RfBnfWf8YJsEqzOurOr/YdsraX9VTt67L2EJnrb?= =?us-ascii?Q?q/BFSmfA83y9R3/axeb5KSNaHqFR2/wDWKujvVkvZrmTSkZQjc1M6Hv8rXnK?= =?us-ascii?Q?c61wjzwhEeLwqKrAc+uZ+aA3l/bbiV4DgnK1ulEPt4ggzGxQ6a6q7GJ6yToF?= =?us-ascii?Q?g=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB614; 5:OOjeLUjyUk7sOzdgCUWVONAbj5h7ULx2Knb7/aGYvl+Te4xYdu8YSj6IYP1Qr50pCYexaV5Ys6YS1JTzxhxr9YIvXUv+coIZs89+Ni4G/+8ypgmb2LlJ6xtOPUsn31yXS6I3q11yqma6nSq+6MnoXQ==; 24:cb1UO9sFbaK9Dt9e3ZEc5ZAGVEna16hLMX+G3qskOv9XNWi3A8uKZeRanK8wT1ZPvDgsp/UJAuhG6nuD65fdHuzmklVVy6wOkgOD4nL8cXU= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2016 22:10:37.0084 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB614 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160405_151100_940686_41E586CB X-CRM114-Status: UNSURE ( 9.11 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) 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: linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, pinskia@gmail.com, Prasun.Kapoor@caviumnetworks.com, schwab@suse.de, broonie@kernel.org, linux-doc@vger.kernel.org, heiko.carstens@de.ibm.com, agraf@suse.de, klimov.linux@gmail.com, ynorov@caviumnetworks.com, bamvor.zhangjian@huawei.com, schwidefsky@de.ibm.com, Nathan_Lynch@mentor.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-Spam-Status: No, score=-5.1 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.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 Acked-by: Thomas Gleixner (For the x86 part) Acked-by: Arnd Bergmann --- 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 208aae0..52e3f9b 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 bd3c873..a55a81b 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