Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756147Ab3GVOPA (ORCPT ); Mon, 22 Jul 2013 10:15:00 -0400 Received: from mail-qa0-f41.google.com ([209.85.216.41]:53969 "EHLO mail-qa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754420Ab3GVOO6 (ORCPT ); Mon, 22 Jul 2013 10:14:58 -0400 Date: Mon, 22 Jul 2013 10:14:55 -0400 (EDT) From: Nicolas Pitre To: Sudeep KarkadaNagesha cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, Russell King , Shawn Guo , Gregory Clement , Greg Kroah-Hartman , Viresh Kumar , "Rafael J. Wysocki" , Grant Likely , Rob Herring , Lorenzo Pieralisi , Olof Johansson , Arnd Bergmann Subject: Re: [PATCH v3 02/16] ARM: DT/kernel: define ARM specific arch_match_cpu_phys_id In-Reply-To: <1374492747-13879-3-git-send-email-Sudeep.KarkadaNagesha@arm.com> Message-ID: References: <1374069984-20567-1-git-send-email-Sudeep.KarkadaNagesha@arm.com> <1374492747-13879-1-git-send-email-Sudeep.KarkadaNagesha@arm.com> <1374492747-13879-3-git-send-email-Sudeep.KarkadaNagesha@arm.com> User-Agent: Alpine 2.03 (LFD 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1906 Lines: 55 On Mon, 22 Jul 2013, Sudeep KarkadaNagesha wrote: > From: Sudeep KarkadaNagesha > > OF/DT core library now provides architecture specific hook to match the > logical cpu index with the corresponding physical identifier. Most of the > cpu DT node parsing and initialisation is contained in devtree.c. So it's > better to define ARM specific arch_match_cpu_phys_id there. > > This mainly helps to avoid replication of the code doing CPU node parsing > and physical(MPIDR) to logical mapping. > > Cc: Russell King > Cc: Lorenzo Pieralisi > Acked-by: Rob Herring > Signed-off-by: Sudeep KarkadaNagesha Acked-by: Nicolas Pitre > --- > arch/arm/kernel/devtree.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c > index 5859c8b..2ee8a17 100644 > --- a/arch/arm/kernel/devtree.c > +++ b/arch/arm/kernel/devtree.c > @@ -169,6 +169,11 @@ void __init arm_dt_init_cpu_maps(void) > } > } > > +bool arch_match_cpu_phys_id(int cpu, u64 phys_id) > +{ > + return (phys_id & MPIDR_HWID_BITMASK) == cpu_logical_map(cpu); > +} > + > /** > * setup_machine_fdt - Machine setup when an dtb was passed to the kernel > * @dt_phys: physical address of dt blob > -- > 1.8.1.2 > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/