Skip to content

Commit

Permalink
riscv: Fix 32b kernel build with CONFIG_DEBUG_VIRTUAL=y
Browse files Browse the repository at this point in the history
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 <alex@ghiti.fr>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
  • Loading branch information
Alexandre Ghiti authored and Palmer Dabbelt committed May 1, 2021
1 parent 533b4f3 commit 883fcb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/riscv/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ extern unsigned long pfn_base;
#define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
#endif /* CONFIG_MMU */

#ifdef CONFIG_64BIT
extern unsigned long kernel_virt_addr;

#ifdef CONFIG_64BIT
#define linear_mapping_pa_to_va(x) ((void *)((unsigned long)(x) + va_pa_offset))
#ifdef CONFIG_XIP_KERNEL
#define kernel_mapping_pa_to_va(y) ({ \
Expand Down

0 comments on commit 883fcb8

Please sign in to comment.