From patchwork Thu Aug 30 22:28:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 10582965 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A680A17DB for ; Thu, 30 Aug 2018 22:29:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95BB22C057 for ; Thu, 30 Aug 2018 22:29:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 894D92C064; Thu, 30 Aug 2018 22:29:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3FDA22C057 for ; Thu, 30 Aug 2018 22:29:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=jVOFykgf4qAp1JvOj5TgRXqZSzfIA02UAW5rzIOEA/A=; b=rTV eKj6Zv9RKaPW9rN57L2Jnu2l8UO2xXgsNrBO3c1T5pmn/uSUssfjWrmSlX4Hj3OqsTADk6zMkXr/G 2m62M+rH3FMoygUDpKz1Tsm21qsWikF4j1LbMtXeblXYO0hG1gvmc7jT+rZCshsGhj7QgPDS6Am8y 2YgOp4kawKis12GPEscS38C3YRQBu1mETeb0LTFwja/QZ8xo2sk5BJWeTTw4XE8OFIwAHOMYLLTvm ahsx+mZi9Ltggs+FKLY95LmtbRILg/k0PThRaT+EEFq5jnEPo6CFZrfssUB/ID2f98VsJY+W2m6QC MumPYwquxs9XxW03lemNWqkVyrwGvIw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvVRd-0004Vz-K5; Thu, 30 Aug 2018 22:29:41 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvVRA-0004In-7G; Thu, 30 Aug 2018 22:29:13 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 0AF0A275648 From: Ezequiel Garcia To: iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH] iommu: rockchip: Drop verbose prints in the interrupt handler Date: Thu, 30 Aug 2018 19:28:32 -0300 Message-Id: <20180830222832.16766-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180830_152912_395794_42952739 X-CRM114-Status: UNSURE ( 8.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joerg Roedel , kernel@collabora.com, Ezequiel Garcia , Heiko Stuebner , enric.balletbo@collabora.co.uk MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Printing verbosely via WARN macros and friends in interrupt handlers is strongly discouraged. Drop them and use proper ratelimited prints. Signed-off-by: Ezequiel Garcia Reviewed-by: Heiko Stuebner --- drivers/iommu/rockchip-iommu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 054cd2c8e9c8..21bb9a30bc64 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -523,11 +523,13 @@ static irqreturn_t rk_iommu_irq(int irq, void *dev_id) irqreturn_t ret = IRQ_NONE; int i; - if (WARN_ON(!pm_runtime_get_if_in_use(iommu->dev))) - return 0; + if (!pm_runtime_get_if_in_use(iommu->dev)) + return ret; - if (WARN_ON(clk_bulk_enable(iommu->num_clocks, iommu->clocks))) + if (clk_bulk_enable(iommu->num_clocks, iommu->clocks)) { + dev_err_ratelimited(iommu->dev, "couldn't enable clocks\n"); goto out; + } for (i = 0; i < iommu->num_mmu; i++) { int_status = rk_iommu_read(iommu->bases[i], RK_MMU_INT_STATUS); @@ -544,7 +546,7 @@ static irqreturn_t rk_iommu_irq(int irq, void *dev_id) flags = (status & RK_MMU_STATUS_PAGE_FAULT_IS_WRITE) ? IOMMU_FAULT_WRITE : IOMMU_FAULT_READ; - dev_err(iommu->dev, "Page fault at %pad of type %s\n", + dev_err_ratelimited(iommu->dev, "Page fault at %pad of type %s\n", &iova, (flags == IOMMU_FAULT_WRITE) ? "write" : "read");