Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752351AbdCAT5p (ORCPT ); Wed, 1 Mar 2017 14:57:45 -0500 Received: from mail-by2nam01on0043.outbound.protection.outlook.com ([104.47.34.43]:43686 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751485AbdCAT4K (ORCPT ); Wed, 1 Mar 2017 14:56:10 -0500 Authentication-Results: lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=none action=none header.from=caviumnetworks.com; From: Yury Norov To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann , Catalin Marinas Cc: Yury Norov , Andrew Pinski , Andrew Pinski , Adam Borowski , Chris Metcalf , Steve Ellcey , Maxim Kuvyrkov , Ramana Radhakrishnan , Florian Weimer , Bamvor Zhangjian , Andreas Schwab , Chris Metcalf , Heiko Carstens , schwidefsky@de.ibm.com, broonie@kernel.org, Joseph Myers , christoph.muellner@theobroma-systems.com, szabolcs.nagy@arm.com, klimov.linux@gmail.com, Nathan_Lynch@mentor.com, agraf@suse.de, Prasun.Kapoor@caviumnetworks.com, geert@linux-m68k.org, philipp.tomsich@theobroma-systems.com, manuel.montezelo@gmail.com, linyongting@huawei.com, davem@davemloft.net, zhouchengming1@huawei.com Subject: [PATCH 02/20] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option Date: Thu, 2 Mar 2017 00:49:10 +0530 Message-Id: <1488395968-14313-3-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488395968-14313-1-git-send-email-ynorov@caviumnetworks.com> References: <1488395968-14313-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [27.97.135.110] X-ClientProxiedBy: AM4PR02CA0014.eurprd02.prod.outlook.com (10.165.239.152) To SN1PR07MB2253.namprd07.prod.outlook.com (10.164.47.147) X-MS-Office365-Filtering-Correlation-Id: e5ab136e-351b-463d-a4ee-08d460d7f728 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:SN1PR07MB2253; X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2253;3:PgeUM6/fbxiJBd0qxthNW+zXNzJSIM76xPRvvqHuzl0pqYBktrdu7qDziqEEAoW0d8uHyY8tNdHmBFvsmAGx33XbV4xjtDcrTAn2yBU8Zt0l/ZRLnK/0abZLqiGGcdRcmGZQaRt7b1UPDw/x3t0MmNXDE8LBeDZPpGlcnzHs5b+LDpun4FGqdObJlcBTjbNB9FhEPbZ/O0CkpPam0e/EEtp/H+DAKrPj0xfku77GFKaBiVq0IKMigXxclIRcS0A6fb/9ZjhcUvMgSHcwKEEGgg==;25:i9BVTj7RWwmWKtkQhYLTzrhVESbSJxE7vARnyxrs3QYMMXXDkAzYCLujLjSULQg3rVikJ03/YRxR7/euvvI5VZCcq6OT7A7ACAJRdttXqHwtULMm7OU8DHSg9v5JK/BOBoFOw6CtZru/3VgO3JaQs9YS67sG5O5mL76MIbCvHLlNEiytGK9rusUazNltei/l3Pic/+La/hCljSm6UctDlp2OZf4DWqYbYjvsIObNNuiB6VvCf+9DY0Xaniv3oky7OTawfpn8BCjLpTd/nfnHgBNWZ9JAqGxNUiE2Sz8ByVrWbnHC6NpVAnPmd5NpoR/WPJDktj5DtPYWOB1SsLYMgTVIxGTjxF4QYItWpigx0Ipz1wTlAMvkZKePi9MfAT2F1V78yCpgTExaaWtvQQcvj9Qb7mMc6uERKSXXORei3u786O3Pu3bNGVPSuHgcJ//B7P/BM/vLbkNiOUbZ0Adp9g== X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2253;31:lrUNTy/NbtvMzekKpRROFCKWDAaoiv/fCozwbhdJRzXQMh8lTj/Iido1QOwFHNk0ak4uZq38ie22e5TXvwvfVJ15SHl0sedhg5BxXqBPnBMzHrI1XfmY7WNbkM6eMZfaj71RnZXnE4a2lyqquExaZpded7JjbUB1e5KSfmVO8LIa+xcRmqWzdNIMYWh84TQyaECFKKLp0gw4V9lpJurCYAON4mrSWleXmytTyeIUybrqt9MzlZ7CTxOmGvDpFHiQ;20:7/GweytAyy6ZugOSCXFfd3yisnbVZNsIVWIBiN7sWKzWhnesd94miQFXofO13Inr5DyuWKhHGxi7DUaaaJLMq56Q/EXerfv7EmqpVCTi2DtiWCaCjOSEYz8FduXLNN8ZjVcQtFoGCPgiRgipwXycytKWrEz45f7zwJ0A5Ip9SsTmqquvAsT7eCgGcVMZoBwPJYunIPEknHjOUmt7F8/5C0NE6XVrBnPnspuHfPL/km+TA5lyvHI/FXcteF2yVzcYLFE0+steJSpyiAQ36JeEnGz6H047G7dcKec0QpXv56jtnS+R9U9FrFns0DSO3XbR8xeVDJpS775ZqxPuDN8BdwwXWHEzARiax4ciHLKiSf7NpNSQLN+PY9rzo+L93XJ6lvBdFb6QAsUBZlLbpDWQXuqjXP17Os4L918KjW3mhi4T9st2N0dsmIe+W7DQKcdKOL1JfgVDB94F+Y7ZByZ5fB3yBUpeBOWC0dMu0zPEri34bkgztmHKaa9QLJuVpdD7JeUcEM6Gh4rIojfS8JoHWxKn2av5I5qesWNdfw0VRamUDAd88NkJScQuWTKUU1Q2EUgzpGCSuSnQ8kkFVq1106lrRUS38xy41dqVH6UcZfY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(5213294742642); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123555025)(20161123564025)(20161123558025)(20161123562025)(20161123560025)(6072148);SRVR:SN1PR07MB2253;BCL:0;PCL:0;RULEID:;SRVR:SN1PR07MB2253; X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2253;4:s1IjqfaWaaT4wpj7aDKcZAI27dl8stUEy9MrvmDfAmvuT4WvVPbgd/FpcIjSY5iXQkCYfpDe0XjbTbvz4J5SnanITLhe4+oIx8hkf6z8xrRzUrcCGW5Q38DfOVr+ZsjESg/dq8sOcTqsEIJY07U1kty7dITrf36S5HJA1WU2hktNm/2usa8KwyU3lmprFSY+UYMAq237lMPEWdg3ofmgYWpk7cvcGNJTg4NzZWYCM6xwsHeIsFtNxvRz3PxjMLTbaLLaT0yH3vKPIULN4gGBF7zI5ME8s2Q6zu7boA9nW8fKDKBXx/f4vf7/xkWyou0xFTbPv3omctkLkOcUCDD68VsAhRxrtbROc2OeJlh/wat3lsN6J6Fv5aFKxsdGgV2lSY9gK/4UuwwGPBppTu/Vbd9U1ucVb/cWP9BZy5TC2C7qG9zBjfLoauMIXaLrSw9jrxbFsRQzauXKHabclyfydyGFxJcAoQ2nSyABlzJSK4NDN0ZGAUG9dNSnMQuyFL/NblEZIDSEpounxTDCqvtGvrykRFWktmBttovFNKIu3YQ6WMDzG9Mo1sIOsx5J8bR/QInisHKIP2DOXHI7Dgdwvtm2PbYTE/revoBxxVbNl/xEuDiyoyvfN2ODrJbgk2JxSQQ2oDTLM1FZvDnGmAjuvg== X-Forefront-PRVS: 0233768B38 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(2906002)(305945005)(7736002)(76176999)(7416002)(33646002)(50986999)(76506005)(47776003)(3846002)(4326008)(6496005)(6116002)(38730400002)(66066001)(48376002)(575784001)(81166006)(189998001)(6486002)(42186005)(36756003)(50226002)(92566002)(2950100002)(50466002)(25786008)(8676002)(5009440100003)(5660300001)(6666003)(5003940100001)(53936002)(54906002)(15760500002);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR07MB2253;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN1PR07MB2253;23:2oFbZPE2rLgVSuP12AYUywIz8P8G5fcKNw+s82oOu?= =?us-ascii?Q?xh+omDM8Y7a3Oc3z0lao45F05HS8fdEsx1+F9+tsGj3EsYgvMp0FbL4LC4lN?= =?us-ascii?Q?+qQWoZFOKA+yXB8h8fKL0SPgxNrqpmeXNWJr97bQ2m7HQswLwhIg35kEs8l0?= =?us-ascii?Q?ZcJayBITwAibmNy87jgNKZkfdrIVqcG9popjlKnZtO+mgdZIEY1ulebSUEVp?= =?us-ascii?Q?KLZhswy/0oxDsAZaO+sOevw2GK7Qsl1p12nGNqgX1wSbLOtvERfjspvZ4QIf?= =?us-ascii?Q?RCn4427Baf5hKMKlNzTTOsr4+cvb9JhYmNmnZax+oGd3EIvGnJWfwy7bb9dp?= =?us-ascii?Q?amh8pucTEKfO91N4QZ+RFeicAgO5FJth3Qvmmgz4RMRzxRDWGz5QncvkFrJb?= =?us-ascii?Q?CMrLznBLkADV8W1bInLDnHfmsAKPSruQBI46AXYY2hrtuBq6poouGuwoakg6?= =?us-ascii?Q?3B5vdQNbmvj+ufVnvgUbOtADt3EfX0TtR5/6PSiOGe/awSdpMXL12eEkrClW?= =?us-ascii?Q?uMd7svUIY/n1A3WqIviyzpIFnoImzgynCl9Xy2fpPsNnU8nLdGtWqqGKz13y?= =?us-ascii?Q?vBSMpor1LcjLivjUvtSFOc37eYWSuz9agKkw03zVM31inFqc/Yn0ysVQkRi7?= =?us-ascii?Q?d1/QLBaOlQN964uAmFiV7nVFNGsr+JVGQ/+YzKWYYauBqE0VMDbFCfWEYb2L?= =?us-ascii?Q?AIyByuMEJxfR9W6mnMaqLalphJeTiriK+M5LOjvw4GpzTDgQJpV2cuUZ/rFT?= =?us-ascii?Q?4HwLVaB4QVDB5rWmcrmByVO4BJEVBchYN1tDJoZhh9NaXVgaN2+teZ/y/9k4?= =?us-ascii?Q?pBayL9t5PG5x4ZkoLuFQbWl9abe9P/ytzYIzWSTnJGJtTuJmDFrFUZVhkI6W?= =?us-ascii?Q?qF+skDKLLUkqM9Ra2bfM6ND5wfBL0B2qjFyCceKbmlBkl59aJ4GezSZ9LbV/?= =?us-ascii?Q?3ZnlwbjLONiEV+ZjARxLM0G98utKd6vJmUEqNLtIW2gjzkjCwetiSABm0zgc?= =?us-ascii?Q?aoewUByM4ON7L+/796f+Rha?= X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2253;6:R5zTbCuKO+K7su1YoPnj5+1Cjomt5Cv0vsqRdpmtKdL4qJKm0mwDXoFxzZpWervhawB83AYn2mwAsdS8zPB5is9hkJ2qJQi1KVBVSQsgy8nuId9yCF6jAfVqeKP04NMYUSg33w6B1KDjGJNTKhDTuKY0yQu0ZnchxfEEsl/L28bMZS3BTuXP+yLarvHquFTBMOdpEuAu6PwBRu4oIQUTfb0ji2pT4yB1IhMG9B5xe3Rz01NUOgAwwsafcKfVUXPlIyKxjJJLVCnd1JMyHDqLjNObJdkEvgIV8mhtT6P5LDD8aStXx+0wWtJSV1MAE4f2A5KJPaHzHshyLcPGNYbRGLpL177EiemPdbh/0GnYltlmePA32LGCqjI/h7tMQbyhXvRtbhMjtO8O2eov/G8r0A==;5:bKOtxPLVZfflQCUxsRHmjUqgYdzueoevjNULMzr3hjtYqJvAik7PoYbwVLsLIz5lDbmQ5TXZw33WMLGniORLh6iNj9SvuByOA5ZwJfODw9ML7FhkLbU9hgJPHr25H7IqOm7E7CHohu3QRiydVYHTip/MMR9asw7zTJYCw/i8PZ8=;24:EvAIXXyIBa6tUy2q5EMqlhqaibjfFIu2ECHAfpgfYc8/3CYAFUj31YCcmTfkBYsi3XBDn0lvnzOVSpjEK8kFhldwdr3aUYNfH8NZSFSVNTg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2253;7:+S91ahXFzVTELHKs+bUa9EASG5S0yzC8/haXvVlSXIVmG+njmtjDVJr5J8kQB64JyM+5okR542LAObQXH2GzHtVOhK7ZQZaWJQEIMExWptQnmHhPmQYlKEbrfrTHAcOzwVfWryWrDZv8sOgC9u57RguWDuNGmMlSFyS2r8ZkDDGpNNUwQMiQQ50+2yv403p3VPH/4T5oPofh9m3qJGOXCXAQKSJ9z1vasfzQ3xygntT8owoFuP2E7ekMGtN/RGwtRm7Xsyvy8LP7BW2zvTcBegOWU51eVGk2jYkG0q7zV9RzsaKkfs3MPkV834fr6BS/lq+XQM+fvfz4ZFPxPJosfw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2017 19:20:03.3984 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2253 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 10160 Lines: 369 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 e55e9ad..4130934 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -242,6 +242,10 @@ config ARCH_THREAD_STACK_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 c9f30f4..6a56461 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -11,6 +11,7 @@ config ARC select ARC_TIMERS select ARCH_HAS_SG_CHAIN select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC + select ARCH_32BIT_OFF_T select BUILDTIME_EXTABLE_SORT select CLONE_BACKWARDS select COMMON_CLK diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0d4e71b..5e239ad 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_CLOCKSOURCE_DATA select ARCH_HAS_DEBUG_VIRTUAL select ARCH_HAS_DEVMEM_IS_ALLOWED diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 3c1bd64..26418e7 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 71b758d..8c059f0 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 1941e4b..bbcea8c 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 9547446..d6d19f6 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 d140206..ed6f90c 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 85885a5..643025c 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 e0bb576..17b34e8 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 38e3494..75f226e 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_EXIT_THREAD select HAVE_OPROFILE select HAVE_UID16 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 1e95920..5539d08 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 ad294b3..6e4e91e 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_MIGHT_HAVE_PC_PARPORT select HAVE_IDE select HAVE_OPROFILE diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 4940917..2540a99 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -80,6 +80,7 @@ config ARCH_HAS_DMA_SET_COHERENT_MASK config PPC bool default y + select ARCH_32BIT_OFF_T if PPC32 select BUILDTIME_EXTABLE_SORT select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO 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 ee08695..1f99eb3 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -56,6 +56,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 68ac5c7..a0b79c7 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -48,6 +48,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 4583c03..845dcbd 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 ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAVE_NMI_SAFE_CMPXCHG select ARCH_WANT_FRAME_POINTERS diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index 0a3bfd1..9629fd8 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -1,5 +1,6 @@ config UNICORE32 def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 005df7c..d058243 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -43,6 +43,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_ACPI_TABLE_UPGRADE if ACPI 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 f4126cf..683f24e 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 -- 2.7.4