Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751856AbbKIQFK (ORCPT ); Mon, 9 Nov 2015 11:05:10 -0500 Received: from mail-bn1on0058.outbound.protection.outlook.com ([157.56.110.58]:1952 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751427AbbKIQFF (ORCPT ); Mon, 9 Nov 2015 11:05:05 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Date: Mon, 9 Nov 2015 19:04:41 +0300 From: Yury Norov To: Andreas Schwab CC: , , Arnd Bergmann , LKML Subject: Re: [RFC PATCH v6 00/17] ILP32 for ARM64 Message-ID: <20151109160441.GA6451@yury-N73SV> References: <1446507046-24604-1-git-send-email-ynorov@caviumnetworks.com> <5795162.dlSUXvq6vJ@wuerfel> <22080083.1SbhEYEXOu@wuerfel> <4C408453-CDE5-4564-8D22-E59296F2045C@gmail.com> <20151109155042.GA3550@yury-N73SV> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="FCuugMFkClbJLl1L" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20151109155042.GA3550@yury-N73SV> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [95.143.213.120] X-ClientProxiedBy: HE1PR06CA0056.eurprd06.prod.outlook.com (25.164.28.152) To BY2PR07MB613.namprd07.prod.outlook.com (10.141.222.144) X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB613;2:jLa+QTHKp6b8RtSpyEA7P+ZzzWMbCrhR7ZitwbaBBt77kT2hKCSxhB1ULEn/V56LC1zfLqOeg6f+fzT9zxb0qEVSIyObfwoEbxMjTuRDDSAiJhiN810L3BobLO9JETVN1REEUQIetNIPv1CyxDZtnjAj8JSVwBeusjaS+/zaU94=;3:oV8Rk23YtZOY01XFtTVLP0T8xQzE2j74uEtKMmk1QCeFciLUFjhCl2u3gXc1X8Ip/IMCq1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oft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001)(10201501046);SRVR:BY2PR07MB613;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB613; X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB613;4:w2Gh2URs+VDixOzErzQtSHsti8uTmuEZAuKs5X4b9BoLwjDKTMd5FdiQkIUlKTzNAT5qDmrK1fMeMoQ87c9UQj1i9wnKdJgH+shv8irdmxC3MNOmnrPO+Z979lQOWY8G0q455YCWp/DfF1Agtl0xq4CP6jexDzdPhe8lIuHsWYqcpI6PFU/0Iz6vLA1MWwQ1eXjDmBAuXuJeuuLOrcyUgqZVwOrCRZmaVqVq7XNpOopwUbqwr42BBQ7864LRvXhc6Eg4T9YLMpWyE7KhjL1NShcHjUMpE5kwBo270EEPqtbMyBoBTYKVkZdNic2sBWl9RTdnCG+MFKrYYb9ar7S7Dok4SHmgqh02Uz9qYaUw6gx3/Qz+kxfyPcai5hHZ0yIn X-Forefront-PRVS: 0755F54DD9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(6009001)(377454003)(164054003)(199003)(189002)(24454002)(97736004)(15975445007)(512954002)(5890100001)(50986999)(77096005)(40100003)(76176999)(54356999)(101416001)(76506005)(5008740100001)(106356001)(66066001)(33716001)(105586002)(5004730100002)(81156007)(4001350100001)(189998001)(92566002)(87976001)(5007970100001)(512874002)(84326002)(122386002)(110136002)(19580395003)(568964002)(42186005)(19580405001)(5001960100002)(2950100001)(33656002)(1720100001)(4610100001)(93886004)(83506001)(2700100001)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR07MB613;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR07MB613;23:ofZVc3UE/iU2fOKCkDrviC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Mlf89FX5DK+1LJBcFDJwhhJI0mXNUZn09TGWA3VNodGCLM3?= =?us-ascii?Q?oRZ5XlFoeetGq62yZamxijxQDI3W2Vp2bD+8OmA3D74BCoZI2i9RsqT3oXOh?= =?us-ascii?Q?iU/Y9sDJsjHoKPs1dVDq3FmxZ/T+MNXEoRZHyoRGLUnSfLdHCTE/yUvQQhH6?= =?us-ascii?Q?Hh0RjPnzYdYGw+Af8q3JoCF8PGdedGybcDmROkxavrGk4NWaKaJrJXQKAFNM?= =?us-ascii?Q?h3gyj01PJ8T2mXKaTNwX3lZpaWG4peEDVwKhaNKY/tAixWwGT/bxEGhZ0Ju5?= =?us-ascii?Q?d/GJ/PcaZoGvgL9u9dIVl3ILucDg+QGlAAiu+GLUixKE/fPLJ4zHtb+vjLue?= =?us-ascii?Q?059KL8/qV06+toN3p2HQpPGRulKEfWQ2cUwnLK?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB613;5:7di7HuthRVxmUhnQV1UOFmULub/GlcXJjNGCFOrfEWGJcHbOi3TOwuiA4ydFvtIO3LXVQxHOVlKq5ZmdqiyCrVSo2VItYaScWwFpvMMAWCKU/oQv4RuxZQ0/JLI3nppLhqsY/9g/Q8gv6K++7Gkarw==;24:08K6ilQaSqWA5ZCwRuoxA1JURjvuxzQfoGlSlYUxw5szkifMP8a3zGRcKTdTBgz38ZtzSs+cNmv3M9HXLkfOEPOxsD1coqZ6IfG4MvsFrvg=;20:UfsGyFjaHVbLnLb4vc5FdbqK0WB1Z1jk2X9yATtmrDBUseIGfGpF9Bte+vqMbaG3g1bb/9FkKpz11ItfcCKO9w== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2015 16:04:58.8849 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB613 X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB923;2:xTfshGRG9mhujCh0jZLY3Qj/D1Bf7kh5hmRtG+pzLHus/XXEugq+ZTA5jnF5Mm2TlhP/U++n3S14+ps//qoFRBhPr/XXARdWlwBOJ0o+JAYZCiafybi5vlCnQnezB4boJG+rEM6SA8GK6178Avj8dn4g0rZDFCTA88WXnszKrBQ=;23:k+suwc4SlBPR1dfr5craYSzgSXd2BxuDxtrDUWDTaB2n1eWBfocM23QG/NO9u0/oP2ShLBLrqi4WFRL35obbdVMqOvpa+hm6fF5fSqo0F2+0Q13ejSq5tcIrUYRSTMbOzpBjFqy1c5MlFGSsB83Q54aTNfEPKTmX7NgRLGoteQybJQ0tWKNu/bofEQlGa5gN X-OriginatorOrg: caviumnetworks.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3748 Lines: 107 --FCuugMFkClbJLl1L Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit On Mon, Nov 09, 2015 at 06:50:42PM +0300, Yury Norov wrote: > On Mon, Nov 09, 2015 at 10:52:32PM +0800, pinskia@gmail.com wrote: > > > > > > > On Nov 9, 2015, at 10:36 PM, Arnd Bergmann wrote: > > > > > >> On Monday 09 November 2015 15:33:51 Andreas Schwab wrote: > > >> Arnd Bergmann writes: > > >> > > >>>> On Monday 09 November 2015 14:23:59 Andreas Schwab wrote: > > >>>> Yury Norov writes: > > >>>> > > >>>>> This is what I run: > > >>>>> https://github.com/norov/glibc/tree/thunderx-ilp32-32time_toff_t > > >>>> > > >>>> That doesn't work for me: > > >>>> > > >>>> ../sysdeps/unix/sysv/linux/generic/sysdep.h:24:22: error: ‘__NR_llseek’ undeclar > > >>>> ed (first use in this function) > > >>>> ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:41:32: error: ‘__NR_fcntl64’ undeclared (first use in this function) > > >>> > > >>> Did you re-export the kernel headers that you use as the base? > > >> > > >> I'm using the patched 4.3 kernel headers. > > > > > > Ok. > > > > > >> Why is defining __BITS_PER_LONG to 64 unconditionally? > > > > > > It should not, that is a bug. I don't know how Yury built his glibc, > > > but it can't work if __BITS_PER_LONG is wrong. > > > > > > Looks like I had changed the header file manually for building glibc and Yury and myself missed that when he updated the patches. > > > > > > Thanks, > > Andrew > > > > > > > > Arnd > > > No, it's my fault. I forgot to add a patch that sets __BITS_PER_LONG > to 32. I'll send it here now. > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --FCuugMFkClbJLl1L Content-Type: text/x-diff; charset="us-ascii" Content-Disposition: attachment; filename="0001-arm64-uapi-set-__BITS_PER_LONG-correctly-for-ILP32-a.patch" >From 529d30309769b0c9a40d0a4bd78ad54e8faec105 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Tue, 25 Aug 2015 02:26:54 +0300 Subject: [PATCH] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Define __BITS_PER_LONG depending on the ABI used (i.e. check whether __ILP32__ or __LP64__ is defined). This is necessary for glibc to determine the appropriate type definitions for the system call interface. Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov --- arch/arm64/include/uapi/asm/bitsperlong.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/uapi/asm/bitsperlong.h b/arch/arm64/include/uapi/asm/bitsperlong.h index fce9c29..4265243 100644 --- a/arch/arm64/include/uapi/asm/bitsperlong.h +++ b/arch/arm64/include/uapi/asm/bitsperlong.h @@ -16,7 +16,14 @@ #ifndef __ASM_BITSPERLONG_H #define __ASM_BITSPERLONG_H -#define __BITS_PER_LONG 64 +#if defined(__LP64__) +/* Assuming __LP64__ will be defined for native ELF64's and not for ILP32. */ +# define __BITS_PER_LONG 64 +#elif defined(__ILP32__) +# define __BITS_PER_LONG 32 +#else +# error "Neither LP64 nor ILP32: unsupported ABI in asm/bitsperlong.h" +#endif #include -- 1.9.1 --FCuugMFkClbJLl1L-- -- 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/