From: Matthew McClintock <msm@freescale.com>
To: <linuxppc-dev@lists.ozlabs.org>, <kumar.gala@freescale.com>
Subject: [PATCH 5/5] powerpc/setup_{32, 64}.c: remove unneeded boot_cpuid{, _phys}
Date: Tue, 25 Oct 2011 17:54:06 -0500 [thread overview]
Message-ID: <1319583246-6120-5-git-send-email-msm@freescale.com> (raw)
In-Reply-To: <1319583246-6120-1-git-send-email-msm@freescale.com>
boot_cpuid and init_thread_info.cpu are redundant, just use the
var that stays around longer and add a define to make boot_cpuid
point at the correct value
boot_cpudid_phys is not needed and can completely go away from the
SMP case, we leave it there for the non-SMP case since the paca
struct is not around to store this info
This patch also has the effect of having the logical cpu number
of the boot cpu be updated correctly independently of the ordering
of the cpu nodes in the device tree.
Signed-off-by: Matthew McClintock <msm@freescale.com>
---
Could also just change boot_cpuid every to init_thread_info.cpu instead
of using this define
This is only tested on 32-bit parts, only compiled on 64-bit
arch/powerpc/include/asm/smp.h | 2 +-
arch/powerpc/kernel/setup_32.c | 7 ++++---
arch/powerpc/kernel/setup_64.c | 1 -
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
index adba970..f26c554 100644
--- a/arch/powerpc/include/asm/smp.h
+++ b/arch/powerpc/include/asm/smp.h
@@ -29,7 +29,7 @@
#endif
#include <asm/percpu.h>
-extern int boot_cpuid;
+#define boot_cpuid (init_thread_info.cpu)
extern int spinning_secondaries;
extern void cpu_die(void);
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index c1ce863..f396847 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -46,10 +46,11 @@
extern void bootx_init(unsigned long r4, unsigned long phys);
-int boot_cpuid = -1;
-EXPORT_SYMBOL_GPL(boot_cpuid);
-int boot_cpuid_phys;
+/* we need a place to store phys cpu for non-SMP case */
+#ifndef CONFIG_SMP
+int boot_cpuid_phys = -1;
EXPORT_SYMBOL_GPL(boot_cpuid_phys);
+#endif
int smp_hw_index[NR_CPUS];
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index d4168c9..eacefba 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -73,7 +73,6 @@
#define DBG(fmt...)
#endif
-int boot_cpuid = 0;
int __initdata spinning_secondaries;
u64 ppc64_pft_size;
--
1.7.6.1
next prev parent reply other threads:[~2011-10-25 22:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-25 22:54 [PATCH 1/5] powerpc/85xx: issue 15 EOI after core reset Matthew McClintock
2011-10-25 22:54 ` [PATCH 2/5] powerpc/fsl_booke: Fix comment in head_fsl_booke.S Matthew McClintock
2011-11-03 18:00 ` Kumar Gala
2011-10-25 22:54 ` [PATCH 3/5] powerpc/85xx: Make kexec to interate over online cpus Matthew McClintock
2011-11-03 18:00 ` Kumar Gala
2011-10-25 22:54 ` [PATCH 4/5] powerpc/85xx: use physical cpu from device tree Matthew McClintock
2011-10-25 22:54 ` Matthew McClintock [this message]
2011-11-25 3:41 ` [PATCH 5/5] powerpc/setup_{32, 64}.c: remove unneeded boot_cpuid{, _phys} Benjamin Herrenschmidt
2011-11-29 4:24 ` [PATCH v2] " Matthew McClintock
2011-12-16 3:12 ` Benjamin Herrenschmidt
2011-12-16 3:29 ` McClintock Matthew-B29882
2011-12-16 3:35 ` Benjamin Herrenschmidt
2011-12-16 3:42 ` McClintock Matthew-B29882
2011-12-16 21:29 ` Scott Wood
2011-12-16 22:09 ` Benjamin Herrenschmidt
2011-12-20 18:44 ` McClintock Matthew-B29882
2011-12-20 19:27 ` Scott Wood
2011-10-26 3:16 ` [PATCH 1/5] powerpc/85xx: issue 15 EOI after core reset Kumar Gala
2011-10-26 18:13 ` [PATCH 1/5] powerpc/85xx: issue 15 EOI after core reset for FSL CoreNet devices Matthew McClintock
2011-10-26 18:30 ` Segher Boessenkool
2011-10-26 18:33 ` [PATCH v3 " Matthew McClintock
2011-10-26 18:46 ` [PATCH v4 " Matthew McClintock
2011-11-03 18:00 ` Kumar Gala
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=1319583246-6120-5-git-send-email-msm@freescale.com \
--to=msm@freescale.com \
--cc=kumar.gala@freescale.com \
--cc=linuxppc-dev@lists.ozlabs.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).