From: Kyle Moffett <Kyle.D.Moffett@boeing.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Kyle Moffett <Kyle.D.Moffett@boeing.com>
Subject: [PATCH 01/10] powerpc/85xx: Move mpc85xx_smp_init() decl to a new "smp.h"
Date: Tue, 29 Nov 2011 13:58:28 -0500 [thread overview]
Message-ID: <1322593117-29938-2-git-send-email-Kyle.D.Moffett@boeing.com> (raw)
In-Reply-To: <1322593117-29938-1-git-send-email-Kyle.D.Moffett@boeing.com>
This removes a bunch of "extern" declarations and CONFIG_SMP ifdefs.
Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/platforms/85xx/corenet_ds.c | 7 +------
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 6 +-----
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 7 +------
arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 7 +------
arch/powerpc/platforms/85xx/p1022_ds.c | 7 +------
arch/powerpc/platforms/85xx/p1023_rds.c | 7 +------
arch/powerpc/platforms/85xx/smp.c | 1 +
arch/powerpc/platforms/85xx/smp.h | 15 +++++++++++++++
arch/powerpc/platforms/85xx/xes_mpc85xx.c | 6 +-----
9 files changed, 23 insertions(+), 40 deletions(-)
create mode 100644 arch/powerpc/platforms/85xx/smp.h
diff --git a/arch/powerpc/platforms/85xx/corenet_ds.c b/arch/powerpc/platforms/85xx/corenet_ds.c
index 802ad11..435074d 100644
--- a/arch/powerpc/platforms/85xx/corenet_ds.c
+++ b/arch/powerpc/platforms/85xx/corenet_ds.c
@@ -31,6 +31,7 @@
#include <linux/of_platform.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
+#include "smp.h"
void __init corenet_ds_pic_init(void)
{
@@ -65,10 +66,6 @@ void __init corenet_ds_pic_init(void)
/*
* Setup the architecture
*/
-#ifdef CONFIG_SMP
-void __init mpc85xx_smp_init(void);
-#endif
-
void __init corenet_ds_setup_arch(void)
{
#ifdef CONFIG_PCI
@@ -77,9 +74,7 @@ void __init corenet_ds_setup_arch(void)
#endif
dma_addr_t max = 0xffffffff;
-#ifdef CONFIG_SMP
mpc85xx_smp_init();
-#endif
#ifdef CONFIG_PCI
for_each_node_by_type(np, "pci") {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index 1b9a8cf..52d2a3e 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -35,6 +35,7 @@
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
+#include "smp.h"
#undef DEBUG
@@ -152,9 +153,6 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
/*
* Setup the architecture
*/
-#ifdef CONFIG_SMP
-extern void __init mpc85xx_smp_init(void);
-#endif
static void __init mpc85xx_ds_setup_arch(void)
{
#ifdef CONFIG_PCI
@@ -187,9 +185,7 @@ static void __init mpc85xx_ds_setup_arch(void)
ppc_md.pci_exclude_device = mpc85xx_exclude_device;
#endif
-#ifdef CONFIG_SMP
mpc85xx_smp_init();
-#endif
#ifdef CONFIG_SWIOTLB
if (memblock_end_of_DRAM() > max) {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index a23a3ff..e4d470e 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -51,6 +51,7 @@
#include <asm/qe_ic.h>
#include <asm/mpic.h>
#include <asm/swiotlb.h>
+#include "smp.h"
#undef DEBUG
#ifdef DEBUG
@@ -153,10 +154,6 @@ static int mpc8568_mds_phy_fixups(struct phy_device *phydev)
* Setup the architecture
*
*/
-#ifdef CONFIG_SMP
-extern void __init mpc85xx_smp_init(void);
-#endif
-
#ifdef CONFIG_QUICC_ENGINE
static struct of_device_id mpc85xx_qe_ids[] __initdata = {
{ .type = "qe", },
@@ -381,9 +378,7 @@ static void __init mpc85xx_mds_setup_arch(void)
}
#endif
-#ifdef CONFIG_SMP
mpc85xx_smp_init();
-#endif
mpc85xx_mds_qe_init();
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
index f5ff911..cd49898 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
@@ -29,6 +29,7 @@
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
+#include "smp.h"
#undef DEBUG
@@ -82,9 +83,6 @@ void __init mpc85xx_rdb_pic_init(void)
/*
* Setup the architecture
*/
-#ifdef CONFIG_SMP
-extern void __init mpc85xx_smp_init(void);
-#endif
static void __init mpc85xx_rdb_setup_arch(void)
{
#ifdef CONFIG_PCI
@@ -102,10 +100,7 @@ static void __init mpc85xx_rdb_setup_arch(void)
#endif
-#ifdef CONFIG_SMP
mpc85xx_smp_init();
-#endif
-
printk(KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n");
}
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c
index fda1571..089b959 100644
--- a/arch/powerpc/platforms/85xx/p1022_ds.c
+++ b/arch/powerpc/platforms/85xx/p1022_ds.c
@@ -26,6 +26,7 @@
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include <asm/fsl_guts.h>
+#include "smp.h"
#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
@@ -266,10 +267,6 @@ void __init p1022_ds_pic_init(void)
mpic_init(mpic);
}
-#ifdef CONFIG_SMP
-void __init mpc85xx_smp_init(void);
-#endif
-
/*
* Setup the architecture
*/
@@ -309,9 +306,7 @@ static void __init p1022_ds_setup_arch(void)
diu_ops.valid_monitor_port = p1022ds_valid_monitor_port;
#endif
-#ifdef CONFIG_SMP
mpc85xx_smp_init();
-#endif
#ifdef CONFIG_SWIOTLB
if (memblock_end_of_DRAM() > max) {
diff --git a/arch/powerpc/platforms/85xx/p1023_rds.c b/arch/powerpc/platforms/85xx/p1023_rds.c
index 835e0b3..da546ea 100644
--- a/arch/powerpc/platforms/85xx/p1023_rds.c
+++ b/arch/powerpc/platforms/85xx/p1023_rds.c
@@ -30,6 +30,7 @@
#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
+#include "smp.h"
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
@@ -39,10 +40,6 @@
* Setup the architecture
*
*/
-#ifdef CONFIG_SMP
-void __init mpc85xx_smp_init(void);
-#endif
-
static void __init mpc85xx_rds_setup_arch(void)
{
struct device_node *np;
@@ -87,9 +84,7 @@ static void __init mpc85xx_rds_setup_arch(void)
fsl_add_bridge(np, 0);
#endif
-#ifdef CONFIG_SMP
mpc85xx_smp_init();
-#endif
}
static struct of_device_id p1023_ids[] = {
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index 2df4785..ff42490 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -27,6 +27,7 @@
#include <sysdev/fsl_soc.h>
#include <sysdev/mpic.h>
+#include "smp.h"
extern void __early_start(void);
diff --git a/arch/powerpc/platforms/85xx/smp.h b/arch/powerpc/platforms/85xx/smp.h
new file mode 100644
index 0000000..e2b4493
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/smp.h
@@ -0,0 +1,15 @@
+#ifndef POWERPC_85XX_SMP_H_
+#define POWERPC_85XX_SMP_H_ 1
+
+#include <linux/init.h>
+
+#ifdef CONFIG_SMP
+void __init mpc85xx_smp_init(void);
+#else
+static inline void mpc85xx_smp_init(void)
+{
+ /* Nothing to do */
+}
+#endif
+
+#endif /* not POWERPC_85XX_SMP_H_ */
diff --git a/arch/powerpc/platforms/85xx/xes_mpc85xx.c b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
index a9dc5e7..ce3f660 100644
--- a/arch/powerpc/platforms/85xx/xes_mpc85xx.c
+++ b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
@@ -32,6 +32,7 @@
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
+#include "smp.h"
/* A few bit definitions needed for fixups on some boards */
#define MPC85xx_L2CTL_L2E 0x80000000 /* L2 enable */
@@ -136,9 +137,6 @@ static int primary_phb_addr;
/*
* Setup the architecture
*/
-#ifdef CONFIG_SMP
-extern void __init mpc85xx_smp_init(void);
-#endif
static void __init xes_mpc85xx_setup_arch(void)
{
#ifdef CONFIG_PCI
@@ -172,9 +170,7 @@ static void __init xes_mpc85xx_setup_arch(void)
}
#endif
-#ifdef CONFIG_SMP
mpc85xx_smp_init();
-#endif
}
static struct of_device_id __initdata xes_mpc85xx_ids[] = {
--
1.7.2.5
next prev parent reply other threads:[~2011-11-29 18:59 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 18:58 [PATCH 00/10] powerpc/mpic: General cleanup patch series Kyle Moffett
2011-11-29 18:58 ` Kyle Moffett [this message]
2011-11-29 18:58 ` [PATCH 02/10] powerpc: Consolidate mpic_alloc() OF address translation Kyle Moffett
2011-12-01 1:04 ` Paul Mackerras
2011-11-29 18:58 ` [PATCH 03/10] powerpc/mpic: Assume a device-node was passed in mpic_alloc() Kyle Moffett
2011-11-29 18:58 ` [PATCH 04/10] powerpc/mpic: Save computed phys_addr for board-specific code Kyle Moffett
2011-11-29 18:58 ` [PATCH 05/10] powerpc/mpic: Search for open-pic device-tree node if NULL Kyle Moffett
2011-11-29 18:58 ` [PATCH 06/10] powerpc/mpic: Invert the meaning of MPIC_PRIMARY Kyle Moffett
2011-11-29 18:58 ` [PATCH 07/10] powerpc/mpic: Don't open-code dcr_resource_start Kyle Moffett
2011-12-01 6:58 ` Michael Ellerman
2011-11-29 18:58 ` [PATCH 08/10] powerpc/mpic: Put "pic-no-reset" test back into the MPIC code Kyle Moffett
2011-11-29 18:58 ` [PATCH 09/10] powerpc/mpic: Cache the device-tree node in "struct mpic" Kyle Moffett
2011-11-29 18:58 ` [PATCH 10/10] powerpc/mpic: Add in-core support for cascaded MPICs Kyle Moffett
2011-12-01 6:59 ` Michael Ellerman
2011-12-02 1:48 ` Moffett, Kyle D
2011-12-02 3:04 ` Benjamin Herrenschmidt
2011-12-02 16:27 ` [PATCH v3 00/10] powerpc/mpic: General cleanup patch series Kyle Moffett
2011-12-02 16:27 ` [PATCH v3 01/10] powerpc/85xx: Move mpc85xx_smp_init() decl to a new "smp.h" Kyle Moffett
2011-12-02 16:27 ` [PATCH v3 02/10] powerpc: Consolidate mpic_alloc() OF address translation Kyle Moffett
2011-12-03 15:53 ` Kumar Gala
2011-12-05 18:41 ` Moffett, Kyle D
2011-12-05 19:22 ` Kumar Gala
2011-12-02 16:28 ` [PATCH v3 03/10] powerpc/mpic: Assume a device-node was passed in mpic_alloc() Kyle Moffett
2011-12-02 16:28 ` [PATCH v3 04/10] powerpc/mpic: Save computed phys_addr for board-specific code Kyle Moffett
2011-12-02 16:28 ` [PATCH v3 05/10] powerpc/mpic: Search for open-pic device-tree node if NULL Kyle Moffett
2011-12-03 16:05 ` Kumar Gala
2011-12-02 16:28 ` [PATCH v3 06/10] powerpc/mpic: Invert the meaning of MPIC_PRIMARY Kyle Moffett
2011-12-02 16:28 ` [PATCH v3 07/10] powerpc/mpic: Don't open-code dcr_resource_start Kyle Moffett
2011-12-02 16:28 ` [PATCH v3 08/10] powerpc/mpic: Put "pic-no-reset" test back into the MPIC code Kyle Moffett
2011-12-02 16:28 ` [PATCH v3 09/10] powerpc/mpic: Cache the device-tree node in "struct mpic" Kyle Moffett
2011-12-02 16:28 ` [PATCH v3 10/10] powerpc/mpic: Add in-core support for cascaded MPICs Kyle Moffett
2011-11-30 4:40 ` [PATCH 00/10] powerpc/mpic: General cleanup patch series Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1322593117-29938-2-git-send-email-Kyle.D.Moffett@boeing.com \
--to=kyle.d.moffett@boeing.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).