Re: [PATCH 36 of 38] xen: route hardware irqs via Xen




+#ifdef CONFIG_XEN_PCI
+ irq = xen_register_gsi(gsi, triggering, polarity);
+ if ((int)irq >= 0)
+ return irq;
+#endif

why not change irq to 'int' and avoid the cast?

also, please eliminate the #ifdef by turning xen_register_gsi() into a
'return -1' inline on !CONFIG_XEN_PCI.

+#ifdef CONFIG_XEN_PCI
+ xen_pci_init();
+#endif

hide the #ifdef in a header please. (like you already properly do for
xen_setup_pirqs())

+ if (rc != 0) {
if (!probing_irq(irq))
printk(KERN_INFO "Failed to obtain physical IRQ %d\n",
irq);
+ dump_stack();

generally it's better to use WARN() or WARN_ONCE() to get good debug
feedback and stackdumps. (they also document the reason for the dump)

@@ -523,8 +526,6 @@
} else
irq = find_unbound_irq();

- spin_unlock(&irq_mapping_update_lock);
-
set_irq_chip_and_handler_name(irq, &xen_pirq_chip,
handle_level_irq, "pirq");

hm, looks like a stray bugfix?

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • [PATCH] sparse_irq aka dyn_irq v10
    ... it is getting some big now..., may split it to two patch: one only have sparse irq but don't move irq_desc ... +#ifdef CONFIG_SPARSE_IRQ ... static struct irq_cfg *irq_cfg(unsigned int irq) ...
    (Linux-Kernel)
  • [PATCH 1/2] irq: sparseirq enabling
    ... +#ifdef CONFIG_SPARSE_IRQ ... unsigned int reg; ... Reroute an IRQ to a different pin. ...
    (Linux-Kernel)
  • [PATCH] sparse_irq aka dyn_irq v11
    ... +#ifdef CONFIG_SPARSE_IRQ ... static struct irq_cfg *irq_cfg(unsigned int irq) ... Reroute an IRQ to a different pin. ...
    (Linux-Kernel)
  • [PATCH 1/2] irq: sparseirq enabling v2
    ... +#ifdef CONFIG_SPARSE_IRQ ... unsigned int reg; ... Reroute an IRQ to a different pin. ...
    (Linux-Kernel)
  • Re: [PATCH 6/7] rename io_apic_64.c to io_apic.c
    ... static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value) ... +#ifdef CONFIG_INTR_REMAP ... Find the IRQ entry number of a certain pin. ...
    (Linux-Kernel)