From patchwork Mon Nov 2 23:30:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7538861 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 74D41BEEA4 for ; Mon, 2 Nov 2015 23:37:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9373D2061A for ; Mon, 2 Nov 2015 23:37:44 +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 A70762057F for ; Mon, 2 Nov 2015 23:37:43 +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 1ZtOdr-00010R-Se; Mon, 02 Nov 2015 23:35:59 +0000 Received: from mail-bl2on0075.outbound.protection.outlook.com ([65.55.169.75] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZtObs-00066d-1l for linux-arm-kernel@lists.infradead.org; Mon, 02 Nov 2015 23:34:23 +0000 Received: from DM2PR07MB621.namprd07.prod.outlook.com (10.141.177.140) by DM2PR07MB333.namprd07.prod.outlook.com (10.141.98.17) with Microsoft SMTP Server (TLS) id 15.1.312.18; Mon, 2 Nov 2015 23:33:13 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (109.252.143.100) by DM2PR07MB621.namprd07.prod.outlook.com (10.141.177.140) with Microsoft SMTP Server (TLS) id 15.1.312.18; Mon, 2 Nov 2015 23:33:12 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 09/17] arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads Date: Tue, 3 Nov 2015 02:30:38 +0300 Message-ID: <1446507046-24604-10-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1446507046-24604-1-git-send-email-ynorov@caviumnetworks.com> References: <1446507046-24604-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [109.252.143.100] X-ClientProxiedBy: VI1PR05CA0034.eurprd05.prod.outlook.com (25.162.33.172) To DM2PR07MB621.namprd07.prod.outlook.com (10.141.177.140) X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB621; 2:tCSRzAF1S9nSDdpN3f1SAfOysassPkfvjTuWLPu01RfxscEZo2/EWWH/91JAMl3+t99I1Og+j90Epwil1MN3qO6u7qKsh35eZbihKqwvCN8zMm+SfBZ/bYX9beV8CwAoN7B3w4cpR+t3rUjx0hG16T2oGTA4XcKXoa2hC8joeaU=; 3:Ux0EjGX8i/3VH+TyqJ1rK9g5bnhcz1rcWjjdQhUJG5YXY7Mg8hloCpFJVTjj8Uqd9fY1b7TVh3jLQv7eZClygoDT6KcvUBbAdgU6oHcpkWyJj7zO7XWVNrOC76pEVKQrpzA1jRP4cS2SPTVJnU42TQ==; 25:Ea60qh0XdHj8+T8iw0XkxJvyiXGY9Sk+LrX+wm7TaBx7htLqMqBCCIzXD8/DGQobZbL93StGFLMSG4gtRTftrVCI+Q87G/+lbfmVbOq3idNSc8mom13q1AQGcwP1Efl1wOB21v0ucpvsoR+2CN7QTclq2dTi3tCV8FyfDZ2Y2Jt48NwWUDUAy+cTpFLU0kVNRC3vOBtwcuqo2Fq48qdjP47JGrwgy47AZ9fCS9PJJjO9exyRi/Ntil9IQj/qOZmkutJShN9fzco4ZOpf8tDJkg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR07MB621; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB621; 20:Y9ooT6kKa6eiaY1BHJSLdExomGqH38F9eF/5rVCzsnjjQuL6ENMAZD5xleP8yliY/tKL60dL3HrjyfpNEjff/CWZ+X2UubBtsjakYI44qTeM2wumDRLkaQ8lwjNkRqbNKQtQviACWrYQUle/VaCvMXc3VmOKcUYMBY+HG6c6ZgLqMb5WFnSSa7MrNV791d+zsvTRgKBXlF/dhm/6BWwL1+z8oDgcsptbEPekm9QgwCQEbE25eQvurQR3Jc/4jIF0YPriqCTA4f0+MRwzv2i9lOQKoBi73105PFrJcly7FdUysBvtCFlKaZhZ0Md6QRWmhAVefpR/qZP6UGwIaOU8fsj2HZuoA7u8Q30CaK/JZ53qLniHWrXfPeT1wKfoEg2f8O1fO2prS47bZiA5Y5fVa7WkBzmX07C8HDer8oLQJ4AFbtxQZgRT3A5/8LLwN25E7OY3AwglQGuT+RPrsQrrKDu0FSbsTMl2BWkv0uGBuUF40+zCcST6ciC+qVih2edXglvyriDTxRiOHw95VK6oKH5jRTB1+xRO23p5gUXDJk/bImMUxMFWyMYE+F7B1CTfGYCHXxT47Dwv3FJYujOztKIhLlRPwbtcvAZnUyTVVCM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(10201501046); SRVR:DM2PR07MB621; BCL:0; PCL:0; RULEID:; SRVR:DM2PR07MB621; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB621; 4:clV44XkLqvF36HzzARlm22JMdxi1pP9rH/Sx2jKBGxc/nRBqFNa3jSiKAybiH2w8vKlf53Iy33KopgoOqELLPr7gzpDiMqMQjbkEJZj1BfjTEHirhE9LrYdEbBI+v0mAGsLYMfPRdhbczHPnRRAkmGPwrZUUU75/17uRVmPeHFthlkIesMILgWa/PQ9BUdzau4gaLmTnMDeF/DVKYWCPxSvtCnnNLCohIQKwWjy5erXPO4icWURQ/UQ4SxuIX6o34g12J4AUrT803Cs/s6tu1KBpz3o7dJi6oLwfHQGiJRAASn5QylU+U/82D58uCXrnqB9IbGikC71ut+AOEyFP7na8NaxywuU4dG8LRuosfXvFsIeI0NyDm8D6YXBL3PXb X-Forefront-PRVS: 0748FF9A04 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(189002)(199003)(50986999)(97736004)(5004730100002)(33646002)(19580395003)(81156007)(5007970100001)(2201001)(5001770100001)(19580405001)(47776003)(229853001)(40100003)(105586002)(106356001)(122386002)(66066001)(50226001)(87976001)(5003940100001)(2950100001)(36756003)(77096005)(50466002)(4001430100002)(5001960100002)(189998001)(48376002)(101416001)(76176999)(42186005)(107886002)(5008740100001)(76506005)(92566002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB621; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; DM2PR07MB621; 23:kkTeJRPcO8Kwq5aC+toOSdtwBrckPrYuhkTaSEG8O4?= =?us-ascii?Q?1vHCmzjsrrGmH+JMwmmNEBIBbIiIPlgmypQORizmHNwpqZ9R+YoxN0y6o2Ot?= =?us-ascii?Q?vHm1yDxSNq8clD/Gc1oZtXZ2fUK6CZqB2V+sm9gJqP5ClxO3JYuHNBKB6N4n?= =?us-ascii?Q?vb3tqX7Nr/7e+cfGEgP6Jj1ilysfFENfV2oUr4M3mkVB2+Gcrll2w5J/N/o3?= =?us-ascii?Q?hBH18VN8k0Micy0Ir0ZkP0NDGjedd6SD7LPHtQHmIC7eSucdUDZJd1ezIPK6?= =?us-ascii?Q?rCjfHo/T9jBF8UStbXKEk2LyH+fm4/pH4QBAwLZmgWjMPwoyWGuLDJj3iekX?= =?us-ascii?Q?qDNNB4jxteC4di9Zaxy6E8t1y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6QPQcNWWo/CTbpN+tNFkDift/e+TxowFI+4qBl/66/ErQ==; 24:iJH/xFM4qStok5LIdn3oPweX/QB9he1JfjrwuSFYWRg1czRGrrAcz9n195DCX6lnwrFLYg2nJegWsa6b2eJ79lBt72Sx5Ou5GuF8tCZnuXI=; 20:F+tvUa5LrKmLty51cl5pOM++mjprcNGjnqjTgutc1rN7csnUnrt/vhUKAE267nJkANAMlf6euhT1aOaXyOsOvA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2015 23:33:12.4060 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB621 X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB333; 2:r3MEvF9taPGc62N5LByzySV/Kkm9YcbiS15veJfaptPPqyVCI1+jN+MCCVt7gQyG61YTFqUcTX97f8cYHr97Nd7gHvi8Rd0o6pZpQnzMAzYkPt1wzI8Zh66NDceg8WELzza5P6gsVx2f1az6gRbtMSPBAlB6JRrZpYV3GP5AFY4=; 23:tiUs5ssPhH7JO0OGbgq/XPqpaIna/tdC6JIaGDMfmBOv3A6cRBb5gBtYLcl6b/GB2ZgkW4Lr7aP5b4BZmo+Y4kFmaCIMuSdMgAg97eHZro5F2okX9vcroZ4y3gcjaEFWc9BjHKaOBLIYJotS05rqZsDyLp/1mu8eOEPQCF1qogTwfXRVbHZOlvQK7EbXJnel X-OriginatorOrg: caviumnetworks.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151102_153357_263345_0D7BD12C X-CRM114-Status: UNSURE ( 9.05 ) 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, Nathan_Lynch@mentor.com, agraf@suse.de, klimov.linux@gmail.com, Andrew Pinski , broonie@kernel.org, jan.dakinevich@gmail.com, Andrew Pinski , ddaney.cavm@gmail.com, bamvor.zhangjian@huawei.com, Yury Norov , philipp.tomsich@theobroma-systems.com, andrey.konovalov@linaro.org, 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, T_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 If we have both ILP32 and AARCH32 compiled in, we need use the non compat start thread for ILP32. Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Signed-off-by: Andrew Pinski Reviewed-by: David Daney --- arch/arm64/include/asm/processor.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index a415dd0..e244cb4 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -28,6 +28,7 @@ #ifdef __KERNEL__ #include +#include #include #include @@ -123,6 +124,15 @@ static inline void start_thread(struct pt_regs *regs, unsigned long pc, static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp) { +#ifdef CONFIG_ARM64_ILP32 + /* ILP32 thread are started the same way as LP64 threads. + Note we cannot use is_ilp32_compat_task here as that + would introduce a header depency issue. */ + if (test_thread_flag(TIF_32BIT_AARCH64)) { + start_thread(regs, pc, sp); + return; + } +#endif start_thread_common(regs, pc); regs->pstate = COMPAT_PSR_MODE_USR; if (pc & 1)