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: 59305 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp221728lbb; Thu, 7 Jan 2016 15:37:35 -0800 (PST) X-Received: by 10.66.192.42 with SMTP id hd10mr152760366pac.111.1452209855136; Thu, 07 Jan 2016 15:37:35 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 88si347340pfh.69.2016.01.07.15.37.34; Thu, 07 Jan 2016 15:37:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753718AbcAGXhd (ORCPT + 29 others); Thu, 7 Jan 2016 18:37:33 -0500 Received: from mail-bn1bon0075.outbound.protection.outlook.com ([157.56.111.75]:23229 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752682AbcAGXhb (ORCPT ); Thu, 7 Jan 2016 18:37:31 -0500 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: , , , CC: , , , , , , , , , , , , , , Andrew Pinski , Andrew Pinski 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-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//1iKKKdQM2OWPV+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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 2.5.0 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__