static inline pte_t ptep_get_and_clear(struct mm_struct *mm,
				       unsigned long address, pte_t *ptep)
{
	#ifdef CONFIG_PTP
	pteval_t pteval= iee_set_xchg_relaxed(ptep, (pteval_t)0);
	pte_t ret = __pte(pteval);
	return ret;
	#else
	return __pte(xchg_relaxed(&pte_val(*ptep), 0));
	#endif
}
