From patchwork Fri Nov 1 22:08:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 3128551 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F2EE6BEEB2 for ; Fri, 1 Nov 2013 22:10:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E37A203DF for ; Fri, 1 Nov 2013 22:10:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E1E9202F2 for ; Fri, 1 Nov 2013 22:10:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756554Ab3KAWJM (ORCPT ); Fri, 1 Nov 2013 18:09:12 -0400 Received: from smtp.codeaurora.org ([198.145.11.231]:48592 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756558Ab3KAWJF (ORCPT ); Fri, 1 Nov 2013 18:09:05 -0400 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id A959313F2AE; Fri, 1 Nov 2013 22:09:05 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 9D37713F2B1; Fri, 1 Nov 2013 22:09:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from sboyd-linux.qualcomm.com (i-global252.qualcomm.com [199.106.103.252]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2E58513F2AE; Fri, 1 Nov 2013 22:09:05 +0000 (UTC) From: Stephen Boyd To: linux-arm-kernel@lists.infradead.org Cc: David Brown , Rohit Vaswani , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 11/11] ARM: msm: Remove nr_cpus detection logic Date: Fri, 1 Nov 2013 15:08:59 -0700 Message-Id: <1383343739-23080-12-git-send-email-sboyd@codeaurora.org> X-Mailer: git-send-email 1.8.4.2.564.g0d6cf24 In-Reply-To: <1383343739-23080-1-git-send-email-sboyd@codeaurora.org> References: <1383343739-23080-1-git-send-email-sboyd@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All the SMP supported MSM devices are using devicetree and they have a cpus node in DT. Given this we know that arm generic code detects the number of cpus from the cpus node so we can drop support for detecting the number of CPUs from the mpidr register here. Signed-off-by: Stephen Boyd --- arch/arm/mach-msm/platsmp.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c index 87e4fdc..36b2294 100644 --- a/arch/arm/mach-msm/platsmp.c +++ b/arch/arm/mach-msm/platsmp.c @@ -41,12 +41,6 @@ extern void secondary_startup(void); static DEFINE_SPINLOCK(boot_lock); -static inline int get_core_count(void) -{ - /* 1 + the PART[1:0] field of MIDR */ - return ((read_cpuid_id() >> 4) & 3) + 1; -} - static void msm_secondary_init(unsigned int cpu) { /* @@ -268,26 +262,6 @@ static int msm_boot_secondary(unsigned int cpu, struct task_struct *idle) return 0; } -/* - * Initialise the CPU possible map early - this describes the CPUs - * which may be present or become present in the system. The msm8x60 - * does not support the ARM SCU, so just set the possible cpu mask to - * NR_CPUS. - */ -static void __init msm_smp_init_cpus(void) -{ - unsigned int i, ncores = get_core_count(); - - if (ncores > nr_cpu_ids) { - pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", - ncores, nr_cpu_ids); - ncores = nr_cpu_ids; - } - - for (i = 0; i < ncores; i++) - set_cpu_possible(i, true); -} - static void __init msm_smp_prepare_cpus(unsigned int max_cpus) { int cpu, map; @@ -319,7 +293,6 @@ static void __init msm_smp_prepare_cpus(unsigned int max_cpus) } struct smp_operations msm_smp_ops __initdata = { - .smp_init_cpus = msm_smp_init_cpus, .smp_prepare_cpus = msm_smp_prepare_cpus, .smp_secondary_init = msm_secondary_init, .smp_boot_secondary = msm_boot_secondary,