From patchwork Tue Dec 15 21:42:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7857581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C13509F1C2 for ; Tue, 15 Dec 2015 21:51:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 62CA8203E5 for ; Tue, 15 Dec 2015 21:51:24 +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 840962037F for ; Tue, 15 Dec 2015 21:51:23 +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 1a8xTo-0007cc-1h; Tue, 15 Dec 2015 21:49:56 +0000 Received: from mail-bn1bon0084.outbound.protection.outlook.com ([157.56.111.84] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a8xSl-0006Y0-JO for linux-arm-kernel@lists.infradead.org; Tue, 15 Dec 2015 21:48:58 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by DM2PR07MB623.namprd07.prod.outlook.com (10.141.177.148) with Microsoft SMTP Server (TLS) id 15.1.337.19; Tue, 15 Dec 2015 21:48:28 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 10/20] arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads Date: Wed, 16 Dec 2015 00:42:36 +0300 Message-ID: <1450215766-14765-11-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> References: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: AM3PR01CA039.eurprd01.prod.exchangelabs.com (10.141.191.29) To DM2PR07MB623.namprd07.prod.outlook.com (10.141.177.148) X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB623; 2:BxBPteMigfMq52R/JBkuJXZmu/JU1htely6JnCzrPG1ID8kz/bhxiENMbi/t2r/z6EmEwydaEO0lM0htqHYS5JKmNtLxWrYdjRFZbrv9V1DAEv1SZUQeZ7kAkfbx/9yR7/XnDmhVpuDwDXmZS/47Aw==; 3:cjjh0lj5Zo7Q2VArsXc/pp49yrsXlygz1RjM/jYXo2tYdI+MHzy1TNOPWz6jvGynBJCnFxvwCajUisB1u2+AyI/8XsECsPXcK35ciCmokit7ZYXJp6BmAcUmP+CS64J7; 25:7i58Eo8DBWeOL3a+q0Bh4qr40080ghAfeKFtygVCbPBx5Qdq0mgZE+0mYG3d3vCdYWRLkD82tKiOzwsenN636TX2P6lgEtpjm2GenzGXWqxeX9TWEO3fZPEWdoTUbjB6Fg+WdO+WTfZrAvsz1vZk2ARP7RAnCnUwm+zv0eUR8GkKI1I3BmHfxWsrnGEQcLryVfLBNuL6JiFxGO7OXLzvOsHzPGZecyromNtQWxMTA5qqCLoKD32rVprHTRSgTV49Jx2t8C6bGHl3N25tgAqXjg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR07MB623; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB623; 20:J9+sFWqOZ0S70G6XsLIqaiLDSo+kapzdnDUvEcanw60ZrRaNvmlrTkeAPv7DscN1SI2JY9r6n1p/tC3d6gQENiETvIojY9I42dENHDe8tggN5l1U7n8udUyl+wZAyVPUQBVZ4OLwnecooUXuJIEyVWHqQEOwEow7E65QIjAh8/T1fx1BgOtGcK8mga53dXqdVrm3iaEE6L3rPf4VPCsfLE38KOnfr41lcBj3P29a9RRYSfUplxVoVAA0j/xKqNjMfQMIZP61XyqLseEW3OqoYF0eY1AgT5GWQjiW4EKc5pmKuiCS65TpafRBhluvyAxSuhQlnbx7u5coJUdCJpTdgOj0vpD75uSRJTpAvpQKAIBPrtJoc8eOCiTkfoW6EiFE24U++FePQ641qJkwSctPRZ8E1SoaGsdRyW5iNz12GeDUCHPia3/Ah0DekePg3FhvkmJysBZe9JRGqNZ0D/2jQ/MilAMi1ZV5fkbXHj8tLCbVSp1M3DZB1I7DccTJ4kqIRGLApCORpOHYxlWtHLSXA8/O6DeLAafxQkv+a/GnCc2rfQhEJmJml8m75dkYI6bQvtlXuaSv3uG+FvebWjthPq6VK1vgOMtXoqtJUAyQXAc= 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:DM2PR07MB623; BCL:0; PCL:0; RULEID:; SRVR:DM2PR07MB623; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB623; 4:WNg0fuBasVLBMz+lh2hzWClwbSwAyuw7JR0yhZAi4wGTiw5yWoDOw+/8caoyTz78beW3gzy5XWrte+QFSgAJgAzAAyReIsNFAV2KyopcxKvJxqeOD2eZI5yft8fm2RCB6MCaLvfMZLt8MuycYRI4rYHIcN2vE+A22nRAxwcCMAgMJ9Q1PEUJE2IE0oRBXPs9HUzpXITYG2fuF5RNtpGds52qpMYbO2WwiX1RgAWKduQXhSk3HGwXI9DSf7rlNu5yGb6ImBeSyzLcSQEj65ov2hd9uyVRlTEgzgD18Oydzwwbg9KL7nzKAmaVhPfcK+Dap7+dol+FDfohjyTpy8UKk6QWqVeISacJWZmH/VXXxL1ESNAeBOrcUnHhHBlEUD9FiRRf0FHZ0HGNfHHikS0acuOPBMxN6id/0KsPl9pQS3BwfhzSyAn/bJJF9YkU26yh X-Forefront-PRVS: 07915F544A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(189002)(199003)(50986999)(50226001)(97736004)(229853001)(87976001)(2201001)(42186005)(101416001)(1096002)(106356001)(19580395003)(5008740100001)(5003940100001)(40100003)(76176999)(5001960100002)(122386002)(4001430100002)(77096005)(2950100001)(189998001)(19580405001)(33646002)(47776003)(5004730100002)(66066001)(50466002)(76506005)(92566002)(48376002)(107886002)(105586002)(5001770100001)(81156007)(3846002)(6116002)(36756003)(586003)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB623; 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; DM2PR07MB623; 23:0GL5JO+yot+C+jpxFB3YvFoHyi4QylmO4PXhwGPt/L?= =?us-ascii?Q?+TqS3unSZQMqe1dWmQV9oItoAY/+ACPgVZlE/dlw7skUx0wu8rRRlnPhFejn?= =?us-ascii?Q?vV9QQyiuYcHCBDhoVucBu1mLBfRrT7pjpBgP4aIvoQ66un3vdzriUVR3BeR5?= =?us-ascii?Q?KQk48y74tiWR7PDOe+B6vWaw6+EKFoWYrAr6rP4KncsVUajj7+0E9vyIwWcJ?= =?us-ascii?Q?n2Nk1in3ccsA/2OhqrnACrMsmJlWU2nO0qmvndsXR0DCWaTjMKSQ+N6lq+s+?= =?us-ascii?Q?9TE777iT0JIFHE1F0gbkNOoMhfNJlQJ2wXMDmWf2w3wY4t6m2maE8mgNPp5e?= =?us-ascii?Q?UdTve6GFSPwzxg2Hz0Uw8ji/mK2VQnh/IlJEBcABWQluh8KSzzkVImGWRxi4?= =?us-ascii?Q?Yd01E3bW6pyiK2DzmuDRjDGAy1/OinkiBMtaZsDeLDpUutBjqK4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24:oaD4ScUeisI/o8QdnLRlOPzY6RuWBSwrOwUCI8axxOP4pDD+bM4aI7CcvNL2d9sz9ZVZLLsgOfKIqy6IjRd5yQOY+cKGdCKMoIYhQHhm9s8= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2015 21:48:28.9542 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB623 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151215_134852_507477_8AAFB7EA X-CRM114-Status: UNSURE ( 6.23 ) 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, 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. Reviewed-by: David Daney Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Signed-off-by: Andrew Pinski --- arch/arm64/include/asm/processor.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index f1ba514..e365280 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -124,6 +124,13 @@ 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 threads are started the same way as LP64 threads. */ + if (is_ilp32_compat_task()) { + start_thread(regs, pc, sp); + return; + } +#endif start_thread_common(regs, pc); regs->pstate = COMPAT_PSR_MODE_USR; if (pc & 1)