From patchwork Thu Sep 4 01:01:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 4841521 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DBB57C0338 for ; Thu, 4 Sep 2014 01:04:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 14FDC201EF for ; Thu, 4 Sep 2014 01:04:02 +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 D276420170 for ; Thu, 4 Sep 2014 01:04:00 +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 1XPLQc-0001ZB-O5; Thu, 04 Sep 2014 01:01:34 +0000 Received: from smtp.codeaurora.org ([198.145.11.231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XPLQZ-0001SY-8p for linux-arm-kernel@lists.infradead.org; Thu, 04 Sep 2014 01:01:31 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 5588613F8AB; Thu, 4 Sep 2014 01:01:10 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 47B0613F8B2; Thu, 4 Sep 2014 01:01:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from sboyd-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E066713F8AB; Thu, 4 Sep 2014 01:01:09 +0000 (UTC) From: Stephen Boyd To: Mike Turquette Subject: [PATCH v2 3/4] clk: Use lockless functions for debug printing Date: Wed, 3 Sep 2014 18:01:05 -0700 Message-Id: <1409792466-5092-4-git-send-email-sboyd@codeaurora.org> X-Mailer: git-send-email 2.1.0.rc2.4.g1a517f0 In-Reply-To: <1409792466-5092-1-git-send-email-sboyd@codeaurora.org> References: <1409792466-5092-1-git-send-email-sboyd@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140903_180131_340985_FE0C5A85 X-CRM114-Status: GOOD ( 13.84 ) X-Spam-Score: -1.7 (-) Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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-Virus-Scanned: ClamAV using ClamSMTP In the near future we're going to move the prepare lock to a per-clock ww_mutex. Use the lockless functions here for printing the rate and accuracy so that we don't run into AA deadlocks in the future. Signed-off-by: Stephen Boyd --- drivers/clk/clk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 248a8612a12d..d2da11674f0b 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -122,8 +122,8 @@ static void clk_summary_show_one(struct seq_file *s, struct clk *c, int level) seq_printf(s, "%*s%-*s %11d %12d %11lu %10lu\n", level * 3 + 1, "", 30 - level * 3, c->name, - c->enable_count, c->prepare_count, clk_get_rate(c), - clk_get_accuracy(c)); + c->enable_count, c->prepare_count, __clk_get_rate(c), + __clk_get_accuracy(c)); } static void clk_summary_show_subtree(struct seq_file *s, struct clk *c, @@ -180,8 +180,8 @@ static void clk_dump_one(struct seq_file *s, struct clk *c, int level) seq_printf(s, "\"%s\": { ", c->name); seq_printf(s, "\"enable_count\": %d,", c->enable_count); seq_printf(s, "\"prepare_count\": %d,", c->prepare_count); - seq_printf(s, "\"rate\": %lu", clk_get_rate(c)); - seq_printf(s, "\"accuracy\": %lu", clk_get_accuracy(c)); + seq_printf(s, "\"rate\": %lu", __clk_get_rate(c)); + seq_printf(s, "\"accuracy\": %lu", __clk_get_accuracy(c)); } static void clk_dump_subtree(struct seq_file *s, struct clk *c, int level)