mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
22 lines
393 B
C
22 lines
393 B
C
![]() |
// SPDX-License-Identifier: GPL-2.0-only
|
||
|
/*
|
||
|
* Copyright (C) 2020 ARM Ltd.
|
||
|
*/
|
||
|
|
||
|
#include <linux/thread_info.h>
|
||
|
|
||
|
#include <asm/cpufeature.h>
|
||
|
#include <asm/mte.h>
|
||
|
#include <asm/sysreg.h>
|
||
|
|
||
|
void flush_mte_state(void)
|
||
|
{
|
||
|
if (!system_supports_mte())
|
||
|
return;
|
||
|
|
||
|
/* clear any pending asynchronous tag fault */
|
||
|
dsb(ish);
|
||
|
write_sysreg_s(0, SYS_TFSRE0_EL1);
|
||
|
clear_thread_flag(TIF_MTE_ASYNC_FAULT);
|
||
|
}
|