From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [RFC Part2 v1 02/21] genirq: Introduce helper functions to support stacked irq_chip Date: Wed, 17 Sep 2014 13:58:55 -0700 (PDT) Message-ID: References: <1410444228-3134-1-git-send-email-jiang.liu@linux.intel.com> <1410444228-3134-3-git-send-email-jiang.liu@linux.intel.com> <5418FAE1.4030008@linux.intel.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from www.linutronix.de ([62.245.132.108]:51519 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756757AbaIQU7y (ORCPT ); Wed, 17 Sep 2014 16:59:54 -0400 In-Reply-To: <5418FAE1.4030008@linux.intel.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Jiang Liu Cc: Benjamin Herrenschmidt , Ingo Molnar , "H. Peter Anvin" , "Rafael J. Wysocki" , Bjorn Helgaas , Randy Dunlap , Yinghai Lu , Borislav Petkov , Grant Likely , Marc Zyngier , Konrad Rzeszutek Wilk , Andrew Morton , Tony Luck , Joerg Roedel , Greg Kroah-Hartman , x86@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org On Wed, 17 Sep 2014, Jiang Liu wrote: > On 2014/9/17 1:45, Thomas Gleixner wrote: > > On Thu, 11 Sep 2014, Jiang Liu wrote: > >> +#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY > >> +void irq_chip_ack_parent(struct irq_data *data) > >> +{ > >> + data = data->parent_data; > >> + if (data && data->chip && data->chip->irq_ack) > >> + data->chip->irq_ack(data); > > > > Why is this restricted to a single parent level and does not go down > > the whole stack? > Hi Thomas, > It happens to work on x86, and we want to achieve a bit > performance advantage by not walking down the whole stack. > If preferred, I will change it to walk the whole stack. Happens to work on my machine is always a bad argument :) Now, I can see why you want to do that, but if we do an optimization like that then we should really get rid of the conditional. You surely need a conditional on data->chip and data->chip->callback for a full stackq walk, but for an explicit request to use the parents ack the parent better has a chip with an ack function, right? void irq_chip_ack_parent(struct irq_data *data) { data = data->parent_data; data->chip->irq_ack(data); } Thanks, tglx