From patchwork Fri May 31 10:44:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanjay Singh Rawat X-Patchwork-Id: 2642161 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id E0B553FD4E for ; Fri, 31 May 2013 10:45:20 +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 1UiMpO-0007tU-JS; Fri, 31 May 2013 10:44:59 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UiMp2-00066C-Sf; Fri, 31 May 2013 10:44:37 +0000 Received: from mail-pd0-f173.google.com ([209.85.192.173]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UiMoy-00065a-Mz for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2013 10:44:34 +0000 Received: by mail-pd0-f173.google.com with SMTP id v14so1991633pde.32 for ; Fri, 31 May 2013 03:44:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=G2lXZp0MVVW+SVvXjntEH5vRwZ4p6zh646iNXJR1O7w=; b=V4nepQDBJ0jS7AlWXZQMgRAvOMm56Ki07igNzhLkXGS6TWikNO1v4Z1B7uVwf1Xbls 8iZFWw8pXjCs0JdJZLTpBUcO39k9QBjAsccAMKho712ErBjaX6wbbFOcXeu5c1SwSO2L xcBK6gMwOM5qZaI1wd3IklgpimTdk2HqXQxMZ8cGLwDs9bcjTeaiYtxHemCO68cdocmW 7y16C+mKU6nPunuj1zuHLke1nDi3D+Luw/IuyN4WrhFZM3vhUjq3+eJPqlFs+CMwE3aT xntILsK5Q0Uz/bnDlNL+/bH/mlNxmwsuC3MPJoG64Xun6haB+wgLJcmdxb57Cg2RyYCd d06g== X-Received: by 10.66.216.170 with SMTP id or10mr12732277pac.31.1369997049146; Fri, 31 May 2013 03:44:09 -0700 (PDT) Received: from srawat-Latitude-E6420.LGE.NET ([203.247.149.152]) by mx.google.com with ESMTPSA id qh4sm49278723pac.8.2013.05.31.03.44.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 03:44:07 -0700 (PDT) From: Sanjay Singh Rawat To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: zynq: wfi exit on same cpu is valid Date: Fri, 31 May 2013 16:14:26 +0530 Message-Id: <1369997066-10585-1-git-send-email-sanjay.rawat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQmHKZvW9h3Q8rOzgtgMsG4xbaezwnvL24Jr8DPtEJ++0MtcrTwcbDg3vH8p5w8BK4YKBbdC X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130531_064432_818243_56ACF2B1 X-CRM114-Status: GOOD ( 10.38 ) X-Spam-Score: -1.1 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.173 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.8 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [203.247.149.152 listed in dnsbl.sorbs.net] Cc: linaro-kernel@lists.linaro.org, linux@arm.linux.org.uk, Sanjay Singh Rawat , daniel.lezcano@linaro.org, michal.simek@xilinx.com, patches@linaro.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 The current code considers every wakeup as spurious, which is not correct. Handle the same way as other arm platforms are doing. Signed-off-by: Sanjay Singh Rawat Reviewed-by: Daniel Lezcano --- arch/arm/mach-zynq/hotplug.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-zynq/hotplug.c b/arch/arm/mach-zynq/hotplug.c index c89672b..a1ab22c 100644 --- a/arch/arm/mach-zynq/hotplug.c +++ b/arch/arm/mach-zynq/hotplug.c @@ -67,6 +67,13 @@ static inline void zynq_platform_do_lowpower(unsigned int cpu, int *spurious) dsb(); wfi(); + if (pen_release == cpu_logical_map(cpu)) { + /* + * OK, proper wakeup, we're done + */ + break; + } + /* * Getting here, means that we have come out of WFI without * having been woken up - this shouldn't happen