[PATCH 4/16] provide native irq initialization function

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: <akpm@...>, <rusty@...>, <ak@...>, <mingo@...>, <chrisw@...>, <jeremy@...>, <avi@...>, <anthony@...>, <virtualization@...>, <lguest@...>, <kvm-devel@...>, <zach@...>, <tglx@...>, <jun.nakajima@...>, <glommer@...>, Glauber de Oliveira Costa <gcosta@...>, Steven Rostedt <rostedt@...>
Date: Wednesday, October 31, 2007 - 3:14 pm

The interrupt initialization routine becomes native_init_IRQ and will
be overriden later in case paravirt is on. The interrupt array is made visible
for guests such lguest, that will need to have their own initialization
mechanism (though using most of the same irq lines) later on.

Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Jeremy Fitzhardinge <jeremy@xensource.com>
---
 arch/x86/kernel/i8259_64.c |    7 +++++--
 include/asm-x86/irq_64.h   |    3 +++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/i8259_64.c b/arch/x86/kernel/i8259_64.c
index 3f27ea0..892eab8 100644
--- a/arch/x86/kernel/i8259_64.c
+++ b/arch/x86/kernel/i8259_64.c
@@ -76,7 +76,7 @@ BUILD_16_IRQS(0xc) BUILD_16_IRQS(0xd) BUILD_16_IRQS(0xe) BUILD_16_IRQS(0xf)
 	IRQ(x,c), IRQ(x,d), IRQ(x,e), IRQ(x,f)
 
 /* for the irq vectors */
-static void (*interrupt[NR_VECTORS - FIRST_EXTERNAL_VECTOR])(void) = {
+void (*interrupt[NR_VECTORS - FIRST_EXTERNAL_VECTOR])(void) = {
 					  IRQLIST_16(0x2), IRQLIST_16(0x3),
 	IRQLIST_16(0x4), IRQLIST_16(0x5), IRQLIST_16(0x6), IRQLIST_16(0x7),
 	IRQLIST_16(0x8), IRQLIST_16(0x9), IRQLIST_16(0xa), IRQLIST_16(0xb),
@@ -448,7 +448,10 @@ void __init init_ISA_irqs (void)
 	}
 }
 
-void __init init_IRQ(void)
+/* Overridden in paravirt.c */
+void init_IRQ(void) __attribute__((weak, alias("native_init_IRQ")));
+
+void __init native_init_IRQ(void)
 {
 	int i;
 
diff --git a/include/asm-x86/irq_64.h b/include/asm-x86/irq_64.h
index 5006c6e..4f02446 100644
--- a/include/asm-x86/irq_64.h
+++ b/include/asm-x86/irq_64.h
@@ -46,6 +46,9 @@ static __inline__ int irq_canonicalize(int irq)
 extern void fixup_irqs(cpumask_t map);
 #endif
 
+#include <linux/init.h>
+void native_init_IRQ(void);
+
 #define __ARCH_HAS_DO_SOFTIRQ 1
 
 #endif /* _ASM_IRQ_H */
-- 
1.4.4.2

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/7] (Re-)introducing pvops for x86_64 - Real pvops w..., Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 1/16] Wipe out traditional opt from x86_64 Makefile, Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 2/16] paravirt hooks at entry functions., Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit para..., Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
Re: [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit ..., Jeremy Fitzhardinge, (Thu Nov 1, 12:48 am)
Re: [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit ..., Glauber de Oliveira Costa..., (Thu Nov 1, 9:48 am)
Re: [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit ..., Jeremy Fitzhardinge, (Thu Nov 1, 11:30 am)
Re: [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit ..., Jeremy Fitzhardinge, (Thu Nov 1, 1:41 pm)
Re: [Lguest] [PATCH 3/16] read/write_crX, clts and wbinvd fo..., Jeremy Fitzhardinge, (Thu Nov 1, 9:21 pm)
Re: [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit ..., Glauber de Oliveira Costa..., (Thu Nov 1, 12:13 pm)
[PATCH 4/16] provide native irq initialization function, Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 5/16] report ring kernel is running without paravirt, Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 6/16] export math_state_restore, Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 7/16] native versions for set pagetables, Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 8/16] add native functions for descriptors handling, Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 9/16] This patch add provisions for time related func..., Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 10/16] export cpu_gdt_descr, Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 11/16] turn priviled operation into a macro in head_6..., Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
Re: [PATCH 11/16] turn priviled operation into a macro in he..., Jeremy Fitzhardinge, (Thu Nov 1, 12:50 am)
Re: [PATCH 11/16] turn priviled operation into a macro in he..., Glauber de Oliveira Costa..., (Thu Nov 1, 9:50 am)
[PATCH 12/16] tweak io_64.h for paravirt., Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 13/16] native versions for page table entries values, Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 14/16] prepare x86_64 architecture initialization for..., Glauber de Oliveira Costa..., (Wed Oct 31, 3:14 pm)
[PATCH 15/16] consolidation of paravirt for 32 and 64 bits, Glauber de Oliveira Costa..., (Wed Oct 31, 3:15 pm)
[PATCH 16/16] make vsmp a paravirt client, Glauber de Oliveira Costa..., (Wed Oct 31, 3:15 pm)
Re: [PATCH 16/16] make vsmp a paravirt client, Jeremy Fitzhardinge, (Thu Nov 1, 12:38 am)