From patchwork Fri Jun 5 15:11:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 6556041 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F12A49F1CC for ; Fri, 5 Jun 2015 15:23:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E0412060D for ; Fri, 5 Jun 2015 15:23:17 +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 5D6D32060B for ; Fri, 5 Jun 2015 15:23:16 +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 1Z0tNt-0005Ra-Gs; Fri, 05 Jun 2015 15:18:13 +0000 Received: from mail-pd0-f193.google.com ([209.85.192.193]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z0tJG-0001Jh-KX; Fri, 05 Jun 2015 15:13:32 +0000 Received: by pdbht2 with SMTP id ht2so8766403pdb.1; Fri, 05 Jun 2015 08:13:04 -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=8/HQLDMDc/L05cFs5f5eQm62l8s8slnPBlagRoNZY6Q=; b=BryA1Afk+JhUm/rFy/sCyQxN/ShH4KYyo22BsKW5ZDhXn7Y/nD8zWBr2cT1jgYtaXD 3VBbruGkiDlv78/h0DNqKISQgCBJ5CwxhWLXVnIy4P5SnR1gczfmZJCkCvf98MDkxTFg xNX0uhZQz52PTgRDQOSRAKpHwOAbRA3RYJjgknDWwtLhsyVXnFuog/NWQc++7ul1r5Cp wdjuxDba5zgOdyeNuaea+gxjgacPJjrcTPuPGs87Ai5iJQuZ1hqnjr0k2rixgRlYt9XB KfW7eaflNFjWnNd8dhS53SYGayHJx4kH/DxhaGR/GaxzWLE4HBDDo4fYj+ZF4r5iNWxq gOBw== X-Received: by 10.70.43.225 with SMTP id z1mr6696344pdl.45.1433517184069; Fri, 05 Jun 2015 08:13:04 -0700 (PDT) Received: from localhost.localdomain ([103.47.144.43]) by mx.google.com with ESMTPSA id bt16sm7100959pdb.91.2015.06.05.08.12.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Jun 2015 08:13:02 -0700 (PDT) From: Caesar Wang To: Heiko Stuebner Subject: [PATCH v3 3/3] ARM: rockchip: fix the SMP code style Date: Fri, 5 Jun 2015 23:11:44 +0800 Message-Id: <1433517104-7595-4-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433517104-7595-1-git-send-email-wxt@rock-chips.com> References: <1433517104-7595-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150605_081326_755281_B21F7DF2 X-CRM114-Status: GOOD ( 10.74 ) 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-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=-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 Use the below scripts to check: scripts/checkpatch.pl -f --subject arch/arm/mach-rockchip/platsmp.c Although there is a check, it's no matter. CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt +167udelay(10); total: 0 errors, 0 warnings, 1 checks, 362 lines checked Changes in v3: - FIx the PATCH v2, it doesn't work on chromium 3.14. Changes in v2: - As Kever points out, Fix the subject typo WIF/WFI in PATCH [2/3]. - As Heiko suggestion, re-adjust the cpu on/off flow in PATCH [1/3]. - Use the checkpatch.pl -f --subjective to check in PATCH [3/3]. Signed-off-by: Caesar Wang --- arch/arm/mach-rockchip/platsmp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c index 6672fdd..ac9173e 100644 --- a/arch/arm/mach-rockchip/platsmp.c +++ b/arch/arm/mach-rockchip/platsmp.c @@ -113,7 +113,7 @@ static int pmu_set_power_domain(int pd, bool on) ret = pmu_power_domain_is_on(pd); if (ret < 0) { pr_err("%s: could not read power domain state\n", - __func__); + __func__); return ret; } } @@ -137,7 +137,7 @@ static int __cpuinit rockchip_boot_secondary(unsigned int cpu, if (cpu >= ncores) { pr_err("%s: cpu %d outside maximum number of cpus %d\n", - __func__, cpu, ncores); + __func__, cpu, ncores); return -ENXIO; } @@ -156,7 +156,7 @@ static int __cpuinit rockchip_boot_secondary(unsigned int cpu, * */ udelay(10); writel(virt_to_phys(rockchip_secondary_startup), - sram_base_addr + 8); + sram_base_addr + 8); writel(0xDEADBEAF, sram_base_addr + 4); dsb_sev(); } @@ -335,7 +335,7 @@ static int rockchip_cpu_kill(unsigned int cpu) static void rockchip_cpu_die(unsigned int cpu) { v7_exit_coherency_flush(louis); - while(1) + while (1) cpu_do_idle(); } #endif @@ -348,4 +348,5 @@ static struct smp_operations rockchip_smp_ops __initdata = { .cpu_die = rockchip_cpu_die, #endif }; + CPU_METHOD_OF_DECLARE(rk3066_smp, "rockchip,rk3066-smp", &rockchip_smp_ops);