of: MSI: Simplify irqdomain lookup
[linux/fpc-iii.git] / arch / arm64 / include / asm / kasan.h
blob2774fa384c47f27b4e936644cef0e980f7fbcfe7
1 #ifndef __ASM_KASAN_H
2 #define __ASM_KASAN_H
4 #ifndef __ASSEMBLY__
6 #ifdef CONFIG_KASAN
8 #include <linux/linkage.h>
9 #include <asm/memory.h>
12 * KASAN_SHADOW_START: beginning of the kernel virtual addresses.
13 * KASAN_SHADOW_END: KASAN_SHADOW_START + 1/8 of kernel virtual addresses.
15 #define KASAN_SHADOW_START (VA_START)
16 #define KASAN_SHADOW_END (KASAN_SHADOW_START + (1UL << (VA_BITS - 3)))
19 * This value is used to map an address to the corresponding shadow
20 * address by the following formula:
21 * shadow_addr = (address >> 3) + KASAN_SHADOW_OFFSET;
23 * (1 << 61) shadow addresses - [KASAN_SHADOW_OFFSET,KASAN_SHADOW_END]
24 * cover all 64-bits of virtual addresses. So KASAN_SHADOW_OFFSET
25 * should satisfy the following equation:
26 * KASAN_SHADOW_OFFSET = KASAN_SHADOW_END - (1ULL << 61)
28 #define KASAN_SHADOW_OFFSET (KASAN_SHADOW_END - (1ULL << (64 - 3)))
30 void kasan_init(void);
31 asmlinkage void kasan_early_init(void);
33 #else
34 static inline void kasan_init(void) { }
35 #endif
37 #endif
38 #endif