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: 9411803 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 0F3A86022E for ; Fri, 4 Nov 2016 03:39:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2253285F2 for ; Fri, 4 Nov 2016 03:39:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D566C2AF28; Fri, 4 Nov 2016 03:39:24 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 847DE285F2 for ; Fri, 4 Nov 2016 03:39:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2VKU-000176-Dl; Fri, 04 Nov 2016 03:38:10 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2VJY-0000hd-JH for linux-arm-kernel@lists.infradead.org; Fri, 04 Nov 2016 03:37:13 +0000 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-arm-kernel@lists.infradead.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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161103_203712_956056_F32C9366 X-CRM114-Status: GOOD ( 12.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pankaj Dubey , kgene@kernel.org, thomas.ab@samsung.com, krzk@kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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,