treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / powerpc / include / asm / kasan.h
blob296e51c2f066b09dbebf6cedb1d88ef617cbd29d
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_KASAN_H
3 #define __ASM_KASAN_H
5 #ifdef CONFIG_KASAN
6 #define _GLOBAL_KASAN(fn) _GLOBAL(__##fn)
7 #define _GLOBAL_TOC_KASAN(fn) _GLOBAL_TOC(__##fn)
8 #define EXPORT_SYMBOL_KASAN(fn) EXPORT_SYMBOL(__##fn)
9 #else
10 #define _GLOBAL_KASAN(fn) _GLOBAL(fn)
11 #define _GLOBAL_TOC_KASAN(fn) _GLOBAL_TOC(fn)
12 #define EXPORT_SYMBOL_KASAN(fn)
13 #endif
15 #ifndef __ASSEMBLY__
17 #include <asm/page.h>
19 #define KASAN_SHADOW_SCALE_SHIFT 3
21 #define KASAN_SHADOW_START (KASAN_SHADOW_OFFSET + \
22 (PAGE_OFFSET >> KASAN_SHADOW_SCALE_SHIFT))
24 #define KASAN_SHADOW_OFFSET ASM_CONST(CONFIG_KASAN_SHADOW_OFFSET)
26 #define KASAN_SHADOW_END 0UL
28 #define KASAN_SHADOW_SIZE (KASAN_SHADOW_END - KASAN_SHADOW_START)
30 #ifdef CONFIG_KASAN
31 void kasan_early_init(void);
32 void kasan_mmu_init(void);
33 void kasan_init(void);
34 #else
35 static inline void kasan_init(void) { }
36 static inline void kasan_mmu_init(void) { }
37 #endif
39 #endif /* __ASSEMBLY */
40 #endif