Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755015AbbKQVUQ (ORCPT ); Tue, 17 Nov 2015 16:20:16 -0500 Received: from mail-by2on0063.outbound.protection.outlook.com ([207.46.100.63]:13047 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754996AbbKQVUL (ORCPT ); Tue, 17 Nov 2015 16:20:11 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , , , CC: , , , , , , , , , , , , , , Yury Norov 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 Content-Type: text/plain 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; 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/Y1bzO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IerLEGqfTM+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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1746 Lines: 51 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) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/