From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [RFC Patch 3/3] x86, irq: count legacy IRQs by legacy_pic->nr_legacy_irqs instead of NR_IRQS_LEGACY Date: Thu, 5 Jun 2014 10:15:29 +0200 (CEST) Message-ID: References: <1401951877-23032-1-git-send-email-jiang.liu@linux.intel.com> <1401951877-23032-4-git-send-email-jiang.liu@linux.intel.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: In-Reply-To: <1401951877-23032-4-git-send-email-jiang.liu@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org To: Jiang Liu Cc: "H. Peter Anvin" , Yinghai Lu , Sebastian Andrzej Siewior , Ingo Molnar , x86@kernel.org, "Rafael J. Wysocki" , Len Brown , Pavel Machek , Konrad Rzeszutek Wilk , Bjorn Helgaas , Grant Likely , Rob Herring , Michal Simek , Tony Lindgren , linux-kernel@vger.kernel.org, Ingo Molnar , linux-pm@vger.kernel.org, xen-devel@lists.xenproject.org, linux-pci@vger.kernel.org List-Id: linux-pm@vger.kernel.org On Thu, 5 Jun 2014, Jiang Liu wrote: > Some platforms, such as Intel MID and mshypv, do not support legacy > interrupt controllers. So count legacy IRQs by legacy_pic->nr_legacy_irqs > instead of hard-coded NR_IRQS_LEGACY. Nice patch set! > Signed-off-by: Jiang Liu > --- > arch/x86/include/asm/i8259.h | 2 ++ > arch/x86/kernel/acpi/boot.c | 13 ++++++------ > arch/x86/kernel/apic/io_apic.c | 43 +++++++++++++++++++++++----------------- > arch/x86/kernel/devicetree.c | 12 +++++------ > arch/x86/kernel/irqinit.c | 6 +++--- > arch/x86/pci/xen.c | 6 +++--- > 6 files changed, 46 insertions(+), 36 deletions(-) > > diff --git a/arch/x86/include/asm/i8259.h b/arch/x86/include/asm/i8259.h > index a20365953bf8..fdac75b8782a 100644 > --- a/arch/x86/include/asm/i8259.h > +++ b/arch/x86/include/asm/i8259.h > @@ -67,4 +67,6 @@ struct legacy_pic { > extern struct legacy_pic *legacy_pic; > extern struct legacy_pic null_legacy_pic; > > +#define nr_legacy_irqs() (legacy_pic->nr_legacy_irqs) That wants to be a static inline, please. Thanks, tglx