Skip to content

Commit 883fcb8

Browse files
AlexGhitipalmer-dabbelt
authored andcommitted
riscv: Fix 32b kernel build with CONFIG_DEBUG_VIRTUAL=y
Declare kernel_virt_addr for 32b kernel since it is used in __phys_addr_symbol defined when CONFIG_DEBUG_VIRTUAL is set. Fixes: 2bfc6cd ("riscv: Move kernel mapping outside of linear mapping") Signed-off-by: Alexandre Ghiti <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 533b4f3 commit 883fcb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/include/asm/page.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ extern unsigned long pfn_base;
106106
#define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
107107
#endif /* CONFIG_MMU */
108108

109-
#ifdef CONFIG_64BIT
110109
extern unsigned long kernel_virt_addr;
111110

111+
#ifdef CONFIG_64BIT
112112
#define linear_mapping_pa_to_va(x) ((void *)((unsigned long)(x) + va_pa_offset))
113113
#ifdef CONFIG_XIP_KERNEL
114114
#define kernel_mapping_pa_to_va(y) ({ \

0 commit comments

Comments
 (0)