From patchwork Tue May 24 00:04:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9132553 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C1E6607D3 for ; Tue, 24 May 2016 00:09:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60A102824F for ; Tue, 24 May 2016 00:09:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54D682825E; Tue, 24 May 2016 00:09:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id B54012824F for ; Tue, 24 May 2016 00:09:58 +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 1b4ztc-0008Ar-BV; Tue, 24 May 2016 00:08:28 +0000 Received: from mail-bl2on0090.outbound.protection.outlook.com ([65.55.169.90] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b4zr7-0005Pm-2n for linux-arm-kernel@lists.infradead.org; Tue, 24 May 2016 00:05:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=dkWqiF5nUs/EU0RrxzDT3kyik4sTmGhZPlJd8mAxo20=; b=QT7R4Huh1xDA7jLxwsC19B963LTH4MI4qaIc+skvlCtgn2QZ6lx4kj7gBIutmfBrorzAOC6Z/RgbcULC3h3TuC23r8Vv9foltjp+AirBGUmYCSCTWkN5C1wbMvXOeGJmmmP5PewP8oQBV0/Y5N0zlKIquZ7thzQL0J4sGPO2g1o= Authentication-Results: arndb.de; dkim=none (message not signed) header.d=none;arndb.de; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (50.233.148.158) by CY1PR07MB2230.namprd07.prod.outlook.com (10.164.112.144) with Microsoft SMTP Server (TLS) id 15.1.497.12; Tue, 24 May 2016 00:05:38 +0000 From: Yury Norov To: , , , , , , , Subject: [PATCH 09/23] arm64: ensure the kernel is compiled for LP64 Date: Tue, 24 May 2016 03:04:38 +0300 Message-ID: <1464048292-30136-10-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> References: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [50.233.148.158] X-ClientProxiedBy: DM3PR13CA0026.namprd13.prod.outlook.com (10.164.193.36) To CY1PR07MB2230.namprd07.prod.outlook.com (10.164.112.144) X-MS-Office365-Filtering-Correlation-Id: b2552278-5ca9-465e-275e-08d383672359 X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2230; 2:kpAgs1YM2No9NIS71NJ2bpB4G6schH4CeKUo9kCmG0ltDaWPwqGZTACxL7wShUiuW7GUCsayKjaS1NS27P3unhf9odVnaa61kNUUle67eAExww8t0KXi8rWFwfxLcE6P6nbyz0LbCLMpnSTSnRqCFDyHW9AYM7xpiKKlGKTp695xtrLjbZdNm0BeSzR7nZM7; 3:tO0JN7PX1iFSy17o4aKrwcAcCh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L2vfiPZGsDxnB2EGCfxs0IMGCfYchxmfWT87o1DIQcHGO55OSgOO4swgRh/qTiuO6eEBaZmMpgV/U1FLtTOL2fz2GfUrM9I/lPHBmCln9Ge8VamW/GfudkxjYP657Jxu0Qq5PA1b9ftz/X6CHQ/jjRB/Yo9do9FUW5Bhy+nRTEY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:CY1PR07MB2230; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2230; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2230; 4:3PWgF9aGjzFJVcXQ9uAt/zsAK1hfJu/13ZO59/Mbx40xfikxncKG7G+h5tLOWi/tTKjCht4bwzxCSr3pV/W0zDlur5cC52H0EVsjbI/fKVF3cFurNZ4zhZspWiKoGeHZq9+3lTsCXXzQOTJJ/K3LTkl9ljqODOjxV5blTmLYIW/KD5s1M/zZ1OhJQPOpyMmnPMP2VgmfmEt7K4uDW25XVKoLAGvAl2mkW32NssE7EfN2IMBaoaTIgBUJP81AgGtafTiKLsFoxEcgykHT8ScPpDtWiDQhx3hQ71sOxxOzMqAXjLFVvUiIKd43HdBkIDf1klfzHK6NFJA/sB+Rv7IUe652Cql9dnDTA95TqLqex0UvzZodSoQYiweiIH++FBRI X-Forefront-PRVS: 09525C61DB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(19580395003)(36756003)(5004730100002)(19580405001)(5008740100001)(2906002)(229853001)(2201001)(4001430100002)(586003)(47776003)(33646002)(4326007)(66066001)(6116002)(76506005)(42186005)(92566002)(77096005)(2950100001)(189998001)(107886002)(5001770100001)(81166006)(5003940100001)(76176999)(50986999)(50226002)(50466002)(48376002)(8676002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2230; H:localhost; FPR:; SPF:None; MLV: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50UA0hLrUFXIKqZIBfHjQbvCXbo0MdYfn+8ATNgXwPD+YMP+ZwIgm3I9i1Nrz/INF2d5xLk5ub3yR5VEkO79VpUxuzfCaqvIXCeDMOIo5fBq2Zu+wbw4Mr3PjTA==; 24:J9AkrbHOqnXi2L32PvWEXGI+TeMz23Dhzx64fIsolQmzmK0tOiJFaf2bOgLplOKaZZqVWP9HS8a1tcDlGEY+0nBSCXWEn2OHYvPl0aHbnjE=; 7:eJo6S2bZ7dH/GFfEydiVeN12MMWDgiKTD9DRpFCbZzlJr70DD1czh3n6o1fkHCk5Dh8COkb15jbX1hZYHl5flmc3Ag7j7JlkPZtXyN6lai96NGHu8IzBFe+1nOcZlg24RuzsCUdZXzXBdIdiJwrRSizd5gNE9oBcxhGjpXAa2LDVSk7DIYMh6iM3O9pGSr3K SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2016 00:05:38.5256 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2230 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160523_170554_235240_69024F70 X-CRM114-Status: UNSURE ( 5.87 ) X-CRM114-Notice: Please train this message. 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: kilobyte@angband.pl, pinskia@gmail.com, szabolcs.nagy@arm.com, Nathan_Lynch@mentor.com, heiko.carstens@de.ibm.com, agraf@suse.de, geert@linux-m68k.org, Prasun.Kapoor@caviumnetworks.com, klimov.linux@gmail.com, Andrew Pinski , broonie@kernel.org, ynorov@caviumnetworks.com, Andrew Pinski , schwidefsky@de.ibm.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-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 354d754..29ebf23 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -35,14 +35,19 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads) 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__