From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755018AbbDIMvl (ORCPT ); Thu, 9 Apr 2015 08:51:41 -0400 Received: from www.linutronix.de ([62.245.132.108]:47274 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751451AbbDIMvk (ORCPT ); Thu, 9 Apr 2015 08:51:40 -0400 Date: Thu, 9 Apr 2015 14:52:00 +0200 (CEST) From: Thomas Gleixner To: Marc Zyngier cc: Ingo Molnar , "jiang.liu@linux.intel.com" , "linux-kernel@vger.kernel.org" , "hpa@zytor.com" , "linux-tip-commits@vger.kernel.org" Subject: Re: [tip:irq/core] genirq: MSI: Fix freeing of unallocated MSI In-Reply-To: <20150409134246.6442ede0@why.wild-wind.fr.eu.org> Message-ID: References: <1422299419-6051-1-git-send-email-marc.zyngier@arm.com> <20150409120023.GA12468@gmail.com> <20150409134246.6442ede0@why.wild-wind.fr.eu.org> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 9 Apr 2015, Marc Zyngier wrote: > On Thu, 9 Apr 2015 13:00:23 +0100 > Ingo Molnar wrote: > > > > Hm, so this appears to be the first time that 'irq == 0' assumptions > > are getting into the genirq core. Is NO_IRQ dead? I realize that the > > MSI code uses '!irq' as a flag, but still, quite a few architectures > > define NO_IRQ so it appears to matter to them. > > NO_IRQ strikes back, everybody takes cover! ;-) > > More seriously, this seems to be two schools of thoughts on that one. > The irqdomain subsystem seems to treat 'irq == 0' as the indication that > 'this is not a valid IRQ', and so does MSI (as you noticed). Given that > this code deals with MSI in conjunction with irqdomains, it felt > natural to adopt the same convention. > > Also, not all the architecture are defining NO_IRQ, and it only seems > to be used in code that is doesn't look portable across architectures. > Either these architecture don't care about MSI, or they are happy > enough to consider that virtual interrupt 0 is invalid in the MSI case. > > So I'm a bit lost on that one. I sincerely thought NO_IRQ was being > retired (https://lwn.net/Articles/470820/). Should we introduce a > NO_MSI_IRQ (set to zero) to take care of this case? Nah, that'd be overkill. irq 0 is invalid for MSI in any case so we really should stick with that convention. Thanks, tglx