From patchwork Tue Sep 2 21:19:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 4828391 Return-Path: X-Original-To: patchwork-linux-arm@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 F366BC0338 for ; Tue, 2 Sep 2014 21:23:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28856201D3 for ; Tue, 2 Sep 2014 21:23:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB3B2201D5 for ; Tue, 2 Sep 2014 21:23:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XOvVA-0004es-UI; Tue, 02 Sep 2014 21:20:32 +0000 Received: from mail-pa0-x22d.google.com ([2607:f8b0:400e:c03::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XOvUb-0003Cb-Pa for linux-arm-kernel@lists.infradead.org; Tue, 02 Sep 2014 21:19:58 +0000 Received: by mail-pa0-f45.google.com with SMTP id bj1so15592115pad.32 for ; Tue, 02 Sep 2014 14:19:42 -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=wfw1fW9zI0ucE5LxQMaWB2aPTUHTpdcyBempPiBYXd4=; b=V5eI4CUj1nPZ2kiftMs9Y0lgP+jJFuXgVfkf9UDp55/UnUKEExKEa6GpQsCAktdR6+ 9j5Lth/aAY9hCQnpi/OBoBSRFqLwgiFkcpouwrN/GC+AfabH1nGqlqSCMXRMyIYgUZfW peSm3unCSszCGjk7wcgSUai5jQWr/ZljizyArWD3GkHFEo85iwar7k2G1qGOG3i6GOyv lMsx1JQLzjGXwEVtzdw+Mhh15LNuPIGnHUL47pFW/ZaEGBd9bwcowXlRNsTt66qbF0Mw n1YuAQ+wZV5hn6YBDh0JQwrs8aTWVC9qNbXn4KHoDcRd8JABNAvAPNeeYPeGLheWfy7M Scjw== X-Received: by 10.68.236.227 with SMTP id ux3mr6818553pbc.159.1409692782434; Tue, 02 Sep 2014 14:19:42 -0700 (PDT) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id nr10sm6793908pdb.40.2014.09.02.14.19.40 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 02 Sep 2014 14:19:41 -0700 (PDT) From: Soren Brinkmann To: Michal Simek , Daniel Lezcano Subject: [PATCH v2 8/9] ARM: zynq: Remove hotplug.c Date: Tue, 2 Sep 2014 14:19:13 -0700 Message-Id: <1409692754-13437-9-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 2.1.0.1.g27b9230 In-Reply-To: <1409692754-13437-1-git-send-email-soren.brinkmann@xilinx.com> References: <1409692754-13437-1-git-send-email-soren.brinkmann@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140902_141957_854591_8ADC2DF7 X-CRM114-Status: GOOD ( 12.22 ) X-Spam-Score: 0.0 (/) Cc: Mark Rutland , devicetree@vger.kernel.org, Russell King , Pawel Moll , linux-pm@vger.kernel.org, Ian Campbell , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Rob Herring , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , Kumar Gala , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,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 --- v2: - don't add function prototype a second time --- 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, 18 insertions(+), 21 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 24d6340d3fb6..2bc71273c73c 100644 --- a/arch/arm/mach-zynq/common.h +++ b/arch/arm/mach-zynq/common.h @@ -39,9 +39,6 @@ extern struct smp_operations zynq_smp_ops __initdata; extern void __iomem *zynq_scu_base; -/* Hotplug */ -extern void zynq_platform_cpu_die(unsigned int cpu); - void zynq_pm_late_init(void); static inline void zynq_core_pm_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 06415eeba7e6..f722b5a83a45 100644 --- a/arch/arm/mach-zynq/platsmp.c +++ b/arch/arm/mach-zynq/platsmp.c @@ -136,6 +136,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 = {