From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750700AbVKUVUF (ORCPT ); Mon, 21 Nov 2005 16:20:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750737AbVKUVUF (ORCPT ); Mon, 21 Nov 2005 16:20:05 -0500 Received: from gate.crashing.org ([63.228.1.57]:5321 "EHLO gate.crashing.org") by vger.kernel.org with ESMTP id S1750700AbVKUVUD (ORCPT ); Mon, 21 Nov 2005 16:20:03 -0500 Subject: Re: [PATCH 4/5] Centralise NO_IRQ definition From: Benjamin Herrenschmidt To: Linus Torvalds Cc: Matthew Wilcox , David Howells , Andrew Morton , Ingo Molnar , linux-kernel@vger.kernel.org, Russell King , Ian Molton , Paul Mackerras In-Reply-To: References: <24299.1132571556@warthog.cambridge.redhat.com> <20051121121454.GA1598@parisc-linux.org> <20051121190632.GG1598@parisc-linux.org> <20051121194348.GH1598@parisc-linux.org> Content-Type: text/plain Date: Tue, 22 Nov 2005 08:16:15 +1100 Message-Id: <1132607776.26560.23.camel@gaston> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > The fact is, 0 _is_ special. Not just for hardware, but because 0 has a > magical meaning as "false" in the C language. I don't agree, irq 0 has been a valid irq on a number of platforms for ages (including your own G5, at least some of them have the SATA irq at 0 :) and this didn't cause any problem for most drivers. The few ones that have done broken assumption have been easily fixed using NO_IRQ. "Translating" it means some ugly translation work all over the place, which means overhead in the interrupt path (ok, not that much but still), plus finding some magic number to put 0 on, which makes things much more complicated for archs that have interrupts sorted in nice blocks of power of two, etc... a significant burden on arch/PIC code for no good reason imho. I hate arbitrary "translations" when they aren't strictly necessary. It's common to have a constant for a "not valid" number in spaces where "0" is a valid value, I don't think that "looking simpler" to dump driver writers is worth it in this case. Ben.