From patchwork Sat Jun 18 16:27:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 9185723 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2BAA16075F for ; Sat, 18 Jun 2016 16:30:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C07C28360 for ; Sat, 18 Jun 2016 16:30:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10E432836B; Sat, 18 Jun 2016 16:30: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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFF2628360 for ; Sat, 18 Jun 2016 16:30:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752143AbcFRQ20 (ORCPT ); Sat, 18 Jun 2016 12:28:26 -0400 Received: from mail.kernel.org ([198.145.29.136]:50756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496AbcFRQ2Z (ORCPT ); Sat, 18 Jun 2016 12:28:25 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5C20B20173; Sat, 18 Jun 2016 16:28:24 +0000 (UTC) Received: from mail.kernel.org (unknown [178.162.198.111]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E251C20165; Sat, 18 Jun 2016 16:28:22 +0000 (UTC) From: Sebastian Reichel To: Sebastian Reichel , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tony Lindgren , Aaro Koskinen , Pavel Machek , Ivaylo Dimitrov , =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [RFC 11/19] HSI: omap_ssi_core: remove pm_runtime_get_sync call from tasklet Date: Sat, 18 Jun 2016 18:27:01 +0200 Message-Id: <1466267229-25012-12-git-send-email-sre@kernel.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1466267229-25012-1-git-send-email-sre@kernel.org> References: <1466267229-25012-1-git-send-email-sre@kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We may not call pm_runtime_get_sync() from tasklet, since it can block once pm_runtime_irq_safe is removed for omap-ssi. Since irq can should only be created for a running device, we assume, that the device is already running and use non- synchronous API instead. Signed-off-by: Sebastian Reichel --- drivers/hsi/controllers/omap_ssi_core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c index 618db80577c3..79562ce65579 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -255,7 +255,13 @@ static void ssi_gdd_tasklet(unsigned long dev) unsigned int lch; u32 status_reg; - pm_runtime_get_sync(ssi->device.parent); + pm_runtime_get(ssi->device.parent); + + if (!pm_runtime_active(ssi->device.parent)) { + dev_warn(ssi->device.parent, "ssi_gdd_tasklet called without runtime PM!\n"); + pm_runtime_put(ssi->device.parent); + return; + } status_reg = readl(sys + SSI_GDD_MPU_IRQ_STATUS_REG); for (lch = 0; lch < SSI_MAX_GDD_LCH; lch++) {