Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755176Ab0KXNxW (ORCPT ); Wed, 24 Nov 2010 08:53:22 -0500 Received: from www.tglx.de ([62.245.132.106]:41136 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754545Ab0KXNxV (ORCPT ); Wed, 24 Nov 2010 08:53:21 -0500 Date: Wed, 24 Nov 2010 14:53:14 +0100 (CET) From: Thomas Gleixner To: Haojian Zhuang cc: linux-kernel , linux-arm-kernel Subject: Re: [question] NR_IRQS in genirq In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) 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 Content-Length: 1085 Lines: 26 On Wed, 24 Nov 2010, Haojian Zhuang wrote: > On Wed, Nov 24, 2010 at 9:18 PM, Thomas Gleixner wrote: > > Why can nr_irqs become larger? Is that a theoretical problem or did > > you run into this ? > > My hardware environment is ARM. Each machine description can specify > nr_irqs. In my implementation of PXA, NR_IRQS is fixed for SoC > internal IRQs. And there's some additional board IRQs, we arrange them > between NR_IRQS and nr_irqs. So nr_irqs will be larger than NR_IRQS if > board IRQs exists. And that's wrong. NR_IRQS is the upper bound. nr_irqs is the runtime bound which is supposed to be <= NR_IRQS. The whole point of sparse_irq is that it does not statically allocate irq_desc[NR_IRQS] to reduce memory consumption if only a small number of irqs are actuallt used by a specific board. Thanks, tglx -- 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/