From patchwork Mon Nov 2 23:30:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7538691 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 A3247BF90C for ; Mon, 2 Nov 2015 23:33:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB6BC2063F for ; Mon, 2 Nov 2015 23:33:45 +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 AFD792061A for ; Mon, 2 Nov 2015 23:33:44 +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 1ZtOa1-0004xZ-OD; Mon, 02 Nov 2015 23:32:01 +0000 Received: from mail-by2on0073.outbound.protection.outlook.com ([207.46.100.73] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZtOZx-0004mx-BU for linux-arm-kernel@lists.infradead.org; Mon, 02 Nov 2015 23:31:59 +0000 Received: from DM2PR07MB621.namprd07.prod.outlook.com (10.141.177.140) by DM2PR07MB447.namprd07.prod.outlook.com (10.141.99.153) with Microsoft SMTP Server (TLS) id 15.1.312.18; Mon, 2 Nov 2015 23:31:35 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (109.252.143.100) by DM2PR07MB621.namprd07.prod.outlook.com (10.141.177.140) with Microsoft SMTP Server (TLS) id 15.1.312.18; Mon, 2 Nov 2015 23:31:34 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 02/17] arm64: ensure the kernel is compiled for LP64 Date: Tue, 3 Nov 2015 02:30:31 +0300 Message-ID: <1446507046-24604-3-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1446507046-24604-1-git-send-email-ynorov@caviumnetworks.com> References: <1446507046-24604-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [109.252.143.100] X-ClientProxiedBy: VI1PR06CA0004.eurprd06.prod.outlook.com (25.162.116.142) To DM2PR07MB621.namprd07.prod.outlook.com (10.141.177.140) X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB621; 2:JDkm7QEtI2znoVLpQS50o0shrAeK4VHHCYE32FAjGrp2O2hq15wILayhMJwT4Mz+oyThB+YukCoh9fPkF/Mx3u9L6fS2VHmUqaFeisF3mgTkiug0i4oY1wutWwOczlq/XEKDR2LC2WWsfv9kuEADC2CsYk7tASiL74y+BANt49Q=; 3:jNEKNJlAc8vnyx/hpKIB44TMuJDFjNh68juDNehaeA6hM0v83QgZ+pBw4iBBPSd2nNrT6oStTG9MqN2v8vZ7/vgxomZA0m7IuCYJEAECETk0r0N+zZ9OhySLcRMRAgCVgSxmZVVjXI/IQfygcHvHbw==; 25:wKEvWVq2JBJTLwZcJAyg+Im6yDmsr99LtEzKk3rtSRxLJVHeIbSS/32tNfLat8UuTd+GaB9Hq7+eClPalhEfTZVXXIzkQD+UqKzjHzYLl6D0wUK3KPHaM2j9YjCrgWVOvPbkvTG4Rpu1ZudDbZEsgMvK4KsOe1jFT9CX6Sl+v644L5tjbqZGSqGloGFneMVxttp+OhyNMYF8+T7zaY8V1crUkAEskVTQ01s4cKPzazBP2vdp0sUuSlvoVT03y/7gZ4raqpbOxPXBfiNgt0NZjQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR07MB621; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB621; 20:d7KbbXe6ZXcoDqrv5Fbem4SbAU4NMJ3qjHkJmkPD5hB/0xghe+LJoLsYf/e8JxR27+gVAIohDNDPvmdxEeOo1sQyFatFacpgdoA7Pa1S79bkw+srtAGsBSUiZWLNXSDQQ9Jbfk/J8+gWPaVbS8uiwuIHtrIg9fWxRruRvdWK6eY5cd52Ov1KX9j/lKL+GXWL2fHYW9+YD3xOyAJPoFT6PasGrld04NevjZUYN7EK9Jy3tKcPJg7ZKsQvoFx5yjE5cMvtbAuKDrb3OtktC1kmdlZ3Iuzgph304+icOMRyk2dNlEsR/FE1OCKUWG8j7yng80h+wEyPZUBeJYKQ+KsRdIgGdYCdz5f92daJeqpvczMGfBu9kMi4yXy69MPTbKChx7z0qFFKl5lGgAh18+dKecHs2wE34vfLauut4K6Zenk02N1ESDcUOLJHAMMJfxVl9gtOwWAdQneL+gOvks+nqDPUerT+bfWjMyZKpFPA99OzhNSCh/1oQeQhN/Oqu7u/5q04FRbW5tSAjLLgr+TEK4g/LDFyIYyby+7+IgeQBj7O1D83MjGe3Y3XyRQUZza5ONY5jjZNalFP1J2nJGBaVtCdXSSNe131S0T3AX4tqoA= 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)(520078)(5005006)(3002001)(10201501046); SRVR:DM2PR07MB621; BCL:0; PCL:0; RULEID:; SRVR:DM2PR07MB621; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB621; 4:Db3aDAfsdCfbvnZNIJMEw/a+B0b/uo7nH0tsnv9CQoHoQTtH5MK5qnJz5qHHOtJdosP2S0sN59EexzWCmika8xoUozacip4laHbaQ8yH8Z9AgeMjZiEK0jIQzMHDq8SNwtzsKtShP4BtDEUDpUoQqXa68cAw2u/dU5pw3a5hRR+lhHjtNnd01IkuOrnVIPJKSjv/ULFKngSG2n7ohF4f5lbnVxHlxG6ASE1WNT8tyHUCsd5zXa2tmZwclciw6eGRNI/ykSWKPCQtC5J59i9e6qlXMPMKuO24uYRMNPmCxCLDcBDESvpP2AWfuvVdF/SMoOYQ/OeT3fx41jtoWqQNn06z2AnuEdhCGYTDrZ8wU1dFOZMgwXUTpoN5l09z8MhL X-Forefront-PRVS: 0748FF9A04 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(6009001)(6069001)(189002)(199003)(50986999)(97736004)(5004730100002)(33646002)(19580395003)(81156007)(5007970100001)(2201001)(5001770100001)(19580405001)(47776003)(229853001)(40100003)(105586002)(106356001)(122386002)(66066001)(50226001)(87976001)(5003940100001)(2950100001)(36756003)(77096005)(50466002)(4001430100002)(5001960100002)(189998001)(48376002)(101416001)(76176999)(42186005)(107886002)(5008740100001)(76506005)(92566002)(2101003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB621; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; DM2PR07MB621; 23:d51OA/cAwfhZiLs4CrbQjxCD4yRByJbntARiRmlnem?= =?us-ascii?Q?xH2WGQCmFhy/oK5ZRoK+LL2gaUy+ImBI9N62RpVI802KO81fx91RHl0OcOu1?= =?us-ascii?Q?TYCELcLUpyG+lXYzGmEjYpdO3dRLBlopGvegvXAmfmUFO4JusteQ/XQD0gFd?= =?us-ascii?Q?4gCnd9NK/ERwCaTwoFwdo5TMnSeAeHqI5bFvkSH7MKVjcQSKIhmLrrBi1Fwm?= =?us-ascii?Q?EH0qUhKk+FK/LXqIbmRVC8rAtkffzbNoV0Zn+XFPv3Xje+8XyZm18Cvpg66e?= =?us-ascii?Q?rhpuWwF19m+GEn+uiY0y04iGeuBB2FsqUDrEs3QopbDpr/UKkwVroByyzMYz?= =?us-ascii?Q?X68n1ubhGw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diagnostics: 1; DM2PR07MB621; 5:/TqOQAyULPIfkMP3+M2XX1C5lj8a0myTp3fm4Xa+wkr8uOO0VpRTTwO7AvYzkvZAmMHTIPX4oJCR6q9KLPtNAhL/WLa7ptGtoeb+g5JoYRsUTbBu7B3efIgLjsfN+x6UmtlnS39jVzm7CZ9K/I72Pw==; 24:9hKAR7LU76ZzpYhSdPsnXSk7EfFuNz8b7lmQHYqWhHycvcL4ROJE34ICiopSfXV/KUuYV2jvzPsMyhj/oQ950MVHoBxQLiHsRjTMGnBAh5I=; 20:/Tu6tgPDs2yZSf4h8+U603W89cwbYaw8/OvsYR5HmSZB2NMJEqUTjpo8i4eTDjH3KeXtu6gC0FhxEVD3+HhkeA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2015 23:31:34.1391 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB621 X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB447; 2:jxU2hCtt687OZc9MeVZeGTAPnqAbmHSHZ4et/EZ0Zf73JhDgzs0qz32xXxnpCmHPHaQvnN/qW+fe1+TuAPHaAGlIveC39eSSSGcEiYURv7MzqE2oysI1LTAIxosBx5r8W3bFhvD4yu7MBsXE3vhjtpj4XmCZfqmKHBillcQ7ZDw=; 23:2xqYMKQvU7Zl0qs99rfrgL76xlHzLmgFiLfDN+z56VvpR1yUosOGAwvcPLshJdxQiYC+bNRApbI6zTU/6zYrXcXMkZeVFWRWZ2xUR3Wuu9ayhwTTGd6LJrCdQEBk2xGoRSNSeVWYKNVeDmOF74cZ4URjEljTgJvnFjuUm69etcWdyXhWHtTeuYlKRQ0KFr0V X-OriginatorOrg: caviumnetworks.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151102_153157_682218_9D7137E0 X-CRM114-Status: UNSURE ( 6.67 ) 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: pinskia@gmail.com, Prasun.Kapoor@caviumnetworks.com, Nathan_Lynch@mentor.com, agraf@suse.de, klimov.linux@gmail.com, Andrew Pinski , broonie@kernel.org, jan.dakinevich@gmail.com, Andrew Pinski , ddaney.cavm@gmail.com, bamvor.zhangjian@huawei.com, Yury Norov , philipp.tomsich@theobroma-systems.com, andrey.konovalov@linaro.org, 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=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, T_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 From: Andrew Pinski The kernel needs to be compiled as a LP64 binary for ARM64, even when using a compiler that defaults to code-generation for the ILP32 ABI. Consequently, we need to explicitly pass '-mabi=lp64' (supported on gcc-4.9 and newer). Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Signed-off-by: Andrew Pinski Reviewed-by: David Daney --- arch/arm64/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index d10b5d4..432b69a 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -29,14 +29,19 @@ endif KBUILD_CFLAGS += -mgeneral-regs-only $(lseinstr) KBUILD_AFLAGS += $(lseinstr) +KBUILD_CFLAGS += $(call cc-option,-mabi=lp64) +KBUILD_AFLAGS += $(call cc-option,-mabi=lp64) + ifeq ($(CONFIG_CPU_BIG_ENDIAN), y) KBUILD_CPPFLAGS += -mbig-endian AS += -EB LD += -EB +LDFLAGS += -maarch64linuxb else KBUILD_CPPFLAGS += -mlittle-endian AS += -EL LD += -EL +LDFLAGS += -maarch64linux endif CHECKFLAGS += -D__aarch64__