From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758677AbcAKIEx (ORCPT ); Mon, 11 Jan 2016 03:04:53 -0500 Received: from www.linutronix.de ([62.245.132.108]:44864 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758042AbcAKIEw (ORCPT ); Mon, 11 Jan 2016 03:04:52 -0500 Date: Mon, 11 Jan 2016 09:03:51 +0100 (CET) From: Thomas Gleixner To: =?GB2312?Q?Zhou_Qiao=28=D6=DC=C7=C8=29?= cc: jason@lakedaemon.net, linux-kernel@vger.kernel.org Subject: Re: [Questions]: how to extend nr_irqs for arch arm64 In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1968481448-1452499431=:3575" 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1968481448-1452499431=:3575 Content-Type: TEXT/PLAIN; charset=gb2312 Content-Transfer-Encoding: 8BIT On Mon, 11 Jan 2016, Zhou Qiao(ÖÜÇÈ) wrote: > The nr_irqs is set to NR_IRQS by default and NR_IRQS is small(64). Arch/arm > platforms will re-set nr_irqs to a larger value. I didn't find similar way > for arm64. The way I can think of is to redefine NR_IRQS. But according > comments in include/asm-generic/irq.h, NR_IRQS should not be a large > value. so what's the preferred way to extend nr_irqs, for arm64 > specifically? Thanks in advance. With SPARSE_IRQ enabled the core will modify nr_irqs with the following mechanims: - Early boot: arch_probe_nr_irqs(). If the return value of that function is > NR_IRQS then it will be set to that. This is used for interrupts which have to be allocated and assigned in early boot, but that's really only for legacy purposes. So arm64 should not use that at all. - Runtime: The core dynamically increases nr_irqs up to IRQ_BITMAP_BITS, which is NR_IRQS + 8192. The runtime increase is happening, when interrupts are allocated. And you won't notice unless you try to extend nr_irqs above NR_IRQS + 8192. So there is nothing to do for arm64, it should just work. Thanks, tglx --8323329-1968481448-1452499431=:3575--