Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754222AbbKBXdm (ORCPT ); Mon, 2 Nov 2015 18:33:42 -0500 Received: from mail-bl2on0062.outbound.protection.outlook.com ([65.55.169.62]:55104 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751787AbbKBXdg (ORCPT ); Mon, 2 Nov 2015 18:33:36 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , , , CC: , , , , , , , , , , , , Andrew Pinski , Yury Norov , Andrew Pinski 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 Content-Type: text/plain 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; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR07MB621;23:kkTeJRPcO8Kwq5aC+toOSdtwBrckPrYuhkTaSEG8O4?= =?us-ascii?Q?1vHCmzjsrrGmH+JMwmmNEBIBbIiIPlgmypQORizmHNwpqZ9R+YoxN0y6o2Ot?= =?us-ascii?Q?vHm1yDxSNq8clD/Gc1oZtXZ2fUK6CZqB2V+sm9gJqP5Cl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Q?/n2zsgBJIqpAtyoBK6tgzlPiRIRnmWZE2XKE1mGCPhau5bUaZkaRwAxCGrwC?= =?us-ascii?Q?EhT5QROhPkARQ52ywOQbgL6PpHDBWL9FnhTN8dKsgGW6FnLg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR07MB621;5:UoxXGK0Vp8Xe622xfrvjkELowBz+JGzVsDEbx7RMblCIKSb06q3qe21OvRX/B8i2aI3u/BvTc/eDwqJT0Yb2iLaU0Bg8hk5xjt/SUEsEi6QPQcNWWo/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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1742 Lines: 50 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) -- 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/