Rename init_IRQ to xen_init_IRQ
PATCH 1/1 Rename init_IRQ to xen_init_IRQ
Hi, Keir,
Attached patch renames init_IRQ to xen_init_IRQ, because ia64
version init_IRQ has some other special things to do. Instead of messing
arch specific logic into one common init_IRQ, this rename gives different
arch possibility to call xen evtchn specific initialization at right time.
In the start, I moved init_IRQ to x86 io_apic.c which however
doesn't
work if user compiles xen0/xenU by different configuration file because xenU doesn't compile io_apic by default. I'm not sure whether worthy of changing domU config file and then simply keep it within evtchn.c
After this small change, now the whole logic ofdrivers/xen/core/evtchn.c can be reused by other architectures. I've managed to make xen/ia64 working on top of this logic, and related ia64 side changes will be sent out later separately.
Signed-off-by Kevin Tian <[email protected]>
Thanks,
Kevin
Rename init_IRQ to xen_init_IRQ. After this change, now this file (evtchn.c) can be reused by other architecture like ia64.
Also one adjustment to header file inclusion sequence, to work around compilation issue on ia64.
Signed-off-by Kevin Tian <[email protected]>
linux-2.6-xen-sparse/drivers/xen/core/evtchn.c +8 -4
@@ -41,10 +41,10 @@#include <asm/system.h> #include <asm/ptrace.h> #include <asm/synch_bitops.h> +#include <xen/evtchn.h> #include <xen/interface/event_channel.h> #include <xen/interface/physdev.h> #include <asm/hypervisor.h> -#include <xen/evtchn.h> #include <linux/mc146818rtc.h> /* RTC_IRQ */ /*
@@ -163,6 +163,12 @@ static inline unsigned int cpu_from_evtc/* Upcall to generic IRQ layer. */ #ifdef CONFIG_X86 extern fastcall unsigned int do_IRQ(struct pt_regs *regs); +void __init xen_init_IRQ (void ); +void __init init_IRQ (void ) +{ +irq_ctx_init (0 ); +xen_init_IRQ (); +}#if defined (__i386__)static inline void exit_idle (void ) {}#define IRQ_REG orig_eax
@@ -804,12 +810,10 @@ void irq_resume(void) } } -void __init init_IRQ (void ) +void __init xen_init_IRQ (void ) {int i;int cpu; - -irq_ctx_init (0 );spin_lock_init (&irq_mapping_update_lock);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 5 lines · Kevin
In the start, I moved
init_IRQto x86io_apic.cwhich however
doesn't
work if user compiles xen0/xenU by different configuration file because xenU doesn't compileio_apicby default. I'm not sure whether worthy of changing domU config file and then simply keep it withinevtchn.c
How about we declare it in evtchn.c always, but attribute((weak))? It's small and is marked __init anyway, so no space concern really. And it'll avoid putting yet another thing in CONFIG_X86?
-- Keir