From patchwork Mon Jan 9 11:29:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9504485 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 5924D60757 for ; Mon, 9 Jan 2017 11:48:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40CCF28487 for ; Mon, 9 Jan 2017 11:48:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 352F9284AA; Mon, 9 Jan 2017 11:48:36 +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=BAD_ENC_HEADER,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 AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D8DAF28487 for ; Mon, 9 Jan 2017 11:48:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cQYRF-0003mU-98; Mon, 09 Jan 2017 11:48:33 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cQYR1-0003Am-Ow for linux-arm-kernel@bombadil.infradead.org; Mon, 09 Jan 2017 11:48:19 +0000 Received: from mail-sn1nam02on0046.outbound.protection.outlook.com ([104.47.36.46] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cQYBU-00052E-Vf for linux-arm-kernel@lists.infradead.org; Mon, 09 Jan 2017 11:32:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=JLYKsTmO7xAQnTgYatE7+N0XYhTkHhyRSEKY+l1RTfo=; b=ORiUS3/+mJvo+cMqtsL0D/OGUoNekzeIbZFBJl6PN3AVxn/C7Wij0qLm/RNCPbUGJaOFx6fMZoM5/OfBx3MK+DD3cp2ZpGF0CDJjAM6wHJKCysTQOkWzwJTB1QD6HgQ7N5kEwEraEVnD1fjWLBSqY3fbtxJMFDHJWMnDi5NE2VA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (103.78.20.242) by SN1PR07MB2253.namprd07.prod.outlook.com (10.164.47.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7; Mon, 9 Jan 2017 11:31:52 +0000 From: Yury Norov To: , , , "linux-arch @ vger . kernel . org Arnd Bergmann" , Catalin Marinas Subject: [PATCH 06/20] arm64: ensure the kernel is compiled for LP64 Date: Mon, 9 Jan 2017 16:59:43 +0530 Message-ID: <1483961397-8599-7-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1483961397-8599-1-git-send-email-ynorov@caviumnetworks.com> References: <1483961397-8599-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [103.78.20.242] X-ClientProxiedBy: HE1PR0802CA0010.eurprd08.prod.outlook.com (10.172.123.148) To SN1PR07MB2253.namprd07.prod.outlook.com (10.164.47.147) X-MS-Office365-Filtering-Correlation-Id: 59a89fec-1b72-4cd3-f789-08d438831c78 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:SN1PR07MB2253; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2253; 3:5v9X5EV9gPZiEdmtD4t3yhK/n9G8uugpAsE+mdnn8zvtM+liy0ZWI9sdlw1iCGPdTns77IDmF222n67sko1+eHb1jO6LGQdMusbB4NvR/8wEYouRC5CI5PNW2zqfvmnwtc4/XCWuneKoYp+N187yHfL+BQ2WXJfyxXPtDvdfKUaxU1zgXLpi075CSOMUJR0fq1Cf1BakeYPYS40rIfsCVUNDamHlA31gk56A1AoqRr/t1MmCylQeK/jGVUGJmKYoUYf7/3YMsUxaFHxZgP04BA==; 25:FT4iIueBCStSwoKgp9kjSBrtnPlaVNJzMW/NXuuVoAIqpMGBt5e7LY6Vyw6tvLj3WPewqdyahg9bmGvlwOj1koVFdLKNpNSXmSrj/Uneq3vf/9moUEu1KWj1iWwxBEG2ai7B3LxYBc3NC+xytogy779KOaOlbSA1aXxVpj58geUWQ5jQZ67r5pBxXnARc+h87wIlN8HXgPv2tfhfrysdYv2/rqfNnTu1MBcx8P0814IlI+xqUvPq1g/4TzJ4fTfaSqbEH+cGTOIEyCGNFPgFWVy9ROHBDJ+Y7xY61Kbawb6uvhOznM68DgaI0dJjEXMFnE4sn/0yf9DKc0ZeNj26kFOvt13lrz37Ij/WcwEd96eyDWTJG32zBZ5Z1fYCimJsG/YwLUPfeAGG3u/6iGFiOvUkOmJGuyo4IauYuLHNRZoS+o+0rlUQobd7NuxNwuUGda09bR0WenJu8LWEgQVl3Q== X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2253; 31:0FbUo+jMgne7iLuBO1Ur6xXvob6aahs0SpLAsj6GZGLndAI4NC+9d/DuZ+3r7eaAawWOdxJOE5Cztmvc23YZu+I55PWgFbPEhB1rz8Lp0Ph2HaOtOPmOhepRcWJQhh5dkaWGaHrzFcMiOMcuQBtGmMq2MOv6X5ACVSShseE1O8Mc/Z8GWLJj1Bf2pXAMlufieUo1Y8Uu7v4hgjt0ZX1kus1PBnhU0k4AC33QxXrdCTdovZdu7TM+b53vkfI0Rg7m; 20:b9Qf7Y9puyU56sAQN2VdPyKQWycDu1PkZrfGrsmf32TXrTd1cqly6o7qmXYoHR+2BJyssufrhkB0hZglDEVuOxVP/kjFfWW44YPV3Wq+V4QVd1zEsJgvnz8CxcsiUnkXWFhKmXCsg8Whdg6JKgEzSiUN7i9gAaW98eesRCJeHdX1w9oePgafIci5g+IkcTf+/NNLbm5H7EJ6kb9Aa5rZvjoaRTwQtwaIQ4VALKFh0c4rOUDP+S8fOHHQezTBxy6WSR1m9PtbKxkQKKyO8aYBkyDqUUgh1/Fjfv5vZtBW7LHvv+aS/IInqo4y9UseuCyYlJDBTOAPrcy7wpgJ0dX9m6VywKXW8/2GpF4Fok0C4UM1eKQw5RpqX2UiK0oy5X0V7UbD946t5t+GUY/cr85raTGrhg9n5ixOcUxkDHfGn8u4gn6nbarfLdi2Al+K/gHv4aFXRM9HBKM3RyalreMSaR2o9dowriPiMLu6d0BJ7EkrEPEjpJkKmIw2y0ZR/4NBGnbRKyKIjpSN5gClnLWmvq6i8QORoXIdAmXS17yIplOY/el0nD06pcTSdDZfb6gvBBvtxj7FLLwbxWnykuF1zcULkF5qjMo2Ah+ZlPFmCRw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:SN1PR07MB2253; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2253; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2253; 4:sIJMLC0JhLdvoAQrDJK40s6WKsdUe+cKXjaIQbiI0SVPLLlXFLkJRplpMwBHpK7zjoyn+9gl91hK8vF18YV6n5BkryhMYGkePUkq42KCbmqPZ6oT7FfRFgwLL3SaAjgd9yVmlnQbRKONWrqgLrKhhbgfjxyurYTEA3FmlNQDx/me+eksjpjxqxquYyeFmjiMvNTkFOjWkbX0nZdXcd3duXXbt/mQislu/GFRG6zGHQDMHL968OlKwQVlGdDv642YGOUwLYdxyjxpZN7XRLAPYlCfzh3/qZTFJk9W9Ku0b2BnyHMh85YWJ47D0csFTbCGRvcU0BbgNsPvGhSdqu805TpCZvyt6PkTfgIA6rLy0tT9YVwPZp//s0TJAErAqvFctr6r0OZVLWpNMCSdfAKb7v9sY0PqZ115auhQ0bW3Lf/XfBv7CcEgzponyDwhDdnwajtSSgKndBcgsc+C/kMUZ8ZzVIWgNZv/tsBwRZdHFe+hxUrHcC0Hc4lmxrNE3zbDqsJITh0zAi9ns1E5DPoFQ4yyN65ISBbjbuaXUJ7D5sYt6oCO6Ufm49fufpPImOm6 X-Forefront-PRVS: 0182DBBB05 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(199003)(189002)(107886002)(189998001)(42186005)(92566002)(76506005)(7416002)(47776003)(7736002)(4001430100002)(2201001)(305945005)(66066001)(6116002)(3846002)(105586002)(50466002)(50226002)(106356001)(81166006)(81156014)(5003940100001)(2950100002)(6666003)(5660300001)(54906002)(33646002)(48376002)(25786008)(68736007)(8676002)(101416001)(76176999)(2906002)(5001770100001)(6486002)(6496003)(38730400001)(4326007)(97736004)(36756003)(39060400001)(50986999)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2253; 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; SN1PR07MB2253; 23:r6soPlhIVr0dTa8oxWtRwSTX9dzRBnCcDVDNo0lXy?= =?us-ascii?Q?O4D0c+cPRc/k4kHZj4qHlb6L2fqp/eN3Yi9KvpZe9b0aqdNqeuJXjZb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RRK22BEGx2oE7tHoIY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2253; 7:1b+IL2tLko0DrkU7sYrrSByU+ltiBGyS/PDoRINRkPzy31ie2snGZ1avgGvUO46mlXEB7Taae1QwI460FYqSapDMb2kx5DLEOOdso8AWapzB3JC8t4zYDFfz1ZV+bFpVY+tTxBrLJEX1WakLFmCqL2XYPuyuHh2SyPXBl0eU8XpF7B7v+DAI4qhyZq0TKzIzuC1gINVfYdchA6TAnwsByuDzxN7tQ/1DmMzjUm0BIxTbiKMK3P3n3tu388uRkbE8CG698EoWtqHGwbmSRKqhj0kX1vMDFH5d0nQs834hGA38egaOnA3aCbcWCh4ecDvMLmRxcbZxPSDHU1Sy9+ZTfKCX2BxKFdsE/f7x8C/sMRI9RUujCyGBIae4DMn+3RKzRsNO+LyOCTI7kSA3XcLBheqXDuZEXM6MnUAA8kA1pB5gQqbYoSDNrAEQCKRICCqOUfdzuNTxteMlof3OfTqwSA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2017 11:31:52.6746 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2253 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170109_113217_233401_84087354 X-CRM114-Status: UNSURE ( 7.50 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Pinski , Heiko Carstens , Chris Metcalf , Yury Norov , philipp.tomsich@theobroma-systems.com, Joseph Myers , zhouchengming1@huawei.com, Steve Ellcey , Prasun.Kapoor@caviumnetworks.com, Andreas Schwab , agraf@suse.de, szabolcs.nagy@arm.com, geert@linux-m68k.org, Adam Borowski , manuel.montezelo@gmail.com, Chris Metcalf , Andrew Pinski , linyongting@huawei.com, klimov.linux@gmail.com, broonie@kernel.org, Bamvor Zhangjian , Maxim Kuvyrkov , Florian Weimer , Nathan_Lynch@mentor.com, Andrew Pinski , Ramana Radhakrishnan , schwidefsky@de.ibm.com, davem@davemloft.net, 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 b9a4a93..c89734d 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -48,15 +48,20 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads) KBUILD_AFLAGS += $(lseinstr) $(brokengasinst) +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 UTS_MACHINE := aarch64_be else KBUILD_CPPFLAGS += -mlittle-endian AS += -EL LD += -EL +LDFLAGS += -maarch64linux UTS_MACHINE := aarch64 endif