From patchwork Mon Jun 19 15:49:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9796539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 505E560381 for ; Mon, 19 Jun 2017 15:53:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CC6026E56 for ; Mon, 19 Jun 2017 15:53:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31532271CB; Mon, 19 Jun 2017 15:53:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BC85B26E56 for ; Mon, 19 Jun 2017 15:53:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=J9R6v2kfXVNGX7Egnxe81wVVRvJP+4RfiShUHOBlqj0=; b=qRfc0Mwhn81+2z 9PypiiLuYdKFyjDvBgU4aQ2QWSKcq4qDlpEL/2w5ncaKPZqX9cvgFJwAHkbeEkwGrax+Iw1MI3kgU XgQfIinTZgo6CoWe+NrbcUFL57AiwPFnUu/gkLv31W9FWr4flyi5M3S8aa6xAisAmw7RAuX152IIh Wk+7VTC+6c0qXiOTOZJus0EP1KcZkjPsJLww1FYszChWHzIbIucoS0fSzezZUCLwvDahtc0QDHgA/ ev5AW9iCSe3uyr3lkyTR3NIzt+CqCdS6lt/Q0DxE880WiT3tRfOAysMVjyR9nTXMVoKgLgVW7YKWQ IcvWJjW03G1hmso1P5Cw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dMyzf-0007f6-VB; Mon, 19 Jun 2017 15:53:35 +0000 Received: from mail-by2nam03on0068.outbound.protection.outlook.com ([104.47.42.68] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dMyyv-0006LU-0s for linux-arm-kernel@lists.infradead.org; Mon, 19 Jun 2017 15:52:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XELQI0+xp2bh9jHZuGu5/+BuLc/kBgK3u2BtG+LkSMM=; b=ds71xsi8DMgpLQLW495iPZO0SuBjzsye3ZcCsySk02umBDNqgBBbQYvjC0y3nyevw/3aYxAExVBx5nNGtfiJQ1AGS+5t46Z3ssSMoW/n1FghwPc7XhfVgkddWepvBPi/VJaJqqL1BK0vq26DDE0GsmzKizu/+NPPf8nFeYrxs3U= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (85.253.137.34) by BLUPR0701MB1858.namprd07.prod.outlook.com (10.162.88.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Mon, 19 Jun 2017 15:52:25 +0000 From: Yury Norov To: Catalin Marinas , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 10/20] arm64: ilp32: add is_ilp32_compat_{task, thread} and TIF_32BIT_AARCH64 Date: Mon, 19 Jun 2017 18:49:53 +0300 Message-Id: <20170619155003.13218-11-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170619155003.13218-1-ynorov@caviumnetworks.com> References: <20170619155003.13218-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [85.253.137.34] X-ClientProxiedBy: VI1P190CA0030.EURP190.PROD.OUTLOOK.COM (10.165.188.171) To BLUPR0701MB1858.namprd07.prod.outlook.com (10.162.88.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a98250db-9d18-4fe1-712d-08d4b72b2e4c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1858; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1858; 3:3lntzoNITZOoZZykNAtYFdqgnftSYHRET6T4fwNAPba9vZhOuTyx2DdJkFHOSCX/M371RJNJQMh7OZaaSC1V+BqqQCHdiZvWQCmCs0wiDm2+/SZy0CIYrLXnoZnKpWxazSVrCdd4ylD8yVF1dKTN4Vz4eeRErXpsTOsJlNvIT9P6q8yCoonCWWyfiFGTjSGpJegfXVb4fp8fD8mltL4erAdOLEMSPOFHcPzzZ3jq5Da8Wot2ZYXQr3YCvfoLz7vyRqTsVm3J6E5QrvgnIuKgkURsjnLLRk2hjkdzALLsPcLpYTvGqw5vwx5BdrETFhiJ94Vs+2JICH1iWSQ8+ylGvA==; 25:XOdUuQii5BEul8ZZm7qSWkLuUFi5CT/JBYPybXZCjx11SnLwpQ0loZpfc0Z7N1kzE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upixo7Ijn746WpkvtsBCmjvgnUAb40qGvR2otbJMBTWXk9MDC1DhDoMH4Q4Svh/qEGak/ZRFReQAqQv2Vkl5K9FD6eQ+Gmv9QnP4BfKR+PABEV/lwflXmaiIBOhqdczeQVm6aOpir+0Fq+U7lruLmWzJiLjpUOd2OauAI67+5ccgLkESJjPzFa63DzzsRGCbQNmGwtdElLQ8plG8P2KUMXc967izxJ4YpUEynRGneXS9l52duDKEnHmGqEESpW6Dmw+WXRTmL/ipJyRlkzBB0nTLi4Sqcg1n9JQzyM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0701MB1858; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0701MB1858; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1858; 4:xq8ynQbnyF19TssxXIMkvPF5qtcxU8y4Smxusd4m?= =?us-ascii?Q?zsikyUqyrFuk/D97fNELZzJco9KY4YEtKY4QUugxyow1ZFRCh7wztyl3cYC3?= =?us-ascii?Q?wvwVzl9z5VUrGArtXYEZcy+nNd7BFDmplsy0lUiQsYhmp8Dnx/Ux824kyW/7?= =?us-ascii?Q?TdkvjpdMT0Kmb1fRFb0TjuHjAW/ZYoXOKW2LvUpiWeYfjQbDWcbpVl/vBECS?= =?us-ascii?Q?gwA61fD7KyqUyXRC5Tn9rS+jdASM4SORUrevAEZhqRmAj6dTPUzmZQwG9t5C?= =?us-ascii?Q?SqQH0IKkqulKsnY3kcXuFGrwPy6pOceLmL3rXJ4+9bwb06yR70SC3y2jg/E4?= =?us-ascii?Q?DzlaecHsxqZDRZBHD8c4A+37KbDghEEB3iNRt6wBXWGP5OAw63BhnwmlYob8?= =?us-ascii?Q?N3SrfLUdyPdZwSgc4A5BqAVA3jXpeK08P/pug3LmRFbE31r5VQICrP/ahp4/?= =?us-ascii?Q?/4OpzBtnvozMbwCTc/59760X1kEy7w9+pw1EpE8wyXkRUMrwJ3UQ6KegEz3d?= =?us-ascii?Q?zj8/x8sYr+sc5O7v0VRR8i01PduZLJ3N3iTp+InDno8aKd4dTiTbdQ+0U15m?= =?us-ascii?Q?vDK+apFzFUMr0NxoWjXGT7NI7TXau6RCa2jjMfXSRjN8k3cIqSglFCJkNb4j?= =?us-ascii?Q?qdPAEJ+CCND7yTXFKj5LYmD6Pbu5BSVIXQwFScU+I2EOfthbCGsWr2f7GeBO?= =?us-ascii?Q?hPQo1ls8RI536DQcUhcp1AYaoj9pwuMEW8W+0whqWRzKe0c+A6Tx994MMJWi?= =?us-ascii?Q?lJBpG4sFhO/EABmTZmYnXzNOe95bkElbft2j9E6OgZQwaEjEoyzJCbk2wT2n?= =?us-ascii?Q?K9gx0yHZsIA4JYNufF1Cgtm7pqAGDaQW82NLVLWV/hv2h7Kss1BXgZ+xswQl?= =?us-ascii?Q?8JmB577EM5YQ2qAE7K916wTINigVUBs1Q1zpodZR8WRN4d7r3erYJWZuPtus?= =?us-ascii?Q?+49C99sByGR+XqHVeHismLCFBAWLA2rIwNMzglYevJGDjToLLVRrCylWciiW?= =?us-ascii?Q?Hs2bqqKOICKJ+3UjWhfr6Sn8+MRis2jh1e+EEGu06+Nj/zTHu2EHwuZzfeA7?= =?us-ascii?Q?s3say/BxKcBT7TH87ZTFVHhQRk08kdcNGVuSSO8JHQKj98d8fW4/Une0SCU/?= =?us-ascii?Q?2APPig8MjWM=3D?= X-Forefront-PRVS: 0343AC1D30 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39840400002)(39410400002)(39400400002)(39850400002)(39450400003)(6486002)(50466002)(48376002)(36756003)(305945005)(2906002)(107886003)(38730400002)(6496005)(42186005)(76506005)(76176999)(189998001)(54906002)(50986999)(53936002)(66066001)(25786009)(6666003)(72206003)(2950100002)(33646002)(478600001)(1076002)(8676002)(7736002)(6116002)(3846002)(5660300001)(7406005)(7416002)(50226002)(5003940100001)(42882006)(47776003)(81166006)(15760500002)(142933001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1858; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1858; 23:Giraf5U44mA1n9J/uVIjVzJniaxapCvCoih6Nx7?= =?us-ascii?Q?5YYicU/Qvj7EYAo4s75hmQqHlNEIb7CtzNc7k8VnyPS6oFMwgH/b80a1AbHx?= =?us-ascii?Q?EusBONvEJiFgKlsLuMJwEoNacTKQiVx5pjyGE2UTgA9K02C/2uNPG6IB2Ttt?= =?us-ascii?Q?qyFQNMNry6TgxglYAMsoqXGQX8kpb3FVdpinMmQuflVYe4VfagzboKOxpEUM?= =?us-ascii?Q?bDm5VF8a7w4hNw79NJkBJh4rbdXPmXA4xh2ucDCnfbJU50oXf+cIDOs/81Qt?= =?us-ascii?Q?5TUKPZe8v0P/3tIJjRJOqzKdnlgHw318VQ1/VVN54vhTBIokf6TxdoFxk7Bj?= =?us-ascii?Q?MKma7L9mGvoY9jxfoE+gHove3098iDvbE5isG/9ZGixYpumjbPy1YOImlOal?= =?us-ascii?Q?FmWcMDOqaumM7HTZVoj+z1FmfqsVwxSdh9XpUKhPdsZhqoGhUxYVjOHG8hnP?= =?us-ascii?Q?Yd4lOEYGRSuzGwVa+kvtJYLSX7Ta8TX4WIy+WH+WWURIzSq0+r6Nk/jkhXs0?= =?us-ascii?Q?urCfktUO0l0kfqejwFtKKYuhAHAFAolkAKQFiLzc+UnwIaa17SODNXvf0Mvh?= =?us-ascii?Q?WnXgKw4K3ThYnTCiibInX59SiB8vrIVNsiQbTQC6c63own5nc+BtERi9ITvB?= =?us-ascii?Q?Zs7QTvYHXF8N7bG2UL7K+4C/fV38bk27jqkJSF2ZHtoZ1Dfjr40zyIqfLfwN?= =?us-ascii?Q?YVNmESjzFuBf6oNkvBqND5ylUZXX4EtURGGQszG9oOl5ZSYR7wogAly0HJZE?= =?us-ascii?Q?lXbdFDdus9hcyNJD98MiEq2IWq4ngZiV52jOZHrivTb4UWu6jEMkP8pa05+G?= =?us-ascii?Q?d1K0RY1aG9SiCs9NQ33USjndKRvSlgOUDg0zWK4WaC6I3+0nsyMLur+lMFNx?= =?us-ascii?Q?037Wa6U9ZzpiMZEki+1Hby9nw/vxkYBhuOsfPaVQZAPRPgwxNK3jeWVG4Ljf?= =?us-ascii?Q?5USqLt5gRTXmGHEBq/UYDIgIpwx13Fq0+PRV/3+RlMSmGZWBSrOw3vNjV+Vs?= =?us-ascii?Q?jlnycZpEREgNv6HXIiPyV82ohoZR08p3UDP1WZosw+4R6/RWnvreLGi+OvWP?= =?us-ascii?Q?+6+pmQwwFbqz2IlrniJp0rCGH9jRzvzZS6ZXU5vyRK8jCObu4hJeDXcLdxy0?= =?us-ascii?Q?J68HUfiiHLLT2eiqMyAoUX6xWgZSE8KPiLTkcSyJc4yjYU7OOhgVCFA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1858; 6:vq+pumivrBvoXZY3KwAWYwdcwWNI4mey5o4ti8VL?= =?us-ascii?Q?q55OdPGodZIJj6xvIrmekiKHfDkzEDgpJj3sA2okLyuXs7MSGWQr2qccNGEg?= =?us-ascii?Q?wbFepIV8HiVl3GVZXBnKcUVxFxSKYYxHc719VHW8gPK85PF0rXMsu7aeYoUa?= =?us-ascii?Q?RSgAfkPxezRMejya8pzTMlJTbpi2M880W9Rgw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oP4fF8J2tep3bIDdYO0dttwcxm84jBpqZdD5MbU11GwL4uTK8TFXHHS66jKRiWNdsSPcyrv4F+HAUUsWNJcqhKiMk/dxCsSUA9k6+l036glUhzZDChRIS6BmZiS95GbnnwG6+SgGXStBqagakjfuNFURqWD/gc8TUAW5V8YvJtlkPk/e8l0xnDxey1eIzGTJCd5BanbH2qep61jHZCLS4D4I6qSQP7Xr574CoXtrHbB/JHMrbvQSL/1dHJZ9FjQbsjdqWvLLVlJWzS7CjKPe/zMAfX0h6ole6zEUtS8J0BUQbf8RLonNC/6t4Ee09D5zxUFCIzXg4eIOrt4ryGJ9Ae8tS348MkOmMvFA4XaiSQorZmk7uIBEtd3gsJCop++os1EtFC/iWeBz1JXqUidjE= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 15:52:25.0883 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1858 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170619_085249_260445_917A3C93 X-CRM114-Status: UNSURE ( 8.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: szabolcs.nagy@arm.com, Heiko Carstens , Chris Metcalf , Yury Norov , philipp.tomsich@theobroma-systems.com, Joseph Myers , zhouchengming1@huawei.com, Steve Ellcey , Prasun.Kapoor@caviumnetworks.com, Andreas Schwab , Alexander Graf , Andrew Pinski , Geert Uytterhoeven , Adam Borowski , manuel.montezelo@gmail.com, James Hogan , Chris Metcalf , Andrew Pinski , linyongting@huawei.com, Alexey Klimov , Mark Brown , Bamvor Zhangjian , Maxim Kuvyrkov , Florian Weimer , Nathan_Lynch@mentor.com, James Morse , Ramana Radhakrishnan , schwidefsky@de.ibm.com, davem@davemloft.net, 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-Virus-Scanned: ClamAV using ClamSMTP ILP32 tasks are needed to be distinguished from lp64 and aarch32. This patch adds helper functions is_ilp32_compat_{task,thread} and thread flag TIF_32BIT_AARCH64 to address it. This is a preparation for following patches in ilp32 patchset. For consistency, SET_PERSONALITY is changed here accordingly. Signed-off-by: Andrew Pinski Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Reviewed-by: David Daney --- arch/arm64/include/asm/elf.h | 2 ++ arch/arm64/include/asm/is_compat.h | 30 ++++++++++++++++++++++++++++-- arch/arm64/include/asm/thread_info.h | 2 ++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index 6a37b6facc69..8f7bafa60d01 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/include/asm/elf.h @@ -145,6 +145,7 @@ typedef struct user_fpsimd_state elf_fpregset_t; #define SET_PERSONALITY(ex) \ ({ \ clear_bit(TIF_32BIT, ¤t->mm->context.flags); \ + clear_thread_flag(TIF_32BIT_AARCH64); \ clear_thread_flag(TIF_32BIT); \ current->personality &= ~READ_IMPLIES_EXEC; \ }) @@ -196,6 +197,7 @@ typedef compat_elf_greg_t compat_elf_gregset_t[COMPAT_ELF_NGREG]; #define COMPAT_SET_PERSONALITY(ex) \ ({ \ set_bit(TIF_32BIT, ¤t->mm->context.flags); \ + clear_thread_flag(TIF_32BIT_AARCH64); \ set_thread_flag(TIF_32BIT); \ }) #define COMPAT_ARCH_DLINFO diff --git a/arch/arm64/include/asm/is_compat.h b/arch/arm64/include/asm/is_compat.h index 8dba5caaf5d1..7726bebc4115 100644 --- a/arch/arm64/include/asm/is_compat.h +++ b/arch/arm64/include/asm/is_compat.h @@ -45,18 +45,44 @@ static inline int is_a32_compat_thread(struct thread_info *thread) #endif /* CONFIG_AARCH32_EL0 */ +#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 /* CONFIG_ARM64_ILP32 */ + #ifdef CONFIG_COMPAT static inline int is_compat_task(void) { - return is_a32_compat_task(); + return is_a32_compat_task() || is_ilp32_compat_task(); } #endif /* CONFIG_COMPAT */ static inline int is_compat_thread(struct thread_info *thread) { - return is_a32_compat_thread(thread); + return is_a32_compat_thread(thread) || is_ilp32_compat_thread(thread); } diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h index a7ffea24d94d..abb60b5fc9f4 100644 --- a/arch/arm64/include/asm/thread_info.h +++ b/arch/arm64/include/asm/thread_info.h @@ -96,6 +96,7 @@ struct thread_info { #define TIF_RESTORE_SIGMASK 20 #define TIF_SINGLESTEP 21 #define TIF_32BIT 22 /* AARCH32 process */ +#define TIF_32BIT_AARCH64 23 /* 32 bit process on AArch64(ILP32) */ #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) @@ -108,6 +109,7 @@ struct thread_info { #define _TIF_SECCOMP (1 << TIF_SECCOMP) #define _TIF_UPROBE (1 << TIF_UPROBE) #define _TIF_32BIT (1 << TIF_32BIT) +#define _TIF_32BIT_AARCH64 (1 << TIF_32BIT_AARCH64) #define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \ _TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE | \