From patchwork Tue Nov 17 21:16:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7642461 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 B822BBF90C for ; Tue, 17 Nov 2015 21:30:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF86F20416 for ; Tue, 17 Nov 2015 21:30:40 +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 056C320429 for ; Tue, 17 Nov 2015 21:30:40 +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 1Zynnp-0000jc-Sn; Tue, 17 Nov 2015 21:28:37 +0000 Received: from mail-by2on0059.outbound.protection.outlook.com ([207.46.100.59] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zyng0-00080q-7E for linux-arm-kernel@lists.infradead.org; Tue, 17 Nov 2015 21:20:36 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.120) by DM2PR07MB624.namprd07.prod.outlook.com (10.141.177.154) with Microsoft SMTP Server (TLS) id 15.1.325.17; Tue, 17 Nov 2015 21:20:09 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 10/19] arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads Date: Wed, 18 Nov 2015 00:16:50 +0300 Message-ID: <1447795019-30176-11-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> References: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.120] X-ClientProxiedBy: AM3PR01CA025.eurprd01.prod.exchangelabs.com (10.141.191.15) To DM2PR07MB624.namprd07.prod.outlook.com (10.141.177.154) X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB624; 2:QLrGFp5PTJYyEaJuDuJ71k4fnNJ8QoP2k4snoBzEJnlIWYtpISMiAbZBcEbJlz+tMM80Wgdd29vzhMJoBqwrSb7uoB9AcdDocc561HQUePZrjhHw8ezeYXGj8UHPzFgJTj6N5mTiXXgd/0/wI+gZ4FPjpc/zGsgu7Vm2JPqS19M=; 3:f24SBnhuXQWYdoWBQOC2o/DD33mreMdutpefk8lVMRFzDMsa0upiWcCfeUfVt9UQk4ssUP5HaJ+jyfKJLionN/biB0LbNoIrhb1dKoA0hxz4SCJ6pJmiAbQMJKi8a8iF7IGIF8iR6pZpYDyWsL5Kmg==; 25:mae8IOcH0tdM4sPdrin5PnMbAxEpqykJfrcUMv26G7uNa8BW/D31j1Y6y9YN3sA7B4mUR4AYJyGu9Zm+olb9iQzrVZiQhLgeyK4R+X2ZDUgbhwa15qffMEgcfN1mHwiP0MNtCqaHHEtQKACzm0ZLU1eJTnhoRZZO5yV+iMKvy8QtWH7yGSTAaMD8mCQtPG7OPO88QkI+DE5mtrEI8u9HpAvyV+X60a1UhZ7d35pQFfLq2Vsk4q3pE5/jzQ3z6BbbfN5bcsIN0Qiqo3iIvvzp6Q== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR07MB624; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB624; 20:JuKpgpfuz14pGjBjfx9noy9YAwn1U7cJe5imxw3V54iOx3MLvuW1C32JRQKJOG/H7EyjuDVvGPeYg5PuDwH5jkft2Uthlato7LX03LCfQ8CD2IaC3FKXCukRSZ5dTKR9/hmLmLp8LKLy0y7VNvyyY9LJW/JPZw9bErWo4lug3RP+6RXOKeyg3BnJ0r8AcNE+D81D9Y/IxNnShnYighWDc0j3wn76YG0tyh+uqcWuisBpGF/chlyRE46E2FgXQlj2x5Cd/1+Ln+oaUJQSWNHd9n23nDHPptfhrifsBIKDPPRIgm9l7OSS9HzxMXPL6L6D/FmBD6c8N0RMbbt7g+nPo0mDSrUtjEmN6SHyjwNUlWEmm/QX2f5QQltKWgFsgW+3bIn49s64q/XH5TJnwFIPpyI89DxvgifUE7Spx19ZsqD1DVPr9bR+BQCdIJI8KzukluDfK0tMurAHQ5UvQlgX0RZ90a1S6D+CWG2tF0NmyU564zsBZr/J8hS8PsyFRZn83u/DPizwhDZVzvoRErWDqq3HyOdox67/oOpi0KF8xXm0+KsYF5aCqgM5fmLVhAUQMKpzwBHlmPqx8hOOw6enuC79iN1vpKeH30WPU8JUI9w= 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:DM2PR07MB624; BCL:0; PCL:0; RULEID:; SRVR:DM2PR07MB624; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB624; 4:n6FERYKOcGpLxyjuHlMA4ICyMU0WF3InH1SJek3QVpxt5zRVqtLWjitL/eJcZ/SyGlmhghOFD1HapoEHPon/vDVKFWAbX0pZL3YC85vKDlcOjosPcrd/wQzb2s5ex8IIUrKnBhq9yjz8tqeawTq1zD0uEKn8aKdOpSBW/zx4hZhedQZYr20SW8iyvddxHPTTZEM/cQAjI9ygEl5nKin2gVcZ2Cb+HJ87HbyYwR3wGE+U9rGK50AEFslM7YULVDPhho3sQTOfWmRx2axpny5to46ViElpT4lt4GOSe6OAO35lPtEgykuXczmljmx0MOFMyg2OmM3j7hXSq9hqZbYK6ECgmt62LXEyyfmAvwuXXBierQ4/gDXA+FkXZA+zrPLC X-Forefront-PRVS: 07630F72AD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(189002)(199003)(2201001)(50466002)(229853001)(5007970100001)(5001770100001)(33646002)(106356001)(92566002)(36756003)(19580405001)(19580395003)(586003)(77096005)(4001430100002)(105586002)(47776003)(50226001)(2950100001)(76176999)(101416001)(5008740100001)(50986999)(5003940100001)(48376002)(66066001)(107886002)(189998001)(5004730100002)(42186005)(81156007)(87976001)(5001960100002)(40100003)(97736004)(122386002)(76506005)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB624; 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; DM2PR07MB624; 23:/Ipvr/w/if7IHmqPnaZ1HXiQzbXqeiKftaXuM87psk?= =?us-ascii?Q?Le/45Ek+fbDv7saFJzOcp/XDHz3IGxHWAeDEdj48brCnkEdbeVVpB+48gqYK?= =?us-ascii?Q?VB8kwMX8m6E5VbheQ6JLESazWCUqQgXeaZ2aCMXHii/Y1bzOcNRSHsskfDmO?= =?us-ascii?Q?9xwR/vG0lZCGyyccK6uLOdWZZwileuKmRr9/yu/bXhxXBzLHeqJGn0rd0Pqg?= =?us-ascii?Q?CC1stm3aS/zzamQ9n5vM4W1OH0jPHYeMjMSOPXa1thLn9YZL4BjcUSjSt1Kz?= =?us-ascii?Q?aylDqBzpJpCV9LsYqrKCLgq/Txn6au8QWOqPMgVWOhrzEiXMcvLj/aai14Q0?= =?us-ascii?Q?YSNq2+gbVXg3PuW5aAXqTBQh35nYC5DwEU55ze7sGozZtGQtpMWL0obHKFy0?= =?us-ascii?Q?t/70B1JfqZY81s96LaIUENZgsh8aJ2l5WY50SE1tXv6Br27p4WVr4RzOUksq?= =?us-ascii?Q?jeOTKdFYCDk2P+EmYLHc0VxiV8Cg/IYdFP+4/nSseM6KfLhphL6Sd3hNWOYe?= =?us-ascii?Q?bhRL4RZLRt2SiVfWdNOORi1bx/mTeYaYt30uoum7LKwPNcuwINu1E0lQBt16?= =?us-ascii?Q?5kw2+fdolLZ1bV5haK9eGkMgsfykbqY8u8vnJH6GT4qCOC60SuHkG8wn4o/K?= =?us-ascii?Q?LMpgZkeRNfylqpZbYcVxXVgmnRq9+gGKGsol/1AEeTHE5h4JpI/N0hzQKygL?= =?us-ascii?Q?zoBqXwipYSR4R9tBydEHAZnsVA4hBNQMroLltzg8m3HseOAj6ClMaQ8xxte2?= =?us-ascii?Q?YoxROKNO7mDOagQgGAnKrpajCD68Lu50/HrebZj1pDI4xF3doGKXkhjppFhf?= =?us-ascii?Q?Ul2mT8h7Sfs5o04iuTJPsDMvgCmQGLllUARZH0xod6Jd2doT6Ka6pnekikOo?= =?us-ascii?Q?aeJm36HNrCAsz/brc1aHq8oIXb80ydTsIz4exlwyow4ERffKpzIVvHV0X6X7?= =?us-ascii?Q?LSJWI5MmSXQzllwHtd691fR6ic9agt3azuYyQ4qFsjxcAbDLmsZrH1F8rpMU?= =?us-ascii?Q?+xt9thPQBiWk9pmOFp1ti5rDAlF4IdZIerLEGqfTM+c+c8cwjIaAIS2o2+RM?= =?us-ascii?Q?qZfL5qO1lCKXpahnp295OBIR6pRTun8HCZxVpeednrPFBQYuCo0KFwIdCBFl?= =?us-ascii?Q?UXdzehoJE=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB624; 5:JRcy4XCDk+2w+5jOqJeF8Jyav6uaSJS9nibtrNZx1WkvXI01bHLwLHwCMsFw8oSQkELxLnM4muCBFzMYwODycphTg0PW49jSpJ32PjOE/s69M1zR5S7MXJsWYcJ7gr2DbC6yCBu2wGnjd0386FmbnQ==; 24:gCbwY7tL+BJgNfIyJsh7bwrpZRuxcWIwOKuQABm5ukp/D8nnnYnBCfJlzqGJcWfRm3VctbdGDeZTmhHdPXP4LMaH97wF0ptrhXtvNQIk2Bc=; 20:RpJZ4TLunC/VBU2IMtz1mplfFPdNETJN0VXKvEH5NGz1atE72OXJvDRJ/oZtYbpz0Xmd2xoaLQ3Gyc5RY5DN2g== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2015 21:20:09.3316 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB624 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151117_132032_955365_5926A2A3 X-CRM114-Status: UNSURE ( 8.60 ) 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, Nathan_Lynch@mentor.com, agraf@suse.de, klimov.linux@gmail.com, broonie@kernel.org, jan.dakinevich@gmail.com, Yury Norov , ddaney.cavm@gmail.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, andrey.konovalov@linaro.org, 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.8 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 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 | 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)