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: 17358 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8DBDE25DFA for ; Fri, 31 May 2013 10:44:11 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id w15sf1601520vbf.7 for ; Fri, 31 May 2013 03:44:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=G2lXZp0MVVW+SVvXjntEH5vRwZ4p6zh646iNXJR1O7w=; b=QXdAmQZfULTl/qs3QMdebmGYFbaRMZOjh9muXHm3TVWrUHfXJvuTFAFtABqXMcHW5G SaMCZmqEWXMfbb2YT6lZsD/RRnf6kMvQ2p8jQZy+upSTZyelePl/sfUtsmBW1VeZ5F3f oQ5nhlRBbVk3ULMy5jPvCTtT5aAxN9QKMs+py1/pwgLaSX3/c0o9qNZYuEaAQfJR/EUQ WARlNHHXjyqqhQutKwuILeTcPkBN8DBbANN1mvj7iSO11Zjyy7c5Vk/EzVXozFBw25sM qeT3jt2QUdk0Ga5rxGr8sQWHwxUFXdjyRTMFThcEuhOAPlUSOEnO6d6pZGzy4jtCCxeb 9+KQ== X-Received: by 10.236.16.19 with SMTP id g19mr5976927yhg.42.1369997050925; Fri, 31 May 2013 03:44:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.15.66 with SMTP id v2ls861418qec.98.gmail; Fri, 31 May 2013 03:44:10 -0700 (PDT) X-Received: by 10.58.210.162 with SMTP id mv2mr9736247vec.11.1369997050737; Fri, 31 May 2013 03:44:10 -0700 (PDT) Received: from mail-vb0-x22b.google.com (mail-vb0-x22b.google.com [2607:f8b0:400c:c02::22b]) by mx.google.com with ESMTPS id iz8si28021559vdb.19.2013.05.31.03.44.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 03:44:10 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22b; Received: by mail-vb0-f43.google.com with SMTP id e12so917567vbg.2 for ; Fri, 31 May 2013 03:44:10 -0700 (PDT) X-Received: by 10.220.238.4 with SMTP id kq4mr9647490vcb.73.1369997050612; Fri, 31 May 2013 03:44:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.229.199 with SMTP id jj7csp44788vcb; Fri, 31 May 2013 03:44:10 -0700 (PDT) X-Received: by 10.66.13.169 with SMTP id i9mr12655958pac.212.1369997049697; Fri, 31 May 2013 03:44:09 -0700 (PDT) Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by mx.google.com with ESMTPS id wn4si31760362pbc.145.2013.05.31.03.44.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 03:44:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.169 is neither permitted nor denied by best guess record for domain of sanjay.rawat@linaro.org) client-ip=209.85.192.169; Received: by mail-pd0-f169.google.com with SMTP id y11so1996159pdj.0 for ; Fri, 31 May 2013 03:44:09 -0700 (PDT) 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 Cc: michal.simek@xilinx.com, linux@arm.linux.org.uk, daniel.lezcano@linaro.org, linaro-kernel@lists.linaro.org, patches@linaro.org, Sanjay Singh Rawat 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: ALoCoQkITDeJr+9m9yMRxTHqR5sGmkga5OLJlFGtXJ3S8zcTL7i2uj/SnVbjnzwSNaYp1GKcfWU/ X-Original-Sender: sanjay.rawat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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