MIPS: SGI-IP27: collect externs in new header file
authorThomas Bogendoerfer <tbogendoerfer@suse.de>
Tue, 22 Oct 2019 16:13:11 +0000 (18:13 +0200)
committerPaul Burton <paulburton@kernel.org>
Thu, 24 Oct 2019 04:10:29 +0000 (21:10 -0700)
IP27 code has a few externs distributed over .c files. Collect them
together into one commcon header file.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
arch/mips/sgi-ip27/ip27-common.h [new file with mode: 0644]
arch/mips/sgi-ip27/ip27-init.c
arch/mips/sgi-ip27/ip27-reset.c
arch/mips/sgi-ip27/ip27-smp.c
arch/mips/sgi-ip27/ip27-timer.c

diff --git a/arch/mips/sgi-ip27/ip27-common.h b/arch/mips/sgi-ip27/ip27-common.h
new file mode 100644 (file)
index 0000000..e9e9f1d
--- /dev/null
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __IP27_COMMON_H
+#define __IP27_COMMON_H
+
+extern void ip27_reboot_setup(void);
+extern void hub_rt_clock_event_init(void);
+
+#endif /* __IP27_COMMON_H */
index 1dad799..f48e2b3 100644 (file)
@@ -36,6 +36,8 @@
 #include <asm/sn/sn0/ip27.h>
 #include <asm/sn/mapped_kernel.h>
 
+#include "ip27-common.h"
+
 #define CPU_NONE               (cpuid_t)-1
 
 static DECLARE_BITMAP(hub_init_mask, MAX_COMPACT_NODES);
@@ -113,8 +115,6 @@ get_nasid(void)
                         >> NSRI_NODEID_SHFT);
 }
 
-extern void ip27_reboot_setup(void);
-
 void __init plat_mem_setup(void)
 {
        u64 p, e, n_mode;
index c90228d..74d0782 100644 (file)
@@ -26,6 +26,8 @@
 #include <asm/sn/gda.h>
 #include <asm/sn/sn0/hub.h>
 
+#include "ip27-common.h"
+
 void machine_restart(char *command) __noreturn;
 void machine_halt(void) __noreturn;
 void machine_power_off(void) __noreturn;
index 386702a..c38df7c 100644 (file)
@@ -27,6 +27,8 @@
 #include <asm/sn/sn0/hubio.h>
 #include <asm/sn/sn0/ip27.h>
 
+#include "ip27-common.h"
+
 /*
  * Takes as first input the PROM assigned cpu id, and the kernel
  * assigned cpu id as the second.
@@ -147,8 +149,6 @@ static void ip27_init_cpu(void)
 
 static void ip27_smp_finish(void)
 {
-       extern void hub_rt_clock_event_init(void);
-
        hub_rt_clock_event_init();
        local_irq_enable();
 }
index a317ea8..17302bb 100644 (file)
@@ -38,6 +38,8 @@
 #include <asm/sn/sn0/hubio.h>
 #include <asm/pci/bridge.h>
 
+#include "ip27-common.h"
+
 static int rt_next_event(unsigned long delta, struct clock_event_device *evt)
 {
        unsigned int cpu = smp_processor_id();