diff mbox series

[v5,5/5] powerpc/crash hp: add crash page helper functions

Message ID 20220620070106.93141-6-sourabhjain@linux.ibm.com (mailing list archive)
State Changes Requested
Headers show
Series [v5,1/5] powerpc/kexec: make update_cpus_node non-static | expand

Commit Message

Sourabh Jain June 20, 2022, 7:01 a.m. UTC
Define arch_[un]map_crash_pages functions to avoid build issues due to
undefined arch specific function to access crash memory pages.

A temporary patch to avoid build issues may need some changes in
generic code to avoid this.

The issue is under discussion:
https://lkml.org/lkml/2022/6/20/22

Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
---
 arch/powerpc/kexec/core_64.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Laurent Dufour June 22, 2022, 3:33 p.m. UTC | #1
On 20/06/2022, 09:01:06, Sourabh Jain wrote:
> Define arch_[un]map_crash_pages functions to avoid build issues due to
> undefined arch specific function to access crash memory pages.
> 
> A temporary patch to avoid build issues may need some changes in
> generic code to avoid this.
> 
> The issue is under discussion:
> https://lkml.org/lkml/2022/6/20/22
> 
> Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
> ---
>  arch/powerpc/kexec/core_64.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/powerpc/kexec/core_64.c b/arch/powerpc/kexec/core_64.c
> index 373cb46bcc0e..d833fa96dcfa 100644
> --- a/arch/powerpc/kexec/core_64.c
> +++ b/arch/powerpc/kexec/core_64.c
> @@ -492,6 +492,13 @@ int update_cpus_node(void *fdt)
>  
>  #if defined(CONFIG_HOTPLUG_CPU)
>  
> +void *arch_map_crash_pages(unsigned long paddr, unsigned long size)
> +{
> +	return __va(paddr);
> +}

Why not define this as an inline in the appropriate PowerPC header file?

> +
> +void arch_unmap_crash_pages(void **ptr) { }

same here

> +
>  int crash_hotplug_support(void) { return 1; }
>  
>  /**
diff mbox series

Patch

diff --git a/arch/powerpc/kexec/core_64.c b/arch/powerpc/kexec/core_64.c
index 373cb46bcc0e..d833fa96dcfa 100644
--- a/arch/powerpc/kexec/core_64.c
+++ b/arch/powerpc/kexec/core_64.c
@@ -492,6 +492,13 @@  int update_cpus_node(void *fdt)
 
 #if defined(CONFIG_HOTPLUG_CPU)
 
+void *arch_map_crash_pages(unsigned long paddr, unsigned long size)
+{
+	return __va(paddr);
+}
+
+void arch_unmap_crash_pages(void **ptr) { }
+
 int crash_hotplug_support(void) { return 1; }
 
 /**