From patchwork Fri Nov 4 03:39:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 9411787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DC30860585 for ; Fri, 4 Nov 2016 03:36:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF1192AF1B for ; Fri, 4 Nov 2016 03:36:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3C382AF7A; Fri, 4 Nov 2016 03:36:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FE362AF1B for ; Fri, 4 Nov 2016 03:36:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933248AbcKDDgj (ORCPT ); Thu, 3 Nov 2016 23:36:39 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:36377 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932909AbcKDDgi (ORCPT ); Thu, 3 Nov 2016 23:36:38 -0400 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OG300EYQM0UQP90@mailout2.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 04 Nov 2016 12:36:35 +0900 (KST) X-AuditID: cbfee61b-f796f6d000004092-f0-581c0243bb53 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 37.06.16530.3420C185; Fri, 4 Nov 2016 12:36:35 +0900 (KST) Received: from pankaj.sisodomain.com ([107.108.83.125]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OG300DA1M0PR660@mmp2.samsung.com>; Fri, 04 Nov 2016 12:36:35 +0900 (KST) From: Pankaj Dubey To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: krzk@kernel.org, kgene@kernel.org, thomas.ab@samsung.com, Pankaj Dubey Subject: [PATCH 1/4] ARM: EXYNOS: Remove smp_init_cpus hook from platsmp.c Date: Fri, 04 Nov 2016 09:09:21 +0530 Message-id: <1478230764-13748-2-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1478230764-13748-1-git-send-email-pankaj.dubey@samsung.com> References: <1478230764-13748-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRmVeSWpSXmKPExsVy+t9jQV1nJpkIg4ffdCz6H79mtjh/fgO7 xabH11gtZpzfx2SxaOsXdouOZYwObB6bVnWyeWxeUu/Rt2UVo8fnTXIBLFFuNhmpiSmpRQqp ecn5KZl56bZKoSFuuhZKCnmJuam2ShG6viFBSgpliTmlQJ6RARpwcA5wD1bSt0twyzizq525 YDtfxcVrN1kbGB9wdzFyckgImEhs67zMAmGLSVy4t56ti5GLQ0hgFqNE+953zBDOT0aJ1TO3 MoNUsQnoSjx5PxfMFhHwlph85i87iM0skC4x/9MVNhBbWMBLonnGR0YQm0VAVeLkijtgG3gF PCS+bpjCDrFNTuLmuU6wOZwCnhLnnvYwgdhCQDX3tr5hm8DIu4CRYRWjRGpBckFxUnquUV5q uV5xYm5xaV66XnJ+7iZGcPA+k97BeHiX+yFGAQ5GJR7eDeukI4RYE8uKK3MPMUpwMCuJ8D7/ AxTiTUmsrEotyo8vKs1JLT7EaAp02ERmKdHkfGBk5ZXEG5qYm5gbG1iYW1qaGCmJ8zbOfhYu JJCeWJKanZpakFoE08fEwSnVwGjv8XOd4K+ig6Vvd9XWdHNOfGZ5S3riLVfWheqPXvTV6s16 VdIR6bCXq/CHKruRJUvYCd9y6/3SwfMzA1/aqOxufraj/tV1acVz68W2S0Q7zoj+fqiGU46r NnnSNMV6W33nfzX8jGdO6BXrKCUvqDH75uJbLBfR0vecZfuiNA+zY9YvVnUIKbEUZyQaajEX FScCADZovaF0AgAA X-MTR: 20000000000000000@CPGS Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We can safely remove exynos_smp_init_cpus() hook from mach-exynos/platsmp.c, as all SMP platforms in mach-exynos can rely on DT for CPU core description instead of determining number of cores from the SCU. Signed-off-by: Pankaj Dubey Reviewed-by: Alim Akhtar --- arch/arm/mach-exynos/platsmp.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 98ffe1e..a5d6841 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -385,36 +385,6 @@ fail: return pen_release != -1 ? ret : 0; } -/* - * Initialise the CPU possible map early - this describes the CPUs - * which may be present or become present in the system. - */ - -static void __init exynos_smp_init_cpus(void) -{ - void __iomem *scu_base = scu_base_addr(); - unsigned int i, ncores; - - if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) - ncores = scu_base ? scu_get_core_count(scu_base) : 1; - else - /* - * CPU Nodes are passed thru DT and set_cpu_possible - * is set by "arm_dt_init_cpu_maps". - */ - return; - - /* sanity check */ - 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 exynos_smp_prepare_cpus(unsigned int max_cpus) { int i; @@ -479,7 +449,6 @@ static void exynos_cpu_die(unsigned int cpu) #endif /* CONFIG_HOTPLUG_CPU */ const struct smp_operations exynos_smp_ops __initconst = { - .smp_init_cpus = exynos_smp_init_cpus, .smp_prepare_cpus = exynos_smp_prepare_cpus, .smp_secondary_init = exynos_secondary_init, .smp_boot_secondary = exynos_boot_secondary,