From patchwork Mon Jun 8 07:11:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 6563151 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B2A14C0020 for ; Mon, 8 Jun 2015 07:12:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D86F72041E for ; Mon, 8 Jun 2015 07:12:57 +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 EB1DC203B5 for ; Mon, 8 Jun 2015 07:12:56 +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 1Z1rEu-0008IH-B0; Mon, 08 Jun 2015 07:12:56 +0000 Received: from mail-pd0-f176.google.com ([209.85.192.176]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z1rEh-00089Y-Jt; Mon, 08 Jun 2015 07:12:44 +0000 Received: by pdjn11 with SMTP id n11so59475917pdj.0; Mon, 08 Jun 2015 00:12:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tD0gs30hgGqy8iK9LppGYThvV+JKGpZMIp+C6ITqDZ0=; b=V6wPsi4vRhvmDhM6oN6ZW9GU4D3+2IIw19faCDtXu0X6RO+/CMFAxA/Z0h+Dvw62Il 4v9SOlYGCsedfYb2+yjft/ZM604w8GhE+6EqJ4c5s0tub4TKy6cLHJ6/GK3m2su9H4ek zCA/SZWAP48UqF+nmOQlUw+pHiGBCrXamLNiVcDLqHZOrFrIV2gTwoscwTxoKdKfg7M7 Dl+IfbTDIsJpEnV/NDdV/HqmccpYR3be2X2XChIUqaec6iyrrhUabvaUfhuH08t5gujS fRpU1wP7UDsdI8bcK2D/u5kzx4LLOyPge7V/W7hF8DXhnJ69r9sZrfJHl1VgYW628g3K /IuQ== X-Received: by 10.70.94.98 with SMTP id db2mr27307426pdb.130.1433747542547; Mon, 08 Jun 2015 00:12:22 -0700 (PDT) Received: from localhost.localdomain ([192.253.240.41]) by mx.google.com with ESMTPSA id nt15sm1495125pdb.14.2015.06.08.00.12.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Jun 2015 00:12:21 -0700 (PDT) From: Caesar Wang To: Heiko Stuebner Subject: [PATCH v5 2/3] ARM: rockchip: ensure CPU to enter WFI/WFE state Date: Mon, 8 Jun 2015 15:11:35 +0800 Message-Id: <1433747496-7642-3-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433747496-7642-1-git-send-email-wxt@rock-chips.com> References: <1433747496-7642-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150608_001243_711173_53EB7FDE X-CRM114-Status: GOOD ( 10.37 ) X-Spam-Score: -1.8 (-) Cc: Russell King , Dmitry Torokhov , dianders@chromium.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Caesar Wang X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, 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 patch can ensure that v7_exit_coherency_flush() in rockchip_cpu_die() executed in time. The mdelay(1) has enough time to fix the problem of CPU offlining. That's a workaround way in rockchip hotplug code, At least, we haven't a better way to solve it. Who know, that maybe fixed by chip (hardware) in the future. Signed-off-by: Caesar Wang Changes in v5: - Fix the patch decription. - Add the changelog. Changes in v4: None Changes in v3: None Changes in v2: None Changes in v2: - As Kever points out, Fix the subject typo WFI/WFE. --- arch/arm/mach-rockchip/platsmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c index bd40852..5bc2a89 100644 --- a/arch/arm/mach-rockchip/platsmp.c +++ b/arch/arm/mach-rockchip/platsmp.c @@ -321,6 +321,9 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus) #ifdef CONFIG_HOTPLUG_CPU static int rockchip_cpu_kill(unsigned int cpu) { + /* ensure CPU can enter the WFI/WFE state */ + mdelay(1); + pmu_set_power_domain(0 + cpu, false); return 1; }