From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753331AbdA3Ndo (ORCPT ); Mon, 30 Jan 2017 08:33:44 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:58913 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753115AbdA3Ndh (ORCPT ); Mon, 30 Jan 2017 08:33:37 -0500 Date: Mon, 30 Jan 2017 14:32:02 +0100 (CET) From: Thomas Gleixner To: David Daney cc: Marc Zyngier , Linux Kernel Mailing List , Linus Walleij Subject: Re: irq domain hierarchy vs. chaining w/ PCI MSI-X... In-Reply-To: <6e6c3406-c4e9-1195-168b-934bbc55c6c4@caviumnetworks.com> Message-ID: References: <1d63e28e-f358-9948-d190-8dadd5764057@arm.com> <2db49a5f-5846-206c-d2bc-cfac96725946@caviumnetworks.com> <859a8ddd-a101-9c05-6ff1-d63b7326311d@arm.com> <6e6c3406-c4e9-1195-168b-934bbc55c6c4@caviumnetworks.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 13 Jan 2017, David Daney wrote: > At the point where the handle_*_irq() functions call handle_irq_event(), we > need to 9optionally) do something both immediately before and after the call > to handle_irq_event(). > > In irq_chip add a function: > > void (*irq_handle)(struct irq_data *data, struct irq_desc *desc); > > Really this is the per irq_chip flow handler. > > Then in handle_fasteoi_irq() and probably the other flow handlers as well: > > . > . > . > if (chip->irq_handle) > chip->irq_handle(&desc->irq_data, desc); > else > handle_irq_event(desc); > . > . > . > > Those 4 lines of code could be factored out into a helper function in chip.c And why don't you just write a flow handler function which does exactly what you need instead of adding more conditionals into all hotpath functions? Thanks, tglx