Merge tag 'sched-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / riscv / include / asm / kasan.h
blobb04028c6218c9f39fc086fe5a40f94459d58f0cd
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 #define KASAN_SHADOW_SCALE_SHIFT 3
13 #define KASAN_SHADOW_SIZE (UL(1) << (38 - KASAN_SHADOW_SCALE_SHIFT))
14 #define KASAN_SHADOW_START KERN_VIRT_START /* 2^64 - 2^38 */
15 #define KASAN_SHADOW_END (KASAN_SHADOW_START + KASAN_SHADOW_SIZE)
17 #define KASAN_SHADOW_OFFSET (KASAN_SHADOW_END - (1ULL << \
18 (64 - KASAN_SHADOW_SCALE_SHIFT)))
20 void kasan_init(void);
21 asmlinkage void kasan_early_init(void);
23 #endif
24 #endif
25 #endif /* __ASM_KASAN_H */