Linux 5.6.13
[linux/fpc-iii.git] / arch / riscv / include / asm / kasan.h
blobeee6e6588b1213e327adb1d1426789ced63039ef
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) 2019 Andes Technology Corporation */
4 #ifndef __ASM_KASAN_H
5 #define __ASM_KASAN_H
7 #ifndef __ASSEMBLY__
9 #ifdef CONFIG_KASAN
11 #include <asm/pgtable.h>
13 #define KASAN_SHADOW_SCALE_SHIFT 3
15 #define KASAN_SHADOW_SIZE (UL(1) << (38 - KASAN_SHADOW_SCALE_SHIFT))
16 #define KASAN_SHADOW_START 0xffffffc000000000 /* 2^64 - 2^38 */
17 #define KASAN_SHADOW_END (KASAN_SHADOW_START + KASAN_SHADOW_SIZE)
19 #define KASAN_SHADOW_OFFSET (KASAN_SHADOW_END - (1ULL << \
20 (64 - KASAN_SHADOW_SCALE_SHIFT)))
22 void kasan_init(void);
23 asmlinkage void kasan_early_init(void);
25 #endif
26 #endif
27 #endif /* __ASM_KASAN_H */