From patchwork Thu Aug 1 16:36:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 2837149 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5F02C9F2B3 for ; Thu, 1 Aug 2013 16:37:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A70920345 for ; Thu, 1 Aug 2013 16:37:40 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DAC6B2033F for ; Thu, 1 Aug 2013 16:37:38 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V4vsa-0002UL-9E; Thu, 01 Aug 2013 16:37:32 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V4vsY-0007qV-4H; Thu, 01 Aug 2013 16:37:30 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V4vsT-0007pj-Dv for linux-arm-kernel@lists.infradead.org; Thu, 01 Aug 2013 16:37:26 +0000 Received: by mail-pb0-f46.google.com with SMTP id rq2so2290897pbb.19 for ; Thu, 01 Aug 2013 09:37:00 -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:x-mailer; bh=rgtOZeAlz+CKXwKVskog3sfP9vQ/COxhBtcTZLelYMc=; b=VmVC2tl0ovAdtgbr3QpZql4B2IbXZ43VgNddZYIzQQ1553Q+1Mzail5VvmJnpbzpyR 6bNdMV9m3efPL+M4VaH04oHZHUWG3vJmVoEV3slL7Vfsjg+DFDkj45yg1EK+BGiELT+S 9tbnZZtJnClLw9vKNDxbu/5UdmqJIK53sojgg7HIBga3nbbiSSn0DHeb8S+pzhT2YZp0 9VSPcDDCiF1CJiEunKje0ty1TxranAiuc6Ua160yU3rcDPxj4Q/UPVhmuC8bmkynH0OJ qCjggjSFE7YCJPv/7+6Q2nrzbr5ZLoZ8OjgiZjkAvVKmvVRHTP7wtugEgPnVuyfDf5cS YELA== X-Received: by 10.68.90.99 with SMTP id bv3mr3167359pbb.108.1375375020693; Thu, 01 Aug 2013 09:37:00 -0700 (PDT) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id bp12sm5172038pac.1.2013.08.01.09.36.58 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 01 Aug 2013 09:36:59 -0700 (PDT) From: Soren Brinkmann To: Michal Simek , Russell King Subject: [PATCH] arm: zynq: hotplug: Remove unreachable code Date: Thu, 1 Aug 2013 09:36:53 -0700 Message-Id: <1375375013-17117-1-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 1.8.3.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130801_123725_547432_34FBF7A5 X-CRM114-Status: GOOD ( 12.67 ) X-Spam-Score: -2.6 (--) Cc: Soren Brinkmann , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,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 zynq_platform_do_lowpower() does never return. Hence remove all code which relies on that function returning and consolidate the remains. Signed-off-by: Soren Brinkmann --- arch/arm/mach-zynq/hotplug.c | 55 ++++---------------------------------------- 1 file changed, 5 insertions(+), 50 deletions(-) diff --git a/arch/arm/mach-zynq/hotplug.c b/arch/arm/mach-zynq/hotplug.c index c89672b..5052c70 100644 --- a/arch/arm/mach-zynq/hotplug.c +++ b/arch/arm/mach-zynq/hotplug.c @@ -40,44 +40,6 @@ static inline void zynq_cpu_enter_lowpower(void) : "cc"); } -static inline void zynq_cpu_leave_lowpower(void) -{ - unsigned int v; - - asm volatile( - " mrc p15, 0, %0, c1, c0, 0\n" - " orr %0, %0, %1\n" - " mcr p15, 0, %0, c1, c0, 0\n" - " mrc p15, 0, %0, c1, c0, 1\n" - " orr %0, %0, #0x40\n" - " mcr p15, 0, %0, c1, c0, 1\n" - : "=&r" (v) - : "Ir" (CR_C) - : "cc"); -} - -static inline void zynq_platform_do_lowpower(unsigned int cpu, int *spurious) -{ - /* - * 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 (;;) { - dsb(); - wfi(); - - /* - * Getting here, means that we have come out of WFI without - * having been woken up - this shouldn't happen - * - * Just note it happening - when we're woken, we can report - * its occurrence. - */ - (*spurious)++; - } -} - /* * platform-specific code to shutdown a CPU * @@ -85,20 +47,13 @@ static inline void zynq_platform_do_lowpower(unsigned int cpu, int *spurious) */ void zynq_platform_cpu_die(unsigned int cpu) { - int spurious = 0; - - /* - * we're ready for shutdown now, so do it - */ zynq_cpu_enter_lowpower(); - zynq_platform_do_lowpower(cpu, &spurious); /* - * bring this CPU back into the world of cache - * coherency, and then restore interrupts + * 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 */ - zynq_cpu_leave_lowpower(); - - if (spurious) - pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious); + for (;;) + cpu_do_idle(); }