Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754946AbbDOJkP (ORCPT ); Wed, 15 Apr 2015 05:40:15 -0400 Received: from mail.codelabs.ch ([217.150.249.120]:44888 "EHLO fenrir.codelabs.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753481AbbDOJkL (ORCPT ); Wed, 15 Apr 2015 05:40:11 -0400 Message-ID: <552E31F8.5090407@codelabs.ch> Date: Wed, 15 Apr 2015 11:40:08 +0200 From: Adrian-Ken Rueegsegger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: Thomas Gleixner CC: linux-kernel@vger.kernel.org Subject: Re: [PATCH] genirq: Only call irq_ack if implemented by chip References: <1429007347-7167-1-git-send-email-ken@codelabs.ch> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1923 Lines: 45 Hi, On 04/14/2015 08:00 PM, Thomas Gleixner wrote: > On Tue, 14 Apr 2015, Adrian-Ken Rueegsegger wrote: >> Restore the check if an IRQ chip implements the irq_ack function prior >> to its invocation. Commit 22a49163e90d ("genirq: Provide compat handling >> for chip->ack()") removed the check from handle_edge_irq while keeping >> the check in other call paths. > > How's an edge triggered interrupt without ack supposed to work? > > You are missing to describe which problem you solve. I am running Linux as a VM on top of the Muen Separation Kernel (SK) [1], where we have implemented PCI device passthrough using VT-d. In this case the hardware interrupt is handled by the SK/hypervisor and injected to Linux. To support PCI MSI(-X), we register our own platform-specific MSI operations (x86_msi.setup_msi_irqs, etc) and implement an irq_chip that simply provides the irq_mask and irq_unmask operations (by reusing the "regular" mask_msi_irq/unmask_msi_irq). After encountering a null pointer dereference due to the irq_chip not providing an irq_ack operation, I examined the commit that changed the source of the irq_ack call, noticing that only the check in handle_edge_irq was dropped while the other call sites were kept. As the commit message did not provide me with additional information for that particular fragment of the change, I (prematurely) concluded that it was not intentional. If it is a prerequisite for IRQ chips to provide the irq_ack operation when used in conjunction with handle_edge_irq, then please ignore my patch. In that case, I will adjust our chip implementation accordingly. Thanks for your time, Adrian [1] - http://muen.codelabs.ch/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/