diff mbox series

riscv: mm: Remove va_kernel_xip_pa_offset symbol from !XIP case

Message ID 20210603205237.645607ca@xhacker (mailing list archive)
State New
Headers show
Series riscv: mm: Remove va_kernel_xip_pa_offset symbol from !XIP case | expand

Commit Message

Jisheng Zhang June 3, 2021, 12:52 p.m. UTC
The va_kernel_xip_pa_offset is only accessed for XIP case, so make it
only available for XIP.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 arch/riscv/mm/init.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Palmer Dabbelt June 12, 2021, 3:55 a.m. UTC | #1
On Thu, 03 Jun 2021 05:52:37 PDT (-0700), jszhang3@mail.ustc.edu.cn wrote:
> The va_kernel_xip_pa_offset is only accessed for XIP case, so make it
> only available for XIP.
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>  arch/riscv/mm/init.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> index ae32f78207f0..ca2826778989 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -194,10 +194,8 @@ EXPORT_SYMBOL(va_kernel_pa_offset);
>  #endif
>  #ifdef CONFIG_XIP_KERNEL
>  #define va_kernel_pa_offset    (*((unsigned long *)XIP_FIXUP(&va_kernel_pa_offset)))
> -#endif
>  unsigned long va_kernel_xip_pa_offset __ro_after_init;
>  EXPORT_SYMBOL(va_kernel_xip_pa_offset);
> -#ifdef CONFIG_XIP_KERNEL
>  #define va_kernel_xip_pa_offset        (*((unsigned long *)XIP_FIXUP(&va_kernel_xip_pa_offset)))
>  #endif
>  unsigned long pfn_base __ro_after_init;

This is used outside of XIP now.
diff mbox series

Patch

diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index ae32f78207f0..ca2826778989 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -194,10 +194,8 @@  EXPORT_SYMBOL(va_kernel_pa_offset);
 #endif
 #ifdef CONFIG_XIP_KERNEL
 #define va_kernel_pa_offset    (*((unsigned long *)XIP_FIXUP(&va_kernel_pa_offset)))
-#endif
 unsigned long va_kernel_xip_pa_offset __ro_after_init;
 EXPORT_SYMBOL(va_kernel_xip_pa_offset);
-#ifdef CONFIG_XIP_KERNEL
 #define va_kernel_xip_pa_offset        (*((unsigned long *)XIP_FIXUP(&va_kernel_xip_pa_offset)))
 #endif
 unsigned long pfn_base __ro_after_init;