xref: /openbmc/linux/arch/arm64/include/asm/mte-def.h (revision aa0dc6a7)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) 2020 ARM Ltd.
4  */
5 #ifndef __ASM_MTE_DEF_H
6 #define __ASM_MTE_DEF_H
7 
8 #define MTE_GRANULE_SIZE	UL(16)
9 #define MTE_GRANULE_MASK	(~(MTE_GRANULE_SIZE - 1))
10 #define MTE_GRANULES_PER_PAGE	(PAGE_SIZE / MTE_GRANULE_SIZE)
11 #define MTE_TAG_SHIFT		56
12 #define MTE_TAG_SIZE		4
13 #define MTE_TAG_MASK		GENMASK((MTE_TAG_SHIFT + (MTE_TAG_SIZE - 1)), MTE_TAG_SHIFT)
14 
15 #define __MTE_PREAMBLE		ARM64_ASM_PREAMBLE ".arch_extension memtag\n"
16 
17 #endif /* __ASM_MTE_DEF_H  */
18