From patchwork Tue Dec 15 21:42:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7857411 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D28AE9F1C2 for ; Tue, 15 Dec 2015 21:46:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04A2E203A9 for ; Tue, 15 Dec 2015 21:46:22 +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 0FD362037F for ; Tue, 15 Dec 2015 21:46: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 1a8xOv-00023c-9f; Tue, 15 Dec 2015 21:44:53 +0000 Received: from mail-bn1on0066.outbound.protection.outlook.com ([157.56.110.66] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a8xO9-0001Be-7N for linux-arm-kernel@lists.infradead.org; Tue, 15 Dec 2015 21:44:09 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by BLUPR07MB610.namprd07.prod.outlook.com (10.141.207.15) with Microsoft SMTP Server (TLS) id 15.1.337.19; Tue, 15 Dec 2015 21:43:37 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 02/20] arm64: ensure the kernel is compiled for LP64 Date: Wed, 16 Dec 2015 00:42:28 +0300 Message-ID: <1450215766-14765-3-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> References: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: HE1PR01CA0027.eurprd01.prod.exchangelabs.com (25.163.2.165) To BLUPR07MB610.namprd07.prod.outlook.com (10.141.207.15) X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB610; 2:JEns4ITm7dSeTke4QMFaARlz0Sg8MMQidnloVCRnYap5HgeVVAEXBtpKio2K/FoQ/H7f4OPi7PEsx1ic2CdTTx4zJzQWt7e4+MGkkO2eyBQ9S6kN3mRh9KXMekDyZ1kSpPDpg4D5y8UO+SsRRCU70A==; 3:XhKoxypHydLJpvDsnx20j/5Vlot1RFr2JJzggJRdmaSAEDdjA7AvKADuVFybPZkJuJ0c34/LAwi0unK62zSdwz3zPe3UgSS+ZOtsGOEVZfhPgWh16ejLCa/SlS9BuB75; 25:kNPCJic7cM2SOfVhqlSkq8P3IzrpnnyQs1Hm64m65IswgpWSeeofzRlYyfNsD8C5Xr9Jfbh+Vj1wY0ZofpOL9ZzH181L4myMKcrRTvT7AbMAJugT2ZkxGNc07RggZZAs4vpYZDq/v8frf8NPwDtP5WoHUXu6/tiAiKrT4trzeV2oGmcbyqIVFnfBIzPqs17JiBXPLhusqVPBJMfCxMWiHpTD5h0sz7vlKyr0fAFY+7Y6w5MJ8drWw+0+Qa+whvNvfZKCkIzxFurpctZW2+GuRQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR07MB610; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB610; 20:+GfBit3fMvnGpgvUd/FcS7sHvrQskVvvp1MN0XOolr1zSupD1No2zeEK8UnpJvN42TZh/5o5TB1TWhVHw2CkXBW24dVAbhETn9FB0honKTm6yd1Uqio7jqfPXoHvHbzR+/3sriNaaJB/eFOMupKl1aBE45D/PLyiKo/117P65udGnHob993EU5lMp5H/eg+0NndxBjlNcy7DLcbMguyfKj+JZnyH/IqtjI+Wcw5WyaEniD8E/EGCcLtzPOxOsfXQir+I2IQF8fYxNsqwGnCULVYnbFDjDMPEUarulAv1mZrY6OrU40cLajuqItL2HHpoQMSxO0kwjXxm9L3fLrUZdpASiGjlhpftEsR0zTA+K6RyynokzLuSfLz5Mg7hIDfRMNdpWIX/hC7L38adoZM7gLmSgo4A6Fm6KYN5ahsnQz3cdoCCkBA/yrEls9xpwum2msNGIiqVafC9eWfJ85I3eUspeyk3/npQb6wkTL/hK6rpLUDZ5c4STWnYmwENlEdtI+YzFWf+8hRi6LJ9w18ImZGakvYbQfD0e5xNPCWxQgujjp56kjhyTDP7iKgcropxYBVCDj7RHXvDH8elob7E1T3q609LbYCpxcVXWXgA5U8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(3002001)(10201501046); SRVR:BLUPR07MB610; BCL:0; PCL:0; RULEID:; SRVR:BLUPR07MB610; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB610; 4:UKO6XOjZgaLKFrH896xOogniLRz1SYgvW7qXnGG/418kC8wTTAfxhaHOwngjG48uhdT/1EJ///XrMDyypXQzrYPVbHG+YK14Il+jZ91+GSRUDM/EIORJdzq4044Lco0JInFfJUcwl1y00ki4AFIegEZulPz1g75WELx2P4amsCOuj0TxrGNGb7zK59LAtlAgb1bie9JgDiGKaBwBwmG/VoNuoy9fuEWhj9+Tifang+WcOFGjNygqNHkbtxjMiwSxOMOUtvqzRXDXm57tS0wK4BG46m+fZ98mTc2aM6nZgnxBUUq8upJNQxzgCbQFoDo0JE1Owfs4r+fFNTDvjh40qTwln7VD/M/gsnh2q25rQorHhN5mfSrMF6jk4qKyBDaS43z4xl5bqbMKixRJ2eClXjOF8WS3aTLjbQ7Vd/4axyzVp8x4ymcP1hatLQWMFAwA X-Forefront-PRVS: 07915F544A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(189002)(199003)(77096005)(33646002)(87976001)(50986999)(5003940100001)(36756003)(1096002)(4001430100002)(19580405001)(19580395003)(48376002)(586003)(3846002)(6116002)(106356001)(101416001)(105586002)(50466002)(2950100001)(40100003)(47776003)(66066001)(5004730100002)(107886002)(81156007)(76176999)(42186005)(92566002)(76506005)(5001770100001)(122386002)(189998001)(229853001)(50226001)(2201001)(5008740100001)(97736004)(5001960100002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR07MB610; 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; BLUPR07MB610; 23:1ayzazHvYCy1c41TWc1RE6kzlksWslkw92LCW9R6Kw?= =?us-ascii?Q?rjYJl5hRwPFrEk/NgzBCzLUWy5SNqngC2ZQd/rhhJbHRlddRzK3CxwiO80FO?= =?us-ascii?Q?xHOMnAbxmxW7F349LVVS2WeL4yR6ZfTEjagheFzfHHumuwStFqdiLml+ZPz9?= =?us-ascii?Q?TAOY5KriA1ZP13Cvtfy42RA+nOu/azc1XOp7gVWg1RKiEY9/NapqUMYbO/vm?= =?us-ascii?Q?YQmlUtKrLB66+AhlVryhTVOK3GPxoIxo7ThKbPttbniFgK5fGzX9hhSYfoCb?= =?us-ascii?Q?93yHo6lAZsWeYhcLl32F316ZMZX+2yO/DxnXsJXsfsXotF0yFvPItVodVX52?= =?us-ascii?Q?gJb3u3ZSjH7rAd70deirjUz2+dZ0DoVt8TIXTAAVkIG42RdpLzTN7sS9aILs?= =?us-ascii?Q?xbddcfts668mQROFolEsYsz5Fm6+AJjfPlZrkvq4gZ4trrYhBqlQVxSlnmBL?= =?us-ascii?Q?xRgJPuUfSZRiXkvBY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w18kykdVaTmV+AvjiDviVs1Dc8WN9fFRGlfYhtKSD86bvEgC8JU= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2015 21:43:37.4167 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR07MB610 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151215_134405_731523_D44C4EF9 X-CRM114-Status: UNSURE ( 5.35 ) 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, schwab@suse.de, broonie@kernel.org, Nathan_Lynch@mentor.com, agraf@suse.de, klimov.linux@gmail.com, Andrew Pinski , ynorov@caviumnetworks.com, jan.dakinevich@gmail.com, Andrew Pinski , ddaney.cavm@gmail.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, joseph@codesourcery.com, 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). Reviewed-by: David Daney Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Signed-off-by: Andrew Pinski --- 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__