ia64: make reserve_elfcorehdr() static
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 2 Sep 2021 21:50:04 +0000 (14:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Sep 2021 16:58:09 +0000 (09:58 -0700)
There never was a reason for reserve_elfcorehdr() to be global.  Make the
function static, and move it before its sole caller.

Link: https://lkml.kernel.org/r/fe236cd73b64abc4abd03dd808cb015c907f4c8c.1629884459.git.geert+renesas@glider.be
Fixes: cee87af2a5f75713 ("[IA64] kexec: Use EFI_LOADER_DATA for ELF core header")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Jay Lan <jlan@sgi.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Simon Horman <horms@verge.net.au>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/ia64/include/asm/meminit.h
arch/ia64/kernel/setup.c

index 6c47a239fc26df127260a472cdeab435e6e8665b..2738f62b5f9894923fccc9ae8f395373823df02a 100644 (file)
@@ -40,7 +40,6 @@ extern unsigned long efi_memmap_init(u64 *s, u64 *e);
 extern int find_max_min_low_pfn (u64, u64, void *);
 
 extern unsigned long vmcore_find_descriptor_size(unsigned long address);
-extern int reserve_elfcorehdr(u64 *start, u64 *end);
 
 /*
  * For rounding an address to the next IA64_GRANULE_SIZE or order
index fbd931f1eb270d98e6f87b51eb9fd6da57b9c0a5..5e6ee8939092a2df1ff526c658eeb638f2baecb4 100644 (file)
@@ -325,6 +325,31 @@ static inline void __init setup_crashkernel(unsigned long total, int *n)
 {}
 #endif
 
+#ifdef CONFIG_CRASH_DUMP
+static int __init reserve_elfcorehdr(u64 *start, u64 *end)
+{
+       u64 length;
+
+       /* We get the address using the kernel command line,
+        * but the size is extracted from the EFI tables.
+        * Both address and size are required for reservation
+        * to work properly.
+        */
+
+       if (!is_vmcore_usable())
+               return -EINVAL;
+
+       if ((length = vmcore_find_descriptor_size(elfcorehdr_addr)) == 0) {
+               vmcore_unusable();
+               return -EINVAL;
+       }
+
+       *start = (unsigned long)__va(elfcorehdr_addr);
+       *end = *start + length;
+       return 0;
+}
+#endif /* CONFIG_CRASH_DUMP */
+
 /**
  * reserve_memory - setup reserved memory areas
  *
@@ -522,32 +547,6 @@ static __init int setup_nomca(char *s)
 }
 early_param("nomca", setup_nomca);
 
-#ifdef CONFIG_CRASH_DUMP
-int __init reserve_elfcorehdr(u64 *start, u64 *end)
-{
-       u64 length;
-
-       /* We get the address using the kernel command line,
-        * but the size is extracted from the EFI tables.
-        * Both address and size are required for reservation
-        * to work properly.
-        */
-
-       if (!is_vmcore_usable())
-               return -EINVAL;
-
-       if ((length = vmcore_find_descriptor_size(elfcorehdr_addr)) == 0) {
-               vmcore_unusable();
-               return -EINVAL;
-       }
-
-       *start = (unsigned long)__va(elfcorehdr_addr);
-       *end = *start + length;
-       return 0;
-}
-
-#endif /* CONFIG_CRASH_DUMP */
-
 void __init
 setup_arch (char **cmdline_p)
 {