Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754059AbbKBXc7 (ORCPT ); Mon, 2 Nov 2015 18:32:59 -0500 Received: from mail-bl2on0064.outbound.protection.outlook.com ([65.55.169.64]:33611 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751659AbbKBXc5 (ORCPT ); Mon, 2 Nov 2015 18:32:57 -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 07/17] arm64:ilp32: add is_ilp32_compat_{task,thread} and TIF_32BIT_AARCH64 Date: Tue, 3 Nov 2015 02:30:36 +0300 Message-ID: <1446507046-24604-8-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: VI1PR05CA0030.eurprd05.prod.outlook.com (25.162.33.168) To CO2PR07MB620.namprd07.prod.outlook.com (10.141.228.156) X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB620;2:fd8670GmsQx8ujMoqwDDZyDVl1Gtzwy2mIaLtzZU9o+hqspCPDbGgJsKUOcLuNKP7ZYOYNOl21HOwFBs+Z4GPI4miv911hLFeYAx+4ECa0VVVS5ZsBsU9e/v95vHzoneEtDnUh2L36caCuKBUjU/e0MLUN8vR9OtYx8gCGyM3y4=;3:IdE10NMDYkHZgonnINgT2JDnTXuBQXkqeVUOv8J1DQhyPMMa7mEdKOyhe0OyzjDV29sR47XnXcxW+rca2kjIEudxvgwpL2UlpB5JQd66pKg7u6t6PgnazEM7N8jere0EYZJKM8B9HOo2XydenQowcQ==;25:kslVCNYR2YpNLbyeSyjQ8ZFWWdXTjx0uZQd63EDFYqvzpCXGb/067uiPXCz+TBI4ebjyXjWCFT+mklhCZH2HOf7I2Dr1+IDu1DyU2VO0I/GZ20VWWWaMOojET7Bx+vBKFiD9FT6dPPrSxHxluZl6hSX43wX5gjaqlUYPRdkLilrcN3DSGoyE6DtEMpZkhvvWsot2RuAXvCM0W8Xz9Bmitt+F1OhsNsGMQQ2pUucJxaRD/hLHgp4xGUXqi37/qC17IzGgaRr3JJOKjyROsuXiVg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB620; X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB620;20:A+j1oV9Zfne8dtnohO7G8NFStvMCJKAoPDzVbNzi5q+giwdXS5Jw0UXtcQM1l3u/Z8xh6mC8lxAXZHZ0tqY1vAFLDANEBEemcVxlflUp+Eu/8I8b4fzW8YzrApW6gOZ0FOFdSntxldv8LKtUGH56i5+Sb6Jx9tseDQCI9oq+QhHu3bsiEK4RZMfeo6BEG4FWhrDNm59AU0BzeDsv/clrv7k4MRk9/Afouwtv6IBLBOxPfwqmfii0fBF90zPJriHZbZz/cMrCC13V+KjeBJFrKKTyQpblkW6VRBsk8+/ApchAVm8bMcuz4jZiNf2HrgNgw2sWPp2U4NSe5ttrnTPtZVBfFWWn3j8/6/mHfAwZ/k53D+SoXXZ7peAGEdAYmVbJmLSDhIYQPa4PKND3GmyVPd+w7iuiDv1tQHeybLSLRD8CboiNVrMtkDfPA4L4WGJsEU05LhrDWQSZiL6iJbGPSHkbPZSp1gWozQ/uUU5pkIVcwFPwbacfGdo0OtUtdf8NyQTFrWmB3v9BoSa0pipoHCgvUviW/0WDajpVrKFfLvUtllSSqKLhAXGUNFyODraci+4wkJRhkDcdiwnOvU9dBK/KuGJnFK2t7AAPqEhh5Ac= 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)(10201501046)(3002001);SRVR:CO2PR07MB620;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB620; X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB620;4:VpFzjRHgSeLTFbn4c508Ql6BTYiIzwqmHjZtaTJY5muRHtS6ab/j04B9RDwry68OfjKlDSrp6+3Vnqh8sz0HiFG3likDZAKdI0hQV2hRtSlInia4GTQnYreXPWFgRsevOp1v1ilE2FtlQiTCNW/ss7fVOZtkwBviRQBEA6SpezMP8UEjt41RHEt/xvwMlq54kj7AFSNproEGWoOqghJdgC452s8OZjchhrIRoH4x43ureovQHJX47zIMeTxxj25QvE45lGI2VgiNTZJ4Tv4v7f7gi4apYYJray2coLLM3ACLgHftoUAPpCYt5VRL34yvEq+7fKufT1GULnfdewxN2UYcN6han60Eh6iOqQwyel3S1JvQknjZaA7No7zh829L X-Forefront-PRVS: 0748FF9A04 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(6009001)(189002)(199003)(66066001)(48376002)(50986999)(47776003)(5007970100001)(5004730100002)(5003940100001)(4001430100002)(40100003)(42186005)(101416001)(50466002)(76506005)(19580395003)(19580405001)(33646002)(76176999)(50226001)(105586002)(107886002)(106356001)(189998001)(5008740100001)(229853001)(122386002)(5001960100002)(2201001)(2950100001)(36756003)(87976001)(5001770100001)(81156007)(77096005)(92566002)(97736004)(142933001)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR07MB620;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CO2PR07MB620;23:2B//QgXhGMirfesZEV6xnQPuVU1zoIPTIA+79BbLun?= =?us-ascii?Q?tOklllAQLFYknVhA9gIcyPmxcE7O+Ip9WnDwy6z/WredjjH7wyVnTfZ1Jvu9?= =?us-ascii?Q?PqMQnqJWX2KC80Vkt50PTriXtlCBVNKtod2AxQ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?IoYE19SHXz6hr4eA03XLsSPyzuUuyZ5MhE8KLxkAuDpHgvWlUoPBWf77yoq/?= =?us-ascii?Q?uxFXehyqnYyUoE/g+r/bEhdn9mxn5fpDCUBxe+mjs7TyKguSsXtuLuTfOUU0?= =?us-ascii?Q?PMmCLEO1c=3D?= X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB620;5:2mdzLaG6gKIEW8oXD4PE7rjTGfYdNq5ORp1veLDOo6qaC80ZWHoqv4yQ7C8dPDQL0ArzKT+q+2R7YsxJHMJyNgHKGf9SYmkhEoyWDYRp9HcNXXUrrll6/B2d4R6jhx7G5HFNbz0YlvMFEa9TFNpLMA==;24:d7AFsOIA2ePIVCrpLVMVE9hZPxmrfSZzhA9B9FX+qADnAa7MZXGOyr7oV526oUpnCgtZl56gykbkmOKHO9xxrgHzNfg3rc3PeHk5GB+78Ag=;20:H8+sopntWvTRPfXp0YzQ3g7ZS9jdv1w57W9/DSTeWrEPmTGf5gp+gT8f/KkjmFtQ6D1ilwG9ysFOr0H+bAJ0bQ== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2015 23:32:48.6967 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB620 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2582 Lines: 90 From: Andrew Pinski 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/compat.h | 38 +++++++++++++++++++++++++++++++++++- arch/arm64/include/asm/thread_info.h | 1 + 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index 9700e5e..95d2d72 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h @@ -324,9 +324,35 @@ static inline int is_a32_compat_thread(struct thread_info *thread) } #endif +#ifdef CONFIG_ARM64_ILP32 + +static inline int is_ilp32_compat_task(void) +{ + return test_thread_flag(TIF_32BIT_AARCH64); +} + +static inline int is_ilp32_compat_thread(struct thread_info *thread) +{ + return test_ti_thread_flag(thread, TIF_32BIT_AARCH64); +} + +#else + +static inline int is_ilp32_compat_task(void) +{ + return 0; +} + +static inline int is_ilp32_compat_thread(struct thread_info *thread) +{ + return 0; +} + +#endif + static inline int is_compat_task(void) { - return is_a32_compat_task(); + return is_a32_compat_task() || is_ilp32_compat_task(); } #else /* !CONFIG_COMPAT */ @@ -341,6 +367,16 @@ static inline int is_a32_compat_task(void) return 0; } +static inline int is_ilp32_compat_thread(struct thread_info *thread) +{ + return 0; +} + +static inline int is_ilp32_compat_task(void) +{ + return 0; +} + #endif /* CONFIG_COMPAT */ #endif /* __KERNEL__ */ #endif /* __ASM_COMPAT_H */ diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h index 7d03565..e72de74 100644 --- a/arch/arm64/include/asm/thread_info.h +++ b/arch/arm64/include/asm/thread_info.h @@ -112,6 +112,7 @@ static inline struct thread_info *current_thread_info(void) #define TIF_SINGLESTEP 21 #define TIF_32BIT 22 /* AARCH32 process */ #define TIF_SWITCH_MM 23 /* deferred switch_mm */ +#define TIF_32BIT_AARCH64 24 /* 32 bit process on AArch64(ILP32) */ #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) -- 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/