From: Thomas Bogendoerfer <tbogendoerfer@suse.de>
To: Ralf Baechle <ralf@linux-mips.org>,
Paul Burton <paul.burton@mips.com>,
James Hogan <jhogan@kernel.org>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/5] MIPS: SGI-IP27: move registering of smp ops into IP27 specific code
Date: Tue, 22 Oct 2019 18:13:12 +0200 [thread overview]
Message-ID: <20191022161315.4194-2-tbogendoerfer@suse.de> (raw)
In-Reply-To: <20191022161315.4194-1-tbogendoerfer@suse.de>
Calling register_smp_ops() in plat_mem_setup() is still early enough.
So by doing this we could remove the ugly #ifdef CONFIG_SGI_IP27 in
fw/arc/init.c.
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
arch/mips/fw/arc/init.c | 7 -------
arch/mips/sgi-ip27/ip27-common.h | 1 +
arch/mips/sgi-ip27/ip27-init.c | 2 ++
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/arch/mips/fw/arc/init.c b/arch/mips/fw/arc/init.c
index 7b663455de6b..4ac6466a8872 100644
--- a/arch/mips/fw/arc/init.c
+++ b/arch/mips/fw/arc/init.c
@@ -54,11 +54,4 @@ void __init prom_init(void)
ArcRead(0, &c, 1, &cnt);
ArcEnterInteractiveMode();
#endif
-#ifdef CONFIG_SGI_IP27
- {
- extern const struct plat_smp_ops ip27_smp_ops;
-
- register_smp_ops(&ip27_smp_ops);
- }
-#endif
}
diff --git a/arch/mips/sgi-ip27/ip27-common.h b/arch/mips/sgi-ip27/ip27-common.h
index e9e9f1dc8c20..3ffbcf9bfd41 100644
--- a/arch/mips/sgi-ip27/ip27-common.h
+++ b/arch/mips/sgi-ip27/ip27-common.h
@@ -5,5 +5,6 @@
extern void ip27_reboot_setup(void);
extern void hub_rt_clock_event_init(void);
+extern const struct plat_smp_ops ip27_smp_ops;
#endif /* __IP27_COMMON_H */
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c
index f48e2b3990f6..d160fb219d6d 100644
--- a/arch/mips/sgi-ip27/ip27-init.c
+++ b/arch/mips/sgi-ip27/ip27-init.c
@@ -120,6 +120,8 @@ void __init plat_mem_setup(void)
u64 p, e, n_mode;
nasid_t nid;
+ register_smp_ops(&ip27_smp_ops);
+
ip27_reboot_setup();
/*
--
2.16.4
next prev parent reply other threads:[~2019-10-22 16:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 16:13 [PATCH 1/5] MIPS: SGI-IP27: collect externs in new header file Thomas Bogendoerfer
2019-10-22 16:13 ` Thomas Bogendoerfer [this message]
2019-10-22 16:13 ` [PATCH 3/5] MIPS: arc: remove unused stuff Thomas Bogendoerfer
2019-10-22 16:13 ` [PATCH 4/5] MIPS: arc: use function argument for passing argc/argv to prom_init_cmdline Thomas Bogendoerfer
2019-10-22 16:13 ` [PATCH 5/5] MIPS: SGI-IP27: reduce ARC usage to a minimum Thomas Bogendoerfer
2019-10-24 5:02 ` [PATCH 1/5] MIPS: SGI-IP27: collect externs in new header file Paul Burton
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=20191022161315.4194-2-tbogendoerfer@suse.de \
--to=tbogendoerfer@suse.de \
--cc=jhogan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=paul.burton@mips.com \
--cc=ralf@linux-mips.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).