From patchwork Thu Jan 7 23:34:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7980471 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 C4FC6BEEE5 for ; Thu, 7 Jan 2016 23:39:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EDC112013D for ; Thu, 7 Jan 2016 23:39:16 +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 1CC5320149 for ; Thu, 7 Jan 2016 23:39:16 +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 1aHK7u-00013n-9W; Thu, 07 Jan 2016 23:37:54 +0000 Received: from mail-bn1bon0065.outbound.protection.outlook.com ([157.56.111.65] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aHK7r-0000wD-9D for linux-arm-kernel@lists.infradead.org; Thu, 07 Jan 2016 23:37:52 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by CO2PR07MB618.namprd07.prod.outlook.com (10.141.228.149) with Microsoft SMTP Server (TLS) id 15.1.361.13; Thu, 7 Jan 2016 23:37:27 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 02/21] arm64: ensure the kernel is compiled for LP64 Date: Fri, 8 Jan 2016 02:34:20 +0300 Message-ID: <1452209679-19445-3-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452209679-19445-1-git-send-email-ynorov@caviumnetworks.com> References: <1452209679-19445-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: DB5PR06CA0025.eurprd06.prod.outlook.com (25.162.165.35) To CO2PR07MB618.namprd07.prod.outlook.com (10.141.228.149) X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB618; 2:ADr8/I1kgIFG+WgJtS5WLdqgxaVmOxeV5k2lPFm9chNeSOSDH1T3FHjlt2y2lBSr2c6JP+VvPJja9Gj8X/mLlZxxWCX0lHrFj+T/G/qx7VwZlVf0FCfonxWTMMzSWe4XA3IGn9TVbeFYl5OgrE5jbg==; 3:Buq2rA9bQ1dMyEUzd9xfrkaVjtjROW1Nb+lrDd3mLEqrrKviCOs8qhzaCRdWFz4Cqpnlmm5eeBbGu4t89f6+CRra7WLr1EzVVEAmiEIurJaSHapboIJcik2GyO3FlKgI; 25:K3hJEtZDUuC1ONW7dFSmTyEH+SBVwrsksZX3Zfzjujb6fctvjfKoypbL0PPUFNv8SmhgjpsHKHw2kcNqByFWfXXtx7heWQnXx1QZjiGd518/uQad9wUULvfEB/cCxdXgDxetPENi1n+o2GfAU9sHSLYJg+6FKkX/17CgxiBIfFnGLV3Jg5bbDUZPBgdXKnUYirroZAdYCQg+P8NZOmA9jAk9YoYcYF9+5QiyUnaOwGDjkQ4IFCWLS5vNWeAbpCKg X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB618; X-MS-Office365-Filtering-Correlation-Id: ab74223a-cf8a-4c39-19c2-08d317bb80dd X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB618; 20:VpalFrPVBd2Qymvxrbt7SSEg4cpDrh5cMP2c6EtcMQddUP0h+lrg7AuecqK0X4c2HUKDypxf2cCUYJSn/JXAuC3XTI287DnyGHD2l9WkHr18VNnBRs6eohrs+P0WW1VaBl6kJ8O9oB+WPJ9yDHny4/NzAo4PHF+dR9VIcxg2Q8IWfX3HAd0pIwo5y28U+m4iq96o9AoH0O8lD69klirQ9mImOAXa0OjcVj3do9KMjkOzzpPicxMY36ue8NC3YbhQyuO2LFQjhMOec2ZVUz3h+iSvs2Uox3Nrvfyq3wsbh3/C0tXIqNwLX/87/e/HYgGSL3vSSLCroO9P0S06aCWaqeJXky9LjgqktIexac3wggibqPwbmnOoIgljQmwKHmCKdjXqSp5NGEc7C00y/EsPAkXssVxTIUD0ZU9n9ihsMvh4PJ/g5yMFkWFh4BWzY+djf7uSbs/zVKIDGlZpGR/WJCWL9CUDz1Gj2fGpNqbcxrRgO3R5QDtk/HF7Q+VP22ZP6J2AId1Hea9Xq7OTL4SPRSKKaUjDE7nnRm27FMR5LPpoXCrkO1/7V0bZskvsgs7TpuTm83k1Sd7ru6zdfjf99prJNN285D+yW0nVcXgjiFg= 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)(10201501046)(3002001); SRVR:CO2PR07MB618; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB618; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB618; 4:hxpjINbqoynF7a4jep1wfUKnHhVevDyIAvLlkCOJfUvar50Ul9HVsQVJRK/aMZ+E/R5kFoJ2ki7rLPTxPlPhepM1ya98dcxv3QCh04e2oD3fSJBZ2I89AF6GfTRG0+wkv6Rn73nsC4j7PwVNdKEdaB1WiZrmRcboE1YZzQIcsnAWMR3usPxDGhMY1ccYNn4dZigPq+sjtdfuU9wRIolYCstvqWD3jpERJY1+Q4T4r6GJ6vB2f47y2yZ+dDFBbymVGd8Oqy9nMW7Kr0sF2KuEtbhWRbY/svQZ6A7knDlVw+LfafKvJM88fHZ6U6U/NPbeoFG6eSs7JiR6emJjeEgE9/05r99J52FwYJIp0HiyoLP+1up02tgujagpC7/bsJ8FPSTlnRyWYzATthrmCsMKc5bpX9nXN1hpQP7X8Cn/9rQkv3wkNDNwkFn/QLx8Y0Aw X-Forefront-PRVS: 0814A2C7A3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(199003)(189002)(19580405001)(33646002)(3846002)(42186005)(87976001)(101416001)(50986999)(5004730100002)(106356001)(36756003)(122386002)(586003)(2906002)(5001770100001)(76506005)(92566002)(19580395003)(4326007)(77096005)(4001430100002)(76176999)(48376002)(107886002)(81156007)(5001960100002)(2950100001)(189998001)(40100003)(66066001)(105586002)(6116002)(5008740100001)(47776003)(50466002)(97736004)(229853001)(1096002)(50226001)(2201001)(5003940100001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB618; 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; CO2PR07MB618; 23:cqEp+nBysVMEIPxgTPCG1IC5Z670jF5+VeR3JZgaKR?= =?us-ascii?Q?Q6+a8VwSHNN0OHlj7boAVGzseJaDkmkLEobRoyK/eUlzsf/xI28CessDNDTj?= =?us-ascii?Q?hNXiQ05r6MVBfrY3XeabcwjyImOjdLs/K0t9/ERAMVLVSDpNVnbkPsm1rzym?= =?us-ascii?Q?qXt/36FGxkuAws2QlrJrTgqdC/UKkwHruhIm7EiLWDdBinx1Us+30crKtaAW?= =?us-ascii?Q?7PKiVRDTjBgeFAQl+hAFI/DkjYy1icg/II5oZsTT+l1fbKK4lDH/EmVx7w03?= =?us-ascii?Q?jnkMjy6YXtg0lLGEAnE5Anf3J3qeYPQ+7kGzZnlmUMJWmcdFFLP1eHJO78zv?= =?us-ascii?Q?arkCDO3HVr249qDgjgTvrSrOI45eGQcDRyHVkw+g2A0qFjQZgvNX9PSrsH4h?= =?us-ascii?Q?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QM2OWPV+cmSgjSXh0ZxsqXtlFPoiv2BTAt2IeE4kQUxLTx3pK3fPBaSA/0MrKYyN33es2o4xYGcGdkVQAdRxwsA==; 24:SxrZH1Z67l+6qiC9rCGgdAyB7ppifglg7RHZYStcbPtmSUUYIBP3geoKn4x0jsj5K9A4fOPjuvHuL+GN8GEWg20gd1oPdyl6E5U7a+eVycU= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2016 23:37:27.2981 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB618 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160107_153751_561838_7324BA28 X-CRM114-Status: UNSURE ( 5.84 ) 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, 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__