From patchwork Tue Nov 17 21:16:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7642181 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 92EDCBF90C for ; Tue, 17 Nov 2015 21:20:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B7FC52051A for ; Tue, 17 Nov 2015 21:20:24 +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 D136A204F6 for ; Tue, 17 Nov 2015 21:20:23 +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 1Zyndn-0006Ck-Ib; Tue, 17 Nov 2015 21:18:15 +0000 Received: from mail-by2on0081.outbound.protection.outlook.com ([207.46.100.81] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zyndl-00068D-0X for linux-arm-kernel@lists.infradead.org; Tue, 17 Nov 2015 21:18:13 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.120) by DM2PR07MB621.namprd07.prod.outlook.com (10.141.177.140) with Microsoft SMTP Server (TLS) id 15.1.325.17; Tue, 17 Nov 2015 21:17:48 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 02/19] arm64: ensure the kernel is compiled for LP64 Date: Wed, 18 Nov 2015 00:16:42 +0300 Message-ID: <1447795019-30176-3-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> References: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.120] X-ClientProxiedBy: HE1PR03CA0024.eurprd03.prod.outlook.com (25.163.170.162) To DM2PR07MB621.namprd07.prod.outlook.com (10.141.177.140) X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB621; 2:e7uiFHw70vS/rPjnYwDCxg4cXIVnHet64ozXqWk14IhR6rccncWJFOb2Fu+gBcH9bULH9ZD0ifYm5e+iyPAHR2XHyfl3e0QpwkmNyM4iVJFiLX0W49BJzb1RHPPrmkS8UT1G8dbHzsUUnw2UctabZgJxj1rsVHTW0ki6GZQLKW4=; 3:4oO16wglmbaesyxjKW5D9pxjxOc6bq7q5/lgN3O6if1HPyV2FLFt38i3dXC2EGgx432CSVzk604B4Z5QHhsk+toDJjCvWCioKbEjB7c4P0MjWBz/IbfYxmXtzAr1Hnaf1Lpem7OJfv/JwamFkxoCIQ==; 25:5egk+Q7enPzYCNkQXGV4fmHLPPl1nVFS/LtZP373EbBqnM69O7J4ZdaQqglQiZ+2uITFSD0b4LQSKxuuDKd8rQADIW1BvPYoAdLyNiXSAG8ClCkKqEsjMfgFN4B7bs0tINeVwbGuIhDi+O9qNMiapS4Qrb6EoYL6BI+03k3OjmKirz24MD9fOQOGKSQxJBOePqGYM8wMnJ6UnSk6OFI+fWIBSUX0TlUgYUSSqcIhD6cGxcc4ACuhuySJ1vQBVIFsBNfHiyCpH/NNSakf0Cz3AA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR07MB621; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB621; 20:MqMkHHW1slyafcZx0glbTG/TsUudXiTX5oZF4FFfd9xH1h8QbCp0YHo8M5ETome+Dr/BBYoJsQo8OHx9PsxYKQvmz5KYbgDmxMxYqp48bUOuUIqPco1xwUE4jxgOgG4AYmzAXHfImZCFfuqpFayMwMpCwKqNK5RvnyUcPAMKhCOQyeucvWzIjH7pSM9D8os2aW0hGng6A3UdLMSH4R79aiyGpO+WE/XbcclUFrwDcSU3Wx1kUW7EVcQxnY7S4zlZ1D/q7JIF7YFutn0ePRriG0p7Ygw1bwEo3V9OOFevLrR20r0UoFX/mAVPRtOwvts6J93Osz6n5yQbxtrNWrNIMkCAhe39o+eNr3qGJpzlI9CEaEogkYLT3r2d9gj8NBxI7kGTjF9ymh8R6ZEEHybOKjLX4w4Dr88HJCNgp8EpvvR3ADMIpuLz3Szz0vFb9pmrlVVoS8/wjUU1jZmNK1x5sIIdndYRbcAqnm3/jhQ+CK1UuyclWh0BlqnCMesAXGAxtY2AF6V3Cpr1Rpb1mu2LFENfUfq3QP0Jb59S8dasoL8j3hBaNsmgLTlmF1sVFVnnwJmXE9D6GsaaEkWQp/ViB+wC3DOLQyHsDypkMEeIZpI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046); SRVR:DM2PR07MB621; BCL:0; PCL:0; RULEID:; SRVR:DM2PR07MB621; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB621; 4:+ApTvXGRpaUxV9PnKU5rOdTxDycyC3QlfUKOWe7D7ANgGQnsk/SZ5YyMlo07Z0EHwVTt7bBWbp7LDeqelQMFlw6rxSTHPXtIp1xMgVBhk1nNdLC/44m3lCflNShjpY4k0Fi7aaw2LuRcipnHP8nlEZY4gHQvuxFMdPK9Fg8oL8T/q4Lw31mCxUh9xUzsV47LWTyTVZlwDWETzBULX6dHu7RYYobMBLibEEnzImL9K4hNgIFvnBRSIaSNp2DjEBVLsvRDmFQhI7ikC17bhH/Zf4f7Yc2gUgGH+52UISuHL35pstZe4Jf0KTwqEPh2m+2WoNgW2fmdU850Muq1Lm24mhZtHv3jhJ+nsKeAxLCqZ/BE+wP1UYCNlT1KWrDjD3ow X-Forefront-PRVS: 07630F72AD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(199003)(189002)(5003940100001)(4001430100002)(50466002)(42186005)(106356001)(19580405001)(77096005)(48376002)(19580395003)(586003)(2950100001)(92566002)(105586002)(36756003)(76506005)(33646002)(81156007)(229853001)(50226001)(40100003)(47776003)(97736004)(5001920100001)(76176999)(5008740100001)(87976001)(5007970100001)(5001960100002)(101416001)(2201001)(5001770100001)(66066001)(189998001)(122386002)(50986999)(107886002)(5004730100002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB621; 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; DM2PR07MB621; 23:Qe8G/58JFSnyw67FblqXOqzIDolNrp27Cnf9xT9xzh?= =?us-ascii?Q?Ukf5spWYcf4vebVgGFx2BmeFBIK033C+3UPRgnx7N5aJgiqaNoN9+6H2fIgQ?= =?us-ascii?Q?YfGkT14GifvZeBFgA7X5zZEHswFU4PuwgS/+3U6MObEitWqUD6Qmskf2ZLfg?= =?us-ascii?Q?FJsiCj648396a7J98DuLrw8xDHNJdwdsMjxlmDLAdd26tRVnIeFO3RJL1Xp/?= =?us-ascii?Q?DnA8UaiPF0/Y3rIE3qStGpy8JjHVF0suhaS5YJtyNhbK7XpUf4i1kpIi4DSj?= =?us-ascii?Q?kEEXY5PDLWzUv6JuXb+wwAoH9HogtXULGg4gH+X56y+J4bSXV3Y25+xF2C0t?= =?us-ascii?Q?On/yjrLUk2T5FhI3WyMLDB4U1omUdt4VY/ykkw0Rz25+LhxpSwrMtGoZ/GiD?= =?us-ascii?Q?RnCscUBM71fSlLGceIlkwCJzT/xL7cQ3AvjounUQDMI+5qQ6wObnKJ7Ia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e40vT54YYWqkDtl9m0NcDpoFr3YFyoCXrEjwp825ltirIG9KvFkowTJmmJSwdAVHUk4QnpuZ1+CdsTHFE=; 20:4APNJ1fsNpi3GE4i4sJdUvm7vPIRx4DkK+dCLxxKMpz+bsYE2lYHoQuCGL+2q7HNPcaCfndBiw0e5d5Y/Jm04w== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2015 21:17:48.5965 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB621 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151117_131813_143841_12D49FE9 X-CRM114-Status: UNSURE ( 6.44 ) 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, Nathan_Lynch@mentor.com, agraf@suse.de, klimov.linux@gmail.com, broonie@kernel.org, jan.dakinevich@gmail.com, Yury Norov , ddaney.cavm@gmail.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, andrey.konovalov@linaro.org, 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.8 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 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__