From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH v2 1/5] ARM: kernel: smp_setup_processor_id() updates Date: Fri, 9 Nov 2012 14:44:46 +0000 Message-ID: <20121109144446.GC17405@mudshark.cambridge.arm.com> References: <1352471654-20207-1-git-send-email-lorenzo.pieralisi@arm.com> <1352471654-20207-2-git-send-email-lorenzo.pieralisi@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1352471654-20207-2-git-send-email-lorenzo.pieralisi@arm.com> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Lorenzo Pieralisi Cc: Mark Rutland , Nicolas Pitre , Dave Martin , Kukjin Kim , Russell King , Pawel Moll , Stephen Warren , Tony Lindgren , Catalin Marinas , "devicetree-discuss@lists.ozlabs.org" , Magnus Damm , Amit Kucheria , Grant Likely , "rob.herring@calxeda.com" , Benjamin Herrenschmidt , David Brown , "linux-arm-kernel@lists.infradead.org" List-Id: devicetree@vger.kernel.org On Fri, Nov 09, 2012 at 02:34:10PM +0000, Lorenzo Pieralisi wrote: > This patch applies some basic changes to the smp_setup_processor_id() > ARM implementation to make the code that builds cpu_logical_map more > uniform across the kernel. > > The function now prints the full extent of the boot CPU MPIDR[23:0] and > initializes the cpu_logical_map for CPUs up to nr_cpu_ids. > > Signed-off-by: Lorenzo Pieralisi > --- > arch/arm/kernel/setup.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c > index da1d1aa..ede7c84 100644 > --- a/arch/arm/kernel/setup.c > +++ b/arch/arm/kernel/setup.c > @@ -426,13 +426,14 @@ int __cpu_logical_map[NR_CPUS]; > void __init smp_setup_processor_id(void) > { > int i; > - u32 cpu = is_smp() ? read_cpuid_mpidr() & 0xff : 0; > + u32 mpidr = read_cpuid_mpidr() & 0xffffff; We need that is_smp() check, otherwise we'll go and do a funky CP15 operation on CPU's that might not be too happy about it. Will