diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-07-08 18:07:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-16 05:03:16 -0400 |
commit | 0725cbb97793d4e65bf148e4872959cdbb8c6ddd (patch) | |
tree | 884cf1e23cbff9021058e855acb98b90e3f31b86 /arch/x86/xen/enlighten.c | |
parent | 88459d4c7eb68c4a15609e00e5d100e2a305f040 (diff) |
xen64: add identity irq->vector map
The x86_64 interrupt subsystem is oriented towards vectors, as opposed
to a flat irq space as it is in x86-32. This patch adds a simple
identity irq->vector mapping so that we can continue to feed irqs into
do_IRQ() and get a good result.
Ideally x86_32 will unify with the 64-bit code and use vectors too.
At that point we can move to mapping event channels to vectors, which
will allow us to economise on irqs (so per-cpu event channels can
share irqs, rather than having to allocte one per cpu, for example).
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r-- | arch/x86/xen/enlighten.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 8b60982e457a..52f2292672c4 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1085,8 +1085,25 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = { | |||
1085 | }, | 1085 | }, |
1086 | }; | 1086 | }; |
1087 | 1087 | ||
1088 | static void __init __xen_init_IRQ(void) | ||
1089 | { | ||
1090 | #ifdef CONFIG_X86_64 | ||
1091 | int i; | ||
1092 | |||
1093 | /* Create identity vector->irq map */ | ||
1094 | for(i = 0; i < NR_VECTORS; i++) { | ||
1095 | int cpu; | ||
1096 | |||
1097 | for_each_possible_cpu(cpu) | ||
1098 | per_cpu(vector_irq, cpu)[i] = i; | ||
1099 | } | ||
1100 | #endif /* CONFIG_X86_64 */ | ||
1101 | |||
1102 | xen_init_IRQ(); | ||
1103 | } | ||
1104 | |||
1088 | static const struct pv_irq_ops xen_irq_ops __initdata = { | 1105 | static const struct pv_irq_ops xen_irq_ops __initdata = { |
1089 | .init_IRQ = xen_init_IRQ, | 1106 | .init_IRQ = __xen_init_IRQ, |
1090 | .save_fl = xen_save_fl, | 1107 | .save_fl = xen_save_fl, |
1091 | .restore_fl = xen_restore_fl, | 1108 | .restore_fl = xen_restore_fl, |
1092 | .irq_disable = xen_irq_disable, | 1109 | .irq_disable = xen_irq_disable, |