Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752161AbbKOQm1 (ORCPT ); Sun, 15 Nov 2015 11:42:27 -0500 Received: from mail-am1on0090.outbound.protection.outlook.com ([157.56.112.90]:64899 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751338AbbKOQmY (ORCPT ); Sun, 15 Nov 2015 11:42:24 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=cmetcalf@ezchip.com; Subject: Re: [PATCH v6 13/17] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it To: Arnd Bergmann , References: <1446507046-24604-1-git-send-email-ynorov@caviumnetworks.com> <6987238.kVeqDX1hGc@wuerfel> <4020288.s2KSidZP6C@wuerfel> CC: , Andrew Pinski , "Kapoor, Prasun" , Andreas Schwab , Nathan Lynch , LKML , Alexander Graf , Alexey Klimov , , Yury Norov , Andrew Pinski , David Daney , Catalin Marinas , Jan Dakinevich , Philipp Tomsich , Andrey Konovalov , , Mike Frysinger , "Joseph S. Myers" , Paul Eggert , Rich Felker From: Chris Metcalf Message-ID: <5648B5E3.3060700@ezchip.com> Date: Sun, 15 Nov 2015 11:42:11 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <4020288.s2KSidZP6C@wuerfel> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [173.76.21.154] X-ClientProxiedBy: BN3PR09CA0015.namprd09.prod.outlook.com (25.160.111.153) To DB3PR02MB121.eurprd02.prod.outlook.com (10.141.3.13) X-Microsoft-Exchange-Diagnostics: 1;DB3PR02MB121;2:mbofClLBcfvmxKB9gBHkDBAekA2GyMAL60uCggGQ8nwPIJRULUCM882IlvX/VNBB3L5wBKs85k8PqiZ+ykL50DI15vEGI2YdWR8b+r88/m94p4IqDgNq/7ya+r+Lj6SBtD+Qss694m4gECA4SJ1XZ67oc2X8zgw4ZXM6jy63TzY=;3:xfXT5scLHJkFrMEHpw2ZTJDlPdzw4qFcc/qmEwADLUtGCSby8TDNgOVnOk/3zaaGHnZEDjMLxm52bFQosZs1b4yFJ6JA5d/vcpW2NktjAplZ7E9qMFdmndS2BPzFBizIEvA6M03fFhcYJyO/OS6VWg==;25:UKLTG/9hcDuyKSGGqCdA3Si7E9MDYDS27p3LLZolcfRpecGKKNsh/1aH+V546Ar3wI8LAWdFJD6eKi+jwly9RinxWQmm4ZgNLepD4mkHJNvozycaGp2D2aFICcUQ7mHsH5Q9kcDn2k4DOl6h1BIfT9oSS3IIOLHpor5hbyKN9enM50TBykz/z6277iuGF6MRUwMtNjoTO0UV0cNUa9P84/r+7B0mRYuc62KGPxZ5ce1gb2/Eqa0SXc+ob+Fd3V+UHEzR6QQaR8lqcTvaK63WuA==;20:cvhFJZxEspj3o7DyRgnnXXjukIVssTYZnuqX7tqnBR4Rslg7HUlSnhalbvnM1H2awnzKobltaGB3lK82YB+iLNGMNyGydjesXPUM5MoGVp/Ecr8tXINj20WzOuAuWB4Xa7eOEpvqfwAKfbGXA3qKkl+Iziuc8Nc+4Gjrij9Vak4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB3PR02MB121; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(121898900299872); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(10201501046)(3002001);SRVR:DB3PR02MB121;BCL:0;PCL:0;RULEID:;SRVR:DB3PR02MB121; X-Microsoft-Exchange-Diagnostics: 1;DB3PR02MB121;4:Y0YRbBxG4MOZHoQ/VBgfwSw+lexOmy5QslPdmmz6/YMX4QVLQr5JKf8rcvSKqDS2/OYoAsmMfidxyppELTNVAUyfEP597p6zgCdAqZY61q4cif4jUshAasjNUzj6X26AXoUJt69FFMcxRNEG7DxWh7bdvhhcplF2iCwdizu3EYfREuPJcfCWRpPEM4scygY0qcgaEeQ3uvkG5Rc2Fz8LUcXtphjILHj6vmjV1KtDGBVqOfbYaGQpnIppBu6lG/IjYhVDNNPj7dCoTzAtHuj6u2qkJExwMPXNOdP1Xwz+7AWm64SaPexcjDsc/cBBbSoVhveRLmDh37J+mqBG0668uH38SmuPkDD3/NyJkcGYNfLn3WM8OUd7E7pXhk/XkjGY X-Forefront-PRVS: 0761DE1EDD X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(6049001)(377454003)(479174004)(24454002)(189002)(199003)(54356999)(105586002)(122386002)(33656002)(97736004)(87976001)(65816999)(5001770100001)(2950100001)(80316001)(4001350100001)(81156007)(5001960100002)(87266999)(47776003)(19580405001)(50986999)(117156001)(101416001)(106356001)(59896002)(42186005)(19580395003)(83506001)(76176999)(586003)(92566002)(50466002)(15975445007)(86362001)(5007970100001)(23746002)(5001920100001)(40100003)(5008740100001)(189998001)(93886004)(36756003)(5004730100002)(64126003)(77096005)(66066001)(65806001)(230700001)(65956001)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR02MB121;H:[192.168.1.165];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DB3PR02MB121;23:z/xXa+zj0uwNkq+TnE7RTVtaf6iY1aGezsNX6+?= =?Windows-1252?Q?0xSoN8aWpyHvQsDcG2akkd1a5YZhaGPnvg4nOeiGT8haUUt3Z9gGZBbM?= =?Windows-1252?Q?eFiG8MLzzDRWzJETPa483ce+Ag819wvEMaHAuOuCPCN8v0j4L4tswsgm?= =?Windows-1252?Q?OcDKX4qxJliNiDcov9b8eOCLu+brsPQ6OMyA1oZjt7l48CrIdTxE2Y9o?= =?Windows-1252?Q?5phTQO7dFfFa5dLeC+xzKeAuXjMo5ccGDpWcVNS/el7biq7nqDTurqXB?= =?Windows-1252?Q?Dby9VWOjnJWmBNP2ce2eDJHwNMqoD9Dq8yg8cpxLf8nW5NgcIq1fK4s1?= =?Windows-1252?Q?PPMW0licHRy5fKQoEfMYMGeftiWSFuY6SmTnZkJl/ByV0lPE/MzjsCTM?= =?Windows-1252?Q?Q5E0sV33BbnNElwuQH1PGYM590Wau4F9kFxpLXvC8/3zTfsU0Vapani5?= =?Windows-1252?Q?RDrWopKDsuSkbZp99UxH5fAoae0KfWZxCjV5tj2uLGRr3L6YGzwDNNAI?= =?Windows-1252?Q?kSdnCaedryJZ1+XUgV73WpuxP/+LizWj8H0fQjQZjtwkVBXJmyl8URPH?= =?Windows-1252?Q?TxzA5+P9xLqbeLoyT1UjFpXJvKGACsDlWASqULpZF+TIkPTar8d585P/?= =?Windows-1252?Q?ksIMANp4Is2yTwI8dbAmnKUGL2Xj2WYVe2+kk0ytmr3RmpndeY7WxwVn?= =?Windows-1252?Q?k7vV9kKkNy49KseukqkLUy/zkMlZZ4eLcUu7ZK/ACg/BGLNVPB9UCwxI?= =?Windows-1252?Q?br5ad+X3V8ZD6AJJ3KLV972lzlwp+CqkBVY5vAwr2j336e/xt4FUtWrn?= =?Windows-1252?Q?ZZgb8vSpJ36d7hjxbmkDl9mML8wbQ0iKyo9/nihZ6qLR1VvK2R7YofQ+?= =?Windows-1252?Q?SmUZE2BAaAEZ9dH9Ux7JnBoa2iVd3fsv8Tk9o1Q5EiA4npsHZ6padRGu?= =?Windows-1252?Q?FrdWOZI9i8x8gpDDGa7KUVmvZ9wgSpabW41oue7G3oZaBbUukyic8tkD?= =?Windows-1252?Q?g+hb45xgq1y6iFU0Ycd9CN33tmsv6TC0qTWFlKJQuBfR3rvpoKIQLVZw?= =?Windows-1252?Q?kq5uXRkIBasoZYa3yi2zx9A05QDVB88cMjhrq/ArX1LghwMQqh/ZlV7I?= =?Windows-1252?Q?KiEhZtPCnhM1L7rRy3n1Fn+ZUVUBFurtKVh4MU+3hms5f80sMS+KOClX?= =?Windows-1252?Q?xOGyJqhJPcxzsFsFeaHe+2NV4JJwlj4LUm8qcNm8O9FATEFaJP3E4Gev?= =?Windows-1252?Q?6OrMoOPQol0Vjyhga9hkBWyhAASqkS4jzm6Yum1GIkIisLDGCbCTFuSk?= =?Windows-1252?Q?nuTeGvFxO4EKuwNfZPF6dxEe6u+XYjgYN5LrnHcwZ6LUMDB67kRFCq5l?= =?Windows-1252?Q?2KYz2KBohwzi9hA+Os9Kc5m5z8dnyEITbsZr8mW4FRig7t9eWNAdqPrj?= =?Windows-1252?Q?HcvNo3MdZfGQSvSyhLFJKsNgA4HQe6y697NOtCr0yf9pgbsXP/u0/WSZ?= =?Windows-1252?Q?5dqzrXa+pexEX9nik5KCLK/y4z?= X-Microsoft-Exchange-Diagnostics: 1;DB3PR02MB121;5:VEi+OU8EwGqwh3+lVDHj4M6jIJn3Kj3eFz6/5kn7/ZWRB7kvxBqz+z2ndy4M5eSFDhohxvZAZDlclheu7Qplr6U6D7n6jc+oeGhAy5Ljpv7iFzwoofUwKhucIRzvwWPiq1aso23GVLZyggORByGmwQ==;24:l2sPGiqa+rplgbHctcA8o6KbGULQn2Fioeh0M/6hzsj7zt3nNDZjd8GGmuylJ+FMgu56TKbEPENvAMB9G47imL3/qLrHZv27+XvmBPM01ZI=;20:ZBOrpwA6Fqcrjr3bY35J28jP+Zq2pNObyDCNFxgp2aSXfIbviZR8AAejWeHAwyTtVFVLXOdtts99Zji+FlccCA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2015 16:42:16.9699 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR02MB121 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3602 Lines: 72 On 11/15/2015 10:18 AM, Arnd Bergmann wrote: > On Friday 13 November 2015 17:10:44 Arnd Bergmann wrote: >> On Friday 13 November 2015 07:38:49 Andrew Pinski wrote: >>> On Fri, Nov 13, 2015 at 7:34 AM, Arnd Bergmann wrote: >>>> On Thursday 12 November 2015 14:47:18 Andreas Schwab wrote: >>>>> Arnd Bergmann writes: >>>>> >>>>>> On Thursday 12 November 2015 10:44:55 Andreas Schwab wrote: >>>>>>> Arnd Bergmann writes: >>>>>>> >>>>>>>> What do you mean with 32-bit off_t? >>>>>>> An ABI with 32-bit off_t, ie. all currently implemented 32-bit ABIs. >>>>>>> >>>>>>>> Do you mean that glibc emulates a 32-bit off_t on top of the 64-bit >>>>>>>> __kernel_loff_t? >>>>>>> Glibc is bridging the user-space ABI to the kernel ABI. >>>>>> Ok, but why? >>>>> That's how the ABI is defined right now. I didn't make that up. >>>> Ok, I guess it will remain a mystery then. >>> The biggest question is here is how much compatibility do we want with >>> other 32bit ABIs? >>> Do we want off_t to be 32bit or 64bit? >> I would much prefer off_t to be defined as __kernel_loff_t unconditionally, >> with no support for _FILE_OFFSET_BITS == 32. This is at least what I had >> in mind when I wrote the asm-generic/unistd.h header. >> >> We should probably find out what happened for the other glibc ports that >> were implemented for the architectures using this. It's possible that >> there was a good reason for supporting _FILE_OFFSET_BITS == 32 at the >> time, but I can't think of one and maybe it is one that is no longer >> valid. >> >> Do you know what x86/x32 does for off_t? Do they also implement both >> _FILE_OFFSET_BITS == 32 and _FILE_OFFSET_BITS == 64 on top of the >> 64-bit __kernel_off_t? > I just did a little bit of digging through glibc history and found that > Chris Metcalf added the files that are now in > sysdeps/unix/sysv/linux/generic/wordsize-32/ and that provide the > implementation for 32-bit off_t in glibc on top of the 64-bit > __kernel_off_t. > > Chris, do you remember what led to that? Do you think we still need > to have 32-bit off_t on all new architectures, or could we move > on to making 64-bit off_t the default when adding a port? I think there are two questions here. The first is whether glibc will change the default for _FILE_OFFSET_BITS to be 64. This has been discussed in the past, e.g.: https://sourceware.org/ml/libc-alpha/2014-03/msg00351.html I've added Rich, Paul, Joseph, and Mike to the cc's as they are probably a good subset of libc-alpha to help comment on these issues. My sense is that right now, it wouldn't be possible to add a 32-bit architecture with a non-32-bit default for _FILE_OFFSET_BITS. And, obviously, this is why, when I added the tilegx32 APIs to glibc in 2011, I needed to provide _FILE_OFFSET_BITS=32 support. As to the kernel APIs, certainly tilegx32 only has the stat64 API; I just arranged that the userspace structures are file-offset-bits-agnostic by using ifdefs to either put a 64-bit value or a (32-bit-value, 32-bit-pad) in the structure. See sysdeps/unix/sysv/linux/generic/bits/stat.h for example. While the __field64() macro is kind of nasty, it does provide the 32-bit off_t to those programs that want it without any particular cost elsewhere in the code. -- Chris Metcalf, EZChip Semiconductor http://www.ezchip.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/