* [PATCH] riscv: Fix 32b kernel build with CONFIG_DEBUG_VIRTUAL=y
@ 2021-04-28 10:02 Alexandre Ghiti
2021-04-29 6:25 ` Palmer Dabbelt
0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Ghiti @ 2021-04-28 10:02 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
linux-riscv, linux-kernel
Declare kernel_virt_addr for 32b kernel since it is used in
__phys_addr_symbol defined when CONFIG_DEBUG_VIRTUAL is set.
Fixes: 2bfc6cd81bd17 ("riscv: Move kernel mapping outside of linear
mapping")
Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
---
arch/riscv/include/asm/page.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/include/asm/page.h b/arch/riscv/include/asm/page.h
index e280ba60cb34..6a7761c86ec2 100644
--- a/arch/riscv/include/asm/page.h
+++ b/arch/riscv/include/asm/page.h
@@ -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) ({ \
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] riscv: Fix 32b kernel build with CONFIG_DEBUG_VIRTUAL=y
2021-04-28 10:02 [PATCH] riscv: Fix 32b kernel build with CONFIG_DEBUG_VIRTUAL=y Alexandre Ghiti
@ 2021-04-29 6:25 ` Palmer Dabbelt
0 siblings, 0 replies; 2+ messages in thread
From: Palmer Dabbelt @ 2021-04-29 6:25 UTC (permalink / raw)
To: alex; +Cc: Paul Walmsley, aou, alex, linux-riscv, linux-kernel
On Wed, 28 Apr 2021 03:02:17 PDT (-0700), alex@ghiti.fr wrote:
> Declare kernel_virt_addr for 32b kernel since it is used in
> __phys_addr_symbol defined when CONFIG_DEBUG_VIRTUAL is set.
>
> Fixes: 2bfc6cd81bd17 ("riscv: Move kernel mapping outside of linear
> mapping")
> Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
> ---
> arch/riscv/include/asm/page.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/include/asm/page.h b/arch/riscv/include/asm/page.h
> index e280ba60cb34..6a7761c86ec2 100644
> --- a/arch/riscv/include/asm/page.h
> +++ b/arch/riscv/include/asm/page.h
> @@ -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) ({ \
Thanks, this is on for-next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-29 6:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28 10:02 [PATCH] riscv: Fix 32b kernel build with CONFIG_DEBUG_VIRTUAL=y Alexandre Ghiti
2021-04-29 6:25 ` Palmer Dabbelt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).