riscv: Use macro definition instead of magic number
authorZong Li <zong.li@sifive.com>
Thu, 12 Mar 2020 02:58:36 +0000 (10:58 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 26 Mar 2020 16:29:53 +0000 (09:29 -0700)
The KERN_VIRT_START defines the start virtual address of kernel space.
Use this macro instead of magic number.

Signed-off-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/include/asm/kasan.h

index eee6e65..b47045c 100644 (file)
@@ -13,7 +13,7 @@
 #define KASAN_SHADOW_SCALE_SHIFT       3
 
 #define KASAN_SHADOW_SIZE      (UL(1) << (38 - KASAN_SHADOW_SCALE_SHIFT))
-#define KASAN_SHADOW_START     0xffffffc000000000 /* 2^64 - 2^38 */
+#define KASAN_SHADOW_START     KERN_VIRT_START /* 2^64 - 2^38 */
 #define KASAN_SHADOW_END       (KASAN_SHADOW_START + KASAN_SHADOW_SIZE)
 
 #define KASAN_SHADOW_OFFSET    (KASAN_SHADOW_END - (1ULL << \