From patchwork Thu Jan 14 17:22:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 8034391 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 C3B26BEEE5 for ; Thu, 14 Jan 2016 17:25:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EFAA420499 for ; Thu, 14 Jan 2016 17:25:56 +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 196E920445 for ; Thu, 14 Jan 2016 17:25:56 +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 1aJldQ-0002Ct-Ec; Thu, 14 Jan 2016 17:24:32 +0000 Received: from mail-bl2on0665.outbound.protection.outlook.com ([2a01:111:f400:fc09::665] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aJldK-0001xc-S8 for linux-arm-kernel@lists.infradead.org; Thu, 14 Jan 2016 17:24:29 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by DM2PR07MB624.namprd07.prod.outlook.com (10.141.177.154) with Microsoft SMTP Server (TLS) id 15.1.361.13; Thu, 14 Jan 2016 17:24:02 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 02/21] arm64: ensure the kernel is compiled for LP64 Date: Thu, 14 Jan 2016 20:22:59 +0300 Message-ID: <1452792198-10718-3-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452792198-10718-1-git-send-email-ynorov@caviumnetworks.com> References: <1452792198-10718-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: VI1PR05CA0020.eurprd05.prod.outlook.com (25.162.33.158) To DM2PR07MB624.namprd07.prod.outlook.com (10.141.177.154) X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB624; 2:MVYBg4MRyyd5m203wrk94DOaJgrmKO7TL2vjEmuroSFGwunjoCcAxcJyo9c6OwZNgbYLVWJciH7MFmnA/wd/LiScOpbQwqmoqnk+OvHWETyg2TgqgqL2PrCJ0r+IaPBgDpoS5alFbQFWFrTWxjxvlA==; 3:v4s6RsIbqMrwZ3WU5e2msfV4+Zw1J4TxEkgEoprHFlgDlzBNuq/eMpoPb447Ksqi0Ki7/pOaefc2HwLKISeFJKNj6R+pQn+NTS1evsfWz34nuqtnrKOGz3OQegSRrscx; 25:HMRyURkqasJ21jsdaVOHm/R8FKE4IvnCYeL7q9Lvt/ufknYN4uPVaGn74lXcUGTLc5rfoR2NlwmXDnRgjYhv0iyBgjgAnj/5TZ+5cDkcd0uYpzoV8xN4RGJ2HYWy0AhfBCkZVqXXHsqYm2fbW3FxODUamu3I//k9EC0l6r7b6XBbtPMgpQECEEpiRVxv/TaOZdGqEgAoePg7lyEKLF23VID2XIJD7REHwALQScS2KrVe3UmQpx+4HAHI6uCu8xyU X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR07MB624; X-MS-Office365-Filtering-Correlation-Id: b04cfb2e-8724-4aef-18ce-08d31d077f61 X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB624; 20:O4wWVJ0gQFFrOA4S10Vm7W332oOZ3FFMdBfATyTJf8O+xuL3oAE2DOSRpIUWsi7Hyfkv13UYsd6yoe28pPbqXl+gRNUcR4ZNPKu9/vHK0b9NFOSu67EJvcDhtx2vdqZpIA52aOoG79pk2laAiMYCZRG5F3B78bs0QaCs44UTkGutc4lYPG3zu/1JtzewVQW4sU8ZPPyrwmVL414g9QXF723FQRjEYKXmC3DEB5/9Bcd70ghY3/NrQExpBPjSKgPqrhh7FPGHhyq1kWRAyDBCCDKG6hjEA39+Vt0D7NDySdzEjD9ec+nSle7mIagPKch3TRB2hR5s5+M3MoywuBQn0MyvSC2xFKTkUcywEq+hzAqB9Fj28dtrXXKOmFBAet8loChEAQS3224el3CuDiU9+3pjCR0BLsraO0/VqrSE2EyL3PBTq04t8SEqYn0EgZmtO5UI7HqnIP0Zef4cNO9gte2GGlWoRhMdY5plEn0yWb+mzlE7Ec3sibaDTCLDcKEOWHolqtx8HwE2fxQej986cRWaeu2mLSfDd65LWH7dsqGikN9mHJtUvW6m19z8E65FqP/nXhfJOxvC1LvrJIU7XQ/pHhFP42swklpyyIvXjfk= 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)(8121501046)(520078)(3002001)(10201501046); SRVR:DM2PR07MB624; BCL:0; PCL:0; RULEID:; SRVR:DM2PR07MB624; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB624; 4:hAY6+kLbePZhLdDv9MepXBk2WRHFQ2WFL+Q6OWFX0W5lrz9tLFBegKx1UhDxiQ/O2ZPi1yA7DXYHeuHit+ZslmbCbTEPM9lBZ4cYiQFodHQCkeW9PcDNCrdcyxkUVfE0eu1METXQce49V07dZkvchBu7dtWg/3qN0nkNcHrQSPlozo+yk981CAZSetCinK9TePcY0uCPHAOSuzkwyaWmGX3kvWrvsG8MH28bft6VeaLiUHsMWyH4Wx7y5eLv3+PnmE9MSo2dCkp5PdJ3N6EmWoQAZubXSfhnliNk11Vug7HlMpHr97uT64V/7Zd8S/9PJRFKmc+vP+wBwLzR3CvLJFUZ6UOTRtd8GgAfCjM60065tSulxGQIBHAzLp3w85yt/0WVaCf36I1AeU3xzpMjqJyskVb9z6ReBSGBRnRZpp5rJZy6xc1y634pjAelFxls X-Forefront-PRVS: 08213D42D3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(199003)(189002)(76176999)(33646002)(50466002)(5001960100002)(5008740100001)(50226001)(4326007)(76506005)(97736004)(189998001)(6116002)(40100003)(5003940100001)(48376002)(5004730100002)(2950100001)(5001770100001)(92566002)(2906002)(3846002)(122386002)(229853001)(19580405001)(81156007)(1096002)(36756003)(42186005)(101416001)(87976001)(586003)(105586002)(77096005)(47776003)(106356001)(66066001)(19580395003)(2201001)(50986999)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB624; 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; DM2PR07MB624; 23:k3+Je4tDwE9g6Lq1/E/4X+ReaH3MNhJ5MIQDvqSGvc?= =?us-ascii?Q?r4hu1/MUKnx3IR+f2uu7HzUu7HB6yh7UtbrqxSicHqXaLpJ+nNK7KKe79qt1?= =?us-ascii?Q?NkFnf7nxYsoqn15WEefco74Qgu1ARkTZyFJv5JDTC9xpZuxFzkl6oSITHn67?= =?us-ascii?Q?rSrhGRYlFGIpEnnDzvh+zW9ceLusAct6CrWqaL6WOXRyII3bPttjQuED5Gb5?= =?us-ascii?Q?nCnDGrxEY+X57Ah8bcEs8YRVvEF3DEfcxhmnXl5updHTz4UjvPj0k6qVX5b+?= =?us-ascii?Q?SrEYnpNDF+0+ceMYPyykyGX+N2Ks9ieC7lxLP1XStrnxy8IOkASuT6MD7H5u?= =?us-ascii?Q?4C7cqVaOARfG7JCl5OBwn762JzjJ0ROGbtoaHDYJxQaOtyY4l0/dASGic+Vu?= =?us-ascii?Q?nLO5v1I+2fkKNhRRAQm1imSij93U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PQKpcqtSpqWAhLPMSy5IYATLJ1rNBT9rtQiQH155yguzfs2ocJKcmDpPJK81l/eg6bMbUwN80pFMCAAFiJwiurzNTpGeTEAZo= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2016 17:24:02.4199 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB624 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160114_092427_249736_01ADAA7F X-CRM114-Status: UNSURE ( 6.37 ) 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, heiko.carstens@de.ibm.com, agraf@suse.de, klimov.linux@gmail.com, Andrew Pinski , ynorov@caviumnetworks.com, jan.dakinevich@gmail.com, Andrew Pinski , schwidefsky@de.ibm.com, Nathan_Lynch@mentor.com, Philipp Tomsich , 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, 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: Andrew Pinski Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Reviewed-by: David Daney --- arch/arm64/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index cd822d8..d6668a8 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__