From patchwork Wed Aug 20 20:41:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 4753651 Return-Path: X-Original-To: patchwork-linux-pm@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 1A5BEC0338 for ; Wed, 20 Aug 2014 20:44:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 424FE200E6 for ; Wed, 20 Aug 2014 20:44:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5335E2015A for ; Wed, 20 Aug 2014 20:44:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753166AbaHTUm5 (ORCPT ); Wed, 20 Aug 2014 16:42:57 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:59222 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753076AbaHTUmy (ORCPT ); Wed, 20 Aug 2014 16:42:54 -0400 Received: by mail-pa0-f42.google.com with SMTP id lf10so13060124pab.1 for ; Wed, 20 Aug 2014 13:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=/myXciO5lrCFK/YQ3siIJxJrsYmLYDn1k+AyJvhr1HY=; b=kdq2eb15mihSveR/ZSRcQWJMz3iL5jDp0eHoOUIFtyoYLyDpUhnfEcHxsV5Ks+hgum PIY4FqsQkJ6gdMerLxQsKRRN8lBt2BZAvQL9ZGDMNQFTyNlFIrTqHZVu5WdRAHcgnQiC i4YeqvkqP9el6Oc/yob3ERT+ledMpQKNBRX+xj4r/R8gCMp53RGTVQreY6LitfmMBW+1 8rO9Ksu/JM41IzTe8EUYlERwYAY50yONiItirjZPCJd2RFqkMAWoomRAC5Hu3Yr3q2ek qZ4/cpt81ET0lNlOpLoKOlpNoNwrDiHzYaeDrqCyEY03na3dNWKZVqXZFnkLerkGYxge Qd5A== X-Received: by 10.68.139.99 with SMTP id qx3mr55004228pbb.75.1408567373847; Wed, 20 Aug 2014 13:42:53 -0700 (PDT) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id fg9sm26493567pad.4.2014.08.20.13.42.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 20 Aug 2014 13:42:52 -0700 (PDT) From: Soren Brinkmann To: Michal Simek , Russell King , "Rafael J. Wysocki" , Daniel Lezcano , Rob Herring , Mark Rutland Cc: =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, Pawel Moll , Ian Campbell , Kumar Gala Subject: [PATCH 8/9] ARM: zynq: Remove hotplug.c Date: Wed, 20 Aug 2014 13:41:54 -0700 Message-Id: <1408567315-28479-9-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 2.0.1.1.gfbfc394 In-Reply-To: <1408567315-28479-1-git-send-email-soren.brinkmann@xilinx.com> References: <1408567315-28479-1-git-send-email-soren.brinkmann@xilinx.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The hotplug code contains only a single function, which is an SMP function. Move that to platsmp.c where all other SMP runctions reside. That allows removing hotplug.c and declaring the cpu_die function static. Signed-off-by: Soren Brinkmann --- arch/arm/mach-zynq/Makefile | 1 - arch/arm/mach-zynq/common.h | 3 +-- arch/arm/mach-zynq/hotplug.c | 17 ----------------- arch/arm/mach-zynq/platsmp.c | 18 ++++++++++++++++++ 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-zynq/Makefile b/arch/arm/mach-zynq/Makefile index 820dff6e1eba..c85fb3f7d5cd 100644 --- a/arch/arm/mach-zynq/Makefile +++ b/arch/arm/mach-zynq/Makefile @@ -6,5 +6,4 @@ obj-y := common.o slcr.o pm.o CFLAGS_REMOVE_hotplug.o =-march=armv6k CFLAGS_hotplug.o =-Wa,-march=armv7-a -mcpu=cortex-a9 -obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o obj-$(CONFIG_SMP) += headsmp.o platsmp.o diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h index c0773e87e83c..e6bb12c50a23 100644 --- a/arch/arm/mach-zynq/common.h +++ b/arch/arm/mach-zynq/common.h @@ -39,8 +39,7 @@ extern struct smp_operations zynq_smp_ops __initdata; extern void __iomem *zynq_scu_base; -/* Hotplug */ -extern void zynq_platform_cpu_die(unsigned int cpu); +int zynq_pm_late_init(void); int zynq_pm_late_init(void); diff --git a/arch/arm/mach-zynq/hotplug.c b/arch/arm/mach-zynq/hotplug.c index fe44a05677e2..b685c89f11e4 100644 --- a/arch/arm/mach-zynq/hotplug.c +++ b/arch/arm/mach-zynq/hotplug.c @@ -12,20 +12,3 @@ */ #include -/* - * platform-specific code to shutdown a CPU - * - * Called with IRQs disabled - */ -void zynq_platform_cpu_die(unsigned int cpu) -{ - zynq_slcr_cpu_state_write(cpu, true); - - /* - * there is no power-control hardware on this platform, so all - * we can do is put the core into WFI; this is safe as the calling - * code will have already disabled interrupts - */ - for (;;) - cpu_do_idle(); -} diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c index f77f7ca4c45b..04e578718aa2 100644 --- a/arch/arm/mach-zynq/platsmp.c +++ b/arch/arm/mach-zynq/platsmp.c @@ -132,6 +132,24 @@ static int zynq_cpu_kill(unsigned cpu) zynq_slcr_cpu_stop(cpu); return 1; } + +/* + * platform-specific code to shutdown a CPU + * + * Called with IRQs disabled + */ +static void zynq_platform_cpu_die(unsigned int cpu) +{ + zynq_slcr_cpu_state_write(cpu, true); + + /* + * there is no power-control hardware on this platform, so all + * we can do is put the core into WFI; this is safe as the calling + * code will have already disabled interrupts + */ + for (;;) + cpu_do_idle(); +} #endif struct smp_operations zynq_smp_ops __initdata = {