Browse Source

[POWERPC] Make kexec_setup() a regular initcall

There's no reason kexec_setup() needs to be called explicitly from
setup_system(), it can just be a regular initcall.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Michael Ellerman 19 years ago
parent
commit
aa98c50dcb

+ 3 - 1
arch/powerpc/kernel/machine_kexec_64.c

@@ -378,11 +378,13 @@ static void __init export_crashk_values(void)
 	of_node_put(node);
 	of_node_put(node);
 }
 }
 
 
-void __init kexec_setup(void)
+static int __init kexec_setup(void)
 {
 {
 	export_htab_values();
 	export_htab_values();
 	export_crashk_values();
 	export_crashk_values();
+	return 0;
 }
 }
+__initcall(kexec_setup);
 
 
 static int __init early_parse_crashk(char *p)
 static int __init early_parse_crashk(char *p)
 {
 {

+ 0 - 4
arch/powerpc/kernel/setup_64.c

@@ -350,10 +350,6 @@ void __init setup_system(void)
 	 */
 	 */
 	unflatten_device_tree();
 	unflatten_device_tree();
 
 
-#ifdef CONFIG_KEXEC
-	kexec_setup();	/* requires unflattened device tree. */
-#endif
-
 	/*
 	/*
 	 * Fill the ppc64_caches & systemcfg structures with informations
 	 * Fill the ppc64_caches & systemcfg structures with informations
 	 * retrieved from the device-tree. Need to be called before
 	 * retrieved from the device-tree. Need to be called before

+ 0 - 1
include/asm-powerpc/kexec.h

@@ -112,7 +112,6 @@ static inline void crash_setup_regs(struct pt_regs *newregs,
 #ifdef __powerpc64__
 #ifdef __powerpc64__
 extern void kexec_smp_wait(void);	/* get and clear naca physid, wait for
 extern void kexec_smp_wait(void);	/* get and clear naca physid, wait for
 					  master to copy new code to 0 */
 					  master to copy new code to 0 */
-extern void __init kexec_setup(void);
 extern int crashing_cpu;
 extern int crashing_cpu;
 extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *));
 extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *));
 #endif /* __powerpc64 __ */
 #endif /* __powerpc64 __ */