|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH][PVOPS] preserve chip_data when initializing irq in x
When running latest xen/stable-2.6.31.x as dom0 it crashes during boot with a
stacktrace that looks like this.
do_page_fault
add_pin_to_irq_node
setup_IO_APIC_irq_extra
sysfs_create_group
acpi_ev_sci_xrupt_handler
acpi_sci_to_irq
acpi_os_install_interrupt_handler
acpi_ev_install_sci_handler
acpi_enable_subsystem
acpi_init
pci_slot_init
acpi_init
do_one_initcall
kernel_init
This only happens when the kernel is configured with CONFIG_SPARSE_IRQ=n.
This crash appeared since the upstream patch
x86: Fix SCI on IOAPIC != 0
(http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=commitdiff;h=d539e5576605d048e6aeb21cbe3a8e71dc5eea81)
from the stable 2.6.31.13 series.
The crash happens in add_pin_to_irq_node because irq_cfg, that is taken from
irq_desc.chip_data, is null.
In xen/stable-2.6.32.x this doesnt happen currently, because of the removement
of the xen apic-code. This has the effect that the call to mp_find_ioapic in
setup_IO_APIC_irq_extra returns -1 and the function aborts before the code is
reached where the crash happens.
The root-problem is that in xen_allocate_pirq the chip_data is cleared by the
call to dynamic_irq_init. The attached patch fixes this by reinserting
chip_data after the call to dynamic_irq_init.
For 2.6.32 the code can be simplified so i attached a separate patch for
xen/stable-2.6.32.x
========== patch for xen/stable-2.6.31.x
Preserve irq_desc.chip_data when calling dynamic_irq_init, as its needed later
in setup_IO_APIC_irq_extra.
Signed-off-by: Ronny.Hegewald@xxxxxxxxx
--- drivers/xen/events.c.org 2010-09-20 21:07:49.000000000 +0000
+++ drivers/xen/events.c 2010-09-29 01:11:20.000000000 +0000
@@ -559,6 +559,8 @@ int xen_allocate_pirq(unsigned gsi, int
{
int irq;
struct physdev_irq irq_op;
+ struct irq_desc* desc;
+ void* chip_data;
spin_lock(&irq_mapping_update_lock);
@@ -573,8 +575,10 @@ int xen_allocate_pirq(unsigned gsi, int
* we are using the !xen_initial_domain() to drop in the function.*/
if (identity_mapped_irq(gsi) || !xen_initial_domain()) {
irq = gsi;
- irq_to_desc_alloc_node(irq, 0);
+ desc = irq_to_desc_alloc_node(irq, 0);
+ chip_data = desc->chip_data;
dynamic_irq_init(irq);
+ desc->chip_data = chip_data;
} else
irq = find_unbound_irq();
========== patch for xen/stable-2.6.32.x
Preserve irq_desc.chip_data when calling dynamic_irq_init, as its needed later
in setup_IO_APIC_irq_extra.
Signed-off-by: Ronny.Hegewald@xxxxxxxxx
--- drivers/xen/events.c.org 2010-09-28 23:45:41.000000000 +0000
+++ drivers/xen/events.c 2010-09-28 23:46:11.000000000 +0000
@@ -602,7 +602,7 @@
if (identity_mapped_irq(gsi) || !xen_initial_domain()) {
irq = gsi;
irq_to_desc_alloc_node(irq, 0);
- dynamic_irq_init(irq);
+ dynamic_irq_init_keep_chip_data(irq);
} else
irq = find_unbound_irq();
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH][PVOPS] preserve chip_data when initializing irq in xen_allocate_pirq,
Ronny Hegewald <=
|
|
|
|
|