From patchwork Fri Aug 14 12:20:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 7014571 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 7D8939F358 for ; Fri, 14 Aug 2015 12:23:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0BBF206E5 for ; Fri, 14 Aug 2015 12:23:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3577D207CA for ; Fri, 14 Aug 2015 12:23:31 +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 1ZQDzQ-0006ya-UD; Fri, 14 Aug 2015 12:21:40 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZQDzI-0006wD-3v for linux-arm-kernel@bombadil.infradead.org; Fri, 14 Aug 2015 12:21:32 +0000 Received: from arroyo.ext.ti.com ([192.94.94.40]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZQDzD-0006v6-V7 for linux-arm-kernel@lists.infradead.org; Fri, 14 Aug 2015 12:21:29 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id t7ECKaW0029732; Fri, 14 Aug 2015 07:20:36 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t7ECKZbX029118; Fri, 14 Aug 2015 07:20:35 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Fri, 14 Aug 2015 07:20:35 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t7ECKYU7029652; Fri, 14 Aug 2015 07:20:34 -0500 From: Grygorii Strashko To: , , Subject: [PATCH v3 1/6] genirq: fix irq_chip_retrigger_hierarchy Date: Fri, 14 Aug 2015 15:20:25 +0300 Message-ID: <1439554830-19502-2-git-send-email-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1439554830-19502-1-git-send-email-grygorii.strashko@ti.com> References: <1439554830-19502-1-git-send-email-grygorii.strashko@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150814_132128_265464_7355193A X-CRM114-Status: GOOD ( 11.82 ) X-Spam-Score: -7.9 (-------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Grygorii Strashko , linux@arm.linux.org.uk, jason@lakedaemon.net, nsekhar@ti.com, linux-kernel@vger.kernel.org, balbi@ti.com, Sudeep Holla , linux-omap@vger.kernel.org, Jiang Liu , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Now irq_chip_retrigger_hierarchy() returns -ENOSYS if it was not able to find at least one .irq_retrigger() callback implemented in IRQ domain hierarchy. As result, IRQ re-triggering is not working now on ARM (TI OMAP) where ARM GIC is not implemented this callback. The .irq_retrigger() is optional (see check_irq_resend()) and there are no reasons to fail if it was not found, hence lets return 0 in this case. In case of TI OMAP DRA7 the following IRQ hierarchy is defined: ARM GIC <- OMAP wakeupgen <- TI CBAR Failure is reproduced during resume from suspend to RAM: - wakeup by IRQx - suspend_enter + arch_suspend_enable_irqs + handle_fasteoi_irq + irq_may_run + irq_pm_check_wakeup + irq_disable(IRQx) + dpm_resume_noirq() + resume_device_irqs + resume_irqs + resume_irq + __enable_irq <== IRQx is not re-triggered Cc: Sudeep Holla Cc: Jiang Liu Fixes: 85f08c17de26 ('genirq: Introduce helper functions...') Reviewed-by: Marc Zyngier Signed-off-by: Grygorii Strashko Reviewed-by: Jiang Liu --- kernel/irq/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 27f4332..6de638b 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -997,7 +997,7 @@ int irq_chip_retrigger_hierarchy(struct irq_data *data) if (data->chip && data->chip->irq_retrigger) return data->chip->irq_retrigger(data); - return -ENOSYS; + return 0; } /**