From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@osdl.org>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>, Andi Kleen <ak@muc.de>,
"Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>,
Andrew Morton <akpm@osdl.org>,
Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/3] i386/x86_64: Remove global IO_APIC_VECTOR
Date: Sun, 08 Oct 2006 07:43:46 -0600 [thread overview]
Message-ID: <m1bqomvs6l.fsf_-_@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <m1fydzudq8.fsf_-_@ebiederm.dsl.xmission.com> (Eric W. Biederman's message of "Sun, 08 Oct 2006 07:41:19 -0600")
Which vector an irq is assigned to now varies dynamically and is
not needed outside of io_apic.c. So remove the possibility
of accessing the information outside of io_apic.c and remove
the silly macro that makes looking for users of irq_vector
difficult.
The fact this compiles ensures there aren't any more pieces
of the old CONFIG_PCI_MSI weirdness that I failed to remove.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
arch/i386/kernel/io_apic.c | 12 ++++++------
arch/x86_64/kernel/io_apic.c | 8 ++++----
include/asm-i386/hw_irq.h | 3 ---
include/asm-x86_64/hw_irq.h | 2 --
4 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index b7287fb..cd082c3 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -1184,8 +1184,8 @@ static int __assign_irq_vector(int irq)
BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
- if (IO_APIC_VECTOR(irq) > 0)
- return IO_APIC_VECTOR(irq);
+ if (irq_vector[irq] > 0)
+ return irq_vector[irq];
current_vector += 8;
if (current_vector == SYSCALL_VECTOR)
@@ -1199,7 +1199,7 @@ static int __assign_irq_vector(int irq)
}
vector = current_vector;
- IO_APIC_VECTOR(irq) = vector;
+ irq_vector[irq] = vector;
return vector;
}
@@ -1967,7 +1967,7 @@ static void ack_ioapic_quirk_irq(unsigne
* operation to prevent an edge-triggered interrupt escaping meanwhile.
* The idea is from Manfred Spraul. --macro
*/
- i = IO_APIC_VECTOR(irq);
+ i = irq_vector[irq];
v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1));
@@ -1984,7 +1984,7 @@ static void ack_ioapic_quirk_irq(unsigne
static int ioapic_retrigger_irq(unsigned int irq)
{
- send_IPI_self(IO_APIC_VECTOR(irq));
+ send_IPI_self(irq_vector[irq]);
return 1;
}
@@ -2020,7 +2020,7 @@ static inline void init_IO_APIC_traps(vo
*/
for (irq = 0; irq < NR_IRQS ; irq++) {
int tmp = irq;
- if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) {
+ if (IO_APIC_IRQ(tmp) && !irq_vector[tmp]) {
/*
* Hmm.. We don't have an entry for this,
* so default to an old-fashioned 8259
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index 91728d9..9c3b9b1 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -587,8 +587,8 @@ static int __assign_irq_vector(int irq,
BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
- if (IO_APIC_VECTOR(irq) > 0)
- old_vector = IO_APIC_VECTOR(irq);
+ if (irq_vector[irq] > 0)
+ old_vector = irq_vector[irq];
if ((old_vector > 0) && cpu_isset(old_vector >> 8, mask)) {
return old_vector;
}
@@ -620,7 +620,7 @@ next:
}
per_cpu(vector_irq, cpu)[vector] = irq;
vector |= cpu << 8;
- IO_APIC_VECTOR(irq) = vector;
+ irq_vector[irq] = vector;
return vector;
}
return -ENOSPC;
@@ -1289,7 +1289,7 @@ static inline void init_IO_APIC_traps(vo
*/
for (irq = 0; irq < NR_IRQS ; irq++) {
int tmp = irq;
- if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) {
+ if (IO_APIC_IRQ(tmp) && !irq_vector[tmp]) {
/*
* Hmm.. We don't have an entry for this,
* so default to an old-fashioned 8259
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h
index 8806c7e..0bedbdf 100644
--- a/include/asm-i386/hw_irq.h
+++ b/include/asm-i386/hw_irq.h
@@ -26,9 +26,6 @@ #define NMI_VECTOR 0x02
* Interrupt entry/exit code at both C and assembly level
*/
-extern u8 irq_vector[NR_IRQ_VECTORS];
-#define IO_APIC_VECTOR(irq) (irq_vector[irq])
-
extern void (*interrupt[NR_IRQS])(void);
#ifdef CONFIG_SMP
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h
index 53d0d9f..792dd52 100644
--- a/include/asm-x86_64/hw_irq.h
+++ b/include/asm-x86_64/hw_irq.h
@@ -74,10 +74,8 @@ #define FIRST_SYSTEM_VECTOR 0xef /* du
#ifndef __ASSEMBLY__
-extern unsigned int irq_vector[NR_IRQ_VECTORS];
typedef int vector_irq_t[NR_VECTORS];
DECLARE_PER_CPU(vector_irq_t, vector_irq);
-#define IO_APIC_VECTOR(irq) (irq_vector[irq])
/*
* Various low-level irq details needed by irq.c, process.c,
--
1.4.2.rc3.g7e18e-dirty
next prev parent reply other threads:[~2006-10-08 13:45 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-05 21:22 2.6.19-rc1 genirq causes either boot hang or "do_IRQ: cannot handle IRQ -1" Muli Ben-Yehuda
2006-10-06 15:14 ` Eric W. Biederman
2006-10-06 15:50 ` Muli Ben-Yehuda
2006-10-06 16:20 ` Muli Ben-Yehuda
2006-10-06 19:00 ` Andrew Vasquez
2006-10-06 19:42 ` Andrew Morton
2006-10-06 20:02 ` Andrew Vasquez
2006-10-06 20:15 ` Linus Torvalds
2006-10-06 20:18 ` Andrew Morton
2006-10-06 20:42 ` Muli Ben-Yehuda
2006-10-06 20:14 ` Linus Torvalds
2006-10-06 19:53 ` Benjamin LaHaise
2006-10-06 17:47 ` Eric W. Biederman
2006-10-06 20:23 ` Muli Ben-Yehuda
2006-10-06 23:42 ` Eric W. Biederman
2006-10-07 8:03 ` Muli Ben-Yehuda
2006-10-07 16:52 ` Eric W. Biederman
2006-10-07 17:59 ` Muli Ben-Yehuda
2006-10-08 13:39 ` [PATCH 0/3] x86_64 irq fixes Eric W. Biederman
2006-10-08 13:41 ` [PATCH 1/3] i386/x86_64: FIX pci_enable_irq to set dev->irq to the irq number Eric W. Biederman
2006-10-08 13:43 ` Eric W. Biederman [this message]
2006-10-08 13:47 ` [PATCH 3/3] x86_64 irq: Allocate a vector across all cpus for genapic_flat Eric W. Biederman
2006-10-08 19:01 ` Muli Ben-Yehuda
2006-10-08 18:59 ` [PATCH 0/3] x86_64 irq fixes Muli Ben-Yehuda
2006-10-07 19:03 ` 2.6.19-rc1 genirq causes either boot hang or "do_IRQ: cannot handle IRQ -1" Linus Torvalds
2006-10-07 19:33 ` Arjan van de Ven
2006-10-07 19:57 ` Linus Torvalds
2006-10-09 6:06 ` Eric W. Biederman
2006-10-09 7:40 ` Arjan van de Ven
2006-10-09 14:46 ` Eric W. Biederman
2006-10-09 15:28 ` Protasevich, Natalie
2006-10-09 15:39 ` Arjan van de Ven
2006-10-09 16:02 ` 2.6.19-rc1 genirq causes either boot hang or "do_IRQ: cannothandle " Protasevich, Natalie
2006-10-07 20:24 ` 2.6.19-rc1 genirq causes either boot hang or "do_IRQ: cannot handle " Eric W. Biederman
2006-10-06 16:02 ` Linus Torvalds
2006-10-06 17:22 ` Eric W. Biederman
2006-10-06 18:08 ` Linus Torvalds
2006-10-06 18:48 ` Eric W. Biederman
2006-10-09 5:41 ` [PATCH 1/1] x86_64 irq: Scream but don't die if we receive an unexpected irq Eric W. Biederman
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=m1bqomvs6l.fsf_-_@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=Natalie.Protasevich@UNISYS.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=muli@il.ibm.com \
--cc=tglx@linutronix.de \
--cc=torvalds@osdl.org \
/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
Powered by JetHome