public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: mingo@redhat.com, hpa@zytor.com, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, alek.du@intel.com,
	jacob.jun.pan@intel.com,
	Suresh Siddha <suresh.b.siddha@intel.com>
Subject: [PATCH -v2] x86: remove left over nr_legacy_irqs
Date: Tue, 23 Feb 2010 20:27:48 -0800	[thread overview]
Message-ID: <4B84AAC4.2020204@kernel.org> (raw)
In-Reply-To: <4B84A846.1000805@kernel.org>

already in legacy_pic

-v2: there is one in ioapic_.c

Singed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 arch/x86/include/asm/irq.h     |    1 -
 arch/x86/kernel/apic/io_apic.c |    2 +-
 arch/x86/kernel/irqinit.c      |    7 ++-----
 3 files changed, 3 insertions(+), 7 deletions(-)

Index: linux-2.6/arch/x86/include/asm/irq.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/irq.h
+++ linux-2.6/arch/x86/include/asm/irq.h
@@ -48,6 +48,5 @@ extern DECLARE_BITMAP(used_vectors, NR_V
 extern int vector_used_by_percpu_irq(unsigned int vector);
 
 extern void init_ISA_irqs(void);
-extern int nr_legacy_irqs;
 
 #endif /* _ASM_X86_IRQ_H */
Index: linux-2.6/arch/x86/kernel/irqinit.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/irqinit.c
+++ linux-2.6/arch/x86/kernel/irqinit.c
@@ -99,9 +99,6 @@ int vector_used_by_percpu_irq(unsigned i
 	return 0;
 }
 
-/* Number of legacy interrupts */
-int nr_legacy_irqs __read_mostly = NR_IRQS_LEGACY;
-
 void __init init_ISA_irqs(void)
 {
 	int i;
@@ -114,7 +111,7 @@ void __init init_ISA_irqs(void)
 	/*
 	 * 16 old-style INTA-cycle interrupts:
 	 */
-	for (i = 0; i < NR_IRQS_LEGACY; i++) {
+	for (i = 0; i < legacy_pic->nr_legacy_irqs; i++) {
 		struct irq_desc *desc = irq_to_desc(i);
 
 		desc->status = IRQ_DISABLED;
@@ -138,7 +135,7 @@ void __init init_IRQ(void)
 	 * then this vector space can be freed and re-used dynamically as the
 	 * irq's migrate etc.
 	 */
-	for (i = 0; i < nr_legacy_irqs; i++)
+	for (i = 0; i < legacy_pic->nr_legacy_irqs; i++)
 		per_cpu(vector_irq, 0)[IRQ0_VECTOR + i] = i;
 
 	x86_init.irqs.intr_init();
Index: linux-2.6/arch/x86/kernel/apic/io_apic.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic/io_apic.c
+++ linux-2.6/arch/x86/kernel/apic/io_apic.c
@@ -1438,7 +1438,7 @@ static void setup_IO_APIC_irq(int apic_i
 	 * controllers like 8259. Now that IO-APIC can handle this irq, update
 	 * the cfg->domain.
 	 */
-	if (irq < nr_legacy_irqs && cpumask_test_cpu(0, cfg->domain))
+	if (irq < legacy_pic->nr_legacy_irqs && cpumask_test_cpu(0, cfg->domain))
 		apic->vector_allocation_domain(0, cfg->domain);
 
 	if (assign_irq_vector(irq, cfg, apic->target_cpus()))

  reply	other threads:[~2010-02-24  4:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-13  1:40 [PATCH 5/9] x86/ioapic: improve handling of i8259a irq init Pan, Jacob jun
2010-02-20  1:28 ` [tip:x86/mrst] x86, ioapic: Improve handling of i8259A " tip-bot for Alek Du
2010-02-24  2:49   ` [PATCH] x86: fix compiling warning with legacy_pci_xxx Yinghai Lu
2010-02-24  4:17     ` [PATCH] x86: remove left over nr_legacy_irqs Yinghai Lu
2010-02-24  4:27       ` Yinghai Lu [this message]
2010-02-24  8:09         ` [tip:x86/mrst] x86, legacy_irq: Remove " tip-bot for Yinghai Lu
2010-02-24 19:04         ` tip-bot for Yinghai Lu
2010-02-24 20:39         ` [PATCH] x86/pci: exclude mrst pci code for other platform Yinghai Lu
2010-02-24 21:03           ` Pan, Jacob jun
2010-02-24 21:44             ` H. Peter Anvin
2010-02-24 22:10               ` Yinghai Lu
2010-02-24 22:31                 ` H. Peter Anvin
2010-02-24 22:42                   ` Yinghai Lu
2010-02-25  0:41                     ` [PATCH] x86/mrst: add dependencies for Moorestown Pan, Jacob jun
2010-02-25  6:01                       ` Yinghai Lu
2010-02-25 22:27           ` [tip:x86/mrst] x86, pci: Exclude Moorestown PCI code if CONFIG_X86_MRST=n tip-bot for Yinghai Lu
2010-02-24  8:09     ` [tip:x86/mrst] x86, legacy_irq: Remove duplicate vector assigment tip-bot for Yinghai Lu
2010-02-24 19:04     ` tip-bot for Yinghai Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B84AAC4.2020204@kernel.org \
    --to=yinghai@kernel.org \
    --cc=alek.du@intel.com \
    --cc=hpa@zytor.com \
    --cc=jacob.jun.pan@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox