From patchwork Mon Nov 9 16:04:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7584741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 21F87C05C6 for ; Mon, 9 Nov 2015 16:07:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 85F3A20675 for ; Mon, 9 Nov 2015 16:07:26 +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 74B3E20680 for ; Mon, 9 Nov 2015 16:07:21 +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 1Zvowm-0002OP-6Q; Mon, 09 Nov 2015 16:05:32 +0000 Received: from mail-bn1on0086.outbound.protection.outlook.com ([157.56.110.86] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zvowd-00016Q-Gz for linux-arm-kernel@lists.infradead.org; Mon, 09 Nov 2015 16:05:25 +0000 Received: from BY2PR07MB613.namprd07.prod.outlook.com (10.141.222.144) by BY2PR07MB923.namprd07.prod.outlook.com (10.242.46.155) with Microsoft SMTP Server (TLS) id 15.1.318.15; Mon, 9 Nov 2015 16:05:01 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.120) by BY2PR07MB613.namprd07.prod.outlook.com (10.141.222.144) with Microsoft SMTP Server (TLS) id 15.1.318.15; Mon, 9 Nov 2015 16:04:58 +0000 Date: Mon, 9 Nov 2015 19:04:41 +0300 From: Yury Norov To: Andreas Schwab 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-Disposition: inline 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/IMCq1EVxiDGReNKjEhSvEB8yf8TqckMsgQg8f6tb3vdhtbAUXYBIBVRmhtxJoMwFKAlLor7MN0MhGtJTUq+Bg==; 25:MgHdt3ETgsideUJmwUPts18Llk8VbVDivDYAyXSZZGm/1ypEMXK9nX6xAmhGmjMS6y08yFllLI7v4Up7ZxfYbSfTbxXDqWbqwv68JV+kMDDSCSsyY5mE6okR/JHfUnMP276opvCUVlwaMHaH/J1TTGRzaKo1iR+RK7O1IPQ/TSSYOkZfXUuEpW1P3n37+KMQkdQKqqQwJAY1u3ckGjOJCVMtVIycHagQFFvBj7G6s6vMZO1c+sIs0Xt0yXiI27/XjLl50V1xh7Etx2LMxBrBvw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB613; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB613; 20:DuWQ4qkmhQcGghR320iD2XZSJnmpSYjc/YXDqQJBftV/4diADkPAJXWnbMnJxfbBLmSnrda4F3ERh2BcZbSCQN92cf9i5u5Mp1w5/K0CvlT2VqxxpUPQG+k/1zX5heWU+zlD/K4DGV7UYzIFxImK3wSF2wBlbu7UiEKKU1pjlqcKIgOVCjQNKrjYUStG7GmHzPFxUt50FYwK6K3M+/Y9PbFAPDnx28F8h+K/hwwllW5kX5ZZ/gY1xIj3McQGGpxx8302o6VHwuHeaoqxbt+yIBOFJQABXuqq8rfhvKoEaEq2mfQoiA9TTD1oDxTA6B6YhMZVrFt40hubfRIZUuAif7A0bcv8OYNHxxa5AjcJ2kFijjty+I9XhVzrPe3xcUvZPFTph45f5UxK75/csJRNsZapAAnXgGYqO8UMXQxRrHuQpGzylStT8qerFFLSmmkGMUIOhxxrCLC3D07nShzeB1jviK7PZda0MmF7Iz7XRtOPa4jCVpuoqaKVytW0YBnqa/+eVZ/J8sDX0hkcTCSzRcdoX21hqR1fUvaIUMYg2SY5UizOAA7Fa9nssWJwFcTVPBanbCTB+H4DaGfErp69ytBSkwO3OxjN3UthSjrthl4= X-Microsoft-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; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR07MB613; 23:ofZVc3UE/iU2fOKCkDrviCvqgX6x8UucVC1NOghFlH?= =?us-ascii?Q?vxkdGbSp6gFtkVtPOyxuBYZuuA2OjafmlpYQ39NMtsLhcyAcUjaGixFWbBSk?= =?us-ascii?Q?Ag8rmInzLL1S6dgiX0lB47fkKq3KhWN0F++ylEc1+T5LqcaJrutg5qcFcn/C?= =?us-ascii?Q?Q8z1/6NrCCuphJd6M6Buo4m2yaAMeClI19NPV54X+5y/9nsGEbLxo3iKU93f?= =?us-ascii?Q?tzQB+JdxGPMjLZkd4MD3vtrSbw61rgelTsG1mJMRn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8T2mXKaTNwX3lZpaWG4peEDVwKhaNKY/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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151109_080523_995066_4A5C3414 X-CRM114-Status: GOOD ( 21.31 ) 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: LKML , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, pinskia@gmail.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=-4.5 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 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 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