From: "Jan Beulich" Subject: [PATCH] irq cleanup Date: Tue, 27 Oct 2009 11:50:24 +0000 Message-ID: <4AE6EC90020000780001C2E9@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Make IRQ related data const or __read_mostly where possible/reasonable, use platform_legacy_irq() where feasible, and remove the now unused definition of vector_to_irq(). Signed-off-by: Jan Beulich --- 2009-10-27.orig/xen/arch/ia64/linux-xen/iosapic.c 2009-06-05 = 11:59:48.000000000 +0200 +++ 2009-10-27/xen/arch/ia64/linux-xen/iosapic.c 2009-10-27 = 12:04:10.000000000 +0100 @@ -430,7 +430,7 @@ iosapic_end_level_irq (unsigned int irq) #define iosapic_disable_level_irq mask_irq #define iosapic_ack_level_irq nop =20 -struct hw_interrupt_type irq_type_iosapic_level =3D { +static hw_irq_controller irq_type_iosapic_level =3D { .typename =3D "IO-SAPIC-level", .startup =3D iosapic_startup_level_irq, .shutdown =3D iosapic_shutdown_level_irq, @@ -476,7 +476,7 @@ iosapic_ack_edge_irq (unsigned int irq) #define iosapic_disable_edge_irq nop #define iosapic_end_edge_irq nop =20 -struct hw_interrupt_type irq_type_iosapic_edge =3D { +static hw_irq_controller irq_type_iosapic_edge =3D { .typename =3D "IO-SAPIC-edge", .startup =3D iosapic_startup_edge_irq, .shutdown =3D iosapic_disable_edge_irq, @@ -605,7 +605,7 @@ register_intr (unsigned int gsi, int vec unsigned long polarity, unsigned long trigger) { irq_desc_t *idesc; - struct hw_interrupt_type *irq_type; + hw_irq_controller *irq_type; int rte_index; int index; unsigned long gsi_base; --- 2009-10-27.orig/xen/arch/ia64/linux-xen/irq_ia64.c 2009-03-31 = 17:55:50.000000000 +0200 +++ 2009-10-27/xen/arch/ia64/linux-xen/irq_ia64.c 2009-10-27 = 12:04:10.000000000 +0100 @@ -233,7 +233,7 @@ void ia64_process_pending_intr(void) #ifdef CONFIG_SMP extern irqreturn_t handle_IPI (int irq, void *dev_id, struct pt_regs = *regs); =20 -static struct irqaction ipi_irqaction =3D { +static struct irqaction __read_mostly ipi_irqaction =3D { .handler =3D handle_IPI, #ifndef XEN .flags =3D SA_INTERRUPT, --- 2009-10-27.orig/xen/arch/ia64/linux-xen/mca.c 2009-05-27 = 13:54:05.000000000 +0200 +++ 2009-10-27/xen/arch/ia64/linux-xen/mca.c 2009-10-27 12:04:10.0000000= 00 +0100 @@ -1563,7 +1563,7 @@ ia64_mca_disable_cpe_polling(char *str) =20 __setup("disable_cpe_poll", ia64_mca_disable_cpe_polling); =20 -static struct irqaction cmci_irqaction =3D { +static struct irqaction __read_mostly cmci_irqaction =3D { .handler =3D ia64_mca_cmc_int_handler, #ifndef XEN .flags =3D SA_INTERRUPT, @@ -1571,7 +1571,7 @@ static struct irqaction cmci_irqaction =3D .name =3D "cmc_hndlr" }; =20 -static struct irqaction cmcp_irqaction =3D { +static struct irqaction __read_mostly cmcp_irqaction =3D { .handler =3D ia64_mca_cmc_int_caller, #ifndef XEN .flags =3D SA_INTERRUPT, @@ -1579,7 +1579,7 @@ static struct irqaction cmcp_irqaction =3D .name =3D "cmc_poll" }; =20 -static struct irqaction mca_rdzv_irqaction =3D { +static struct irqaction __read_mostly mca_rdzv_irqaction =3D { .handler =3D ia64_mca_rendez_int_handler, #ifndef XEN .flags =3D SA_INTERRUPT, @@ -1587,7 +1587,7 @@ static struct irqaction mca_rdzv_irqacti .name =3D "mca_rdzv" }; =20 -static struct irqaction mca_wkup_irqaction =3D { +static struct irqaction __read_mostly mca_wkup_irqaction =3D { .handler =3D ia64_mca_wakeup_int_handler, #ifndef XEN .flags =3D SA_INTERRUPT, @@ -1596,7 +1596,7 @@ static struct irqaction mca_wkup_irqacti }; =20 #ifdef CONFIG_ACPI -static struct irqaction mca_cpe_irqaction =3D { +static struct irqaction __read_mostly mca_cpe_irqaction =3D { .handler =3D ia64_mca_cpe_int_handler, #ifndef XEN .flags =3D SA_INTERRUPT, @@ -1604,7 +1604,7 @@ static struct irqaction mca_cpe_irqactio .name =3D "cpe_hndlr" }; =20 -static struct irqaction mca_cpep_irqaction =3D { +static struct irqaction __read_mostly mca_cpep_irqaction =3D { .handler =3D ia64_mca_cpe_int_caller, #ifndef XEN .flags =3D SA_INTERRUPT, --- 2009-10-27.orig/xen/arch/ia64/linux-xen/perfmon.c 2009-07-15 = 16:34:16.000000000 +0200 +++ 2009-10-27/xen/arch/ia64/linux-xen/perfmon.c 2009-10-27 = 12:04:10.000000000 +0100 @@ -6811,7 +6811,7 @@ pfm_flush_pmds(struct task_struct *task, #endif } =20 -static struct irqaction perfmon_irqaction =3D { +static struct irqaction __read_mostly perfmon_irqaction =3D { .handler =3D pfm_interrupt_handler, #ifndef XEN .flags =3D SA_INTERRUPT, --- 2009-10-27.orig/xen/arch/ia64/linux-xen/sn/kernel/irq.c 2008-10-24 = 11:21:38.000000000 +0200 +++ 2009-10-27/xen/arch/ia64/linux-xen/sn/kernel/irq.c 2009-10-27 = 12:04:10.000000000 +0100 @@ -221,7 +221,7 @@ static void sn_set_affinity_irq(unsigned } #endif =20 -struct hw_interrupt_type irq_type_sn =3D { +static hw_irq_controller irq_type_sn =3D { #ifndef XEN .name =3D "SN hub", #else --- 2009-10-27.orig/xen/arch/ia64/linux/irq_lsapic.c 2005-11-17 = 15:51:03.000000000 +0100 +++ 2009-10-27/xen/arch/ia64/linux/irq_lsapic.c 2009-10-27 12:04:10.0000000= 00 +0100 @@ -26,7 +26,7 @@ lsapic_noop (unsigned int irq) /* nuthing to do... */ } =20 -struct hw_interrupt_type irq_type_ia64_lsapic =3D { +hw_irq_controller irq_type_ia64_lsapic =3D { .typename =3D "LSAPIC", .startup =3D lsapic_noop_startup, .shutdown =3D lsapic_noop, --- 2009-10-27.orig/xen/arch/ia64/xen/irq.c 2009-08-24 08:41:26.0000000= 00 +0200 +++ 2009-10-27/xen/arch/ia64/xen/irq.c 2009-10-27 12:04:10.000000000 = +0100 @@ -118,7 +118,7 @@ static void ack_none(unsigned int irq) #define shutdown_none disable_none #define end_none enable_none =20 -struct hw_interrupt_type no_irq_type =3D { +hw_irq_controller no_irq_type =3D { "none", startup_none, shutdown_none, --- 2009-10-27.orig/xen/arch/ia64/xen/xentime.c 2008-04-08 12:12:42.0000000= 00 +0200 +++ 2009-10-27/xen/arch/ia64/xen/xentime.c 2009-10-27 12:04:10.0000000= 00 +0100 @@ -154,7 +154,7 @@ xen_timer_interrupt (int irq, void *dev_ raise_softirq(TIMER_SOFTIRQ); } =20 -static struct irqaction xen_timer_irqaction =3D { +static struct irqaction __read_mostly xen_timer_irqaction =3D { .handler =3D (void *) xen_timer_interrupt, .name =3D "timer" }; --- 2009-10-27.orig/xen/arch/x86/hpet.c 2009-10-26 14:42:47.000000000 = +0100 +++ 2009-10-27/xen/arch/x86/hpet.c 2009-10-27 12:04:10.000000000 = +0100 @@ -319,7 +319,7 @@ static void hpet_msi_set_affinity(unsign /* * IRQ Chip for MSI HPET Devices, */ -static struct hw_interrupt_type hpet_msi_type =3D { +static hw_irq_controller hpet_msi_type =3D { .typename =3D "HPET-MSI", .startup =3D hpet_msi_startup, .shutdown =3D hpet_msi_shutdown, --- 2009-10-27.orig/xen/arch/x86/hvm/irq.c 2009-07-03 10:20:57.0000000= 00 +0200 +++ 2009-10-27/xen/arch/x86/hvm/irq.c 2009-10-27 12:04:10.000000000 = +0100 @@ -507,7 +507,7 @@ static int irq_load_isa(struct domain *d =20 /* Adjust the GSI assert counts for the ISA IRQ line state. * This relies on the PCI IRQ state being loaded first. */ - for ( irq =3D 0; irq < 16; irq++ ) + for ( irq =3D 0; platform_legacy_irq(irq); irq++ ) if ( test_bit(irq, &hvm_irq->isa_irq.i) ) hvm_irq->gsi_assert_count[hvm_isa_irq_to_gsi(irq)]++; =20 --- 2009-10-27.orig/xen/arch/x86/i8259.c 2009-10-07 13:31:36.0000000= 00 +0200 +++ 2009-10-27/xen/arch/x86/i8259.c 2009-10-27 12:04:10.000000000 = +0100 @@ -97,7 +97,7 @@ static void end_8259A_irq(unsigned int i enable_8259A_irq(irq); } =20 -static struct hw_interrupt_type i8259A_irq_type =3D { +static struct hw_interrupt_type __read_mostly i8259A_irq_type =3D { .typename =3D "XT-PIC", .startup =3D startup_8259A_irq, .shutdown =3D disable_8259A_irq, @@ -347,7 +347,7 @@ void __devinit init_8259A(int auto_eoi) spin_unlock_irqrestore(&i8259A_lock, flags); } =20 -static struct irqaction cascade =3D { no_action, "cascade", NULL}; +static struct irqaction __read_mostly cascade =3D { no_action, "cascade", = NULL}; =20 void __init init_IRQ(void) { @@ -366,7 +366,7 @@ void __init init_IRQ(void) set_intr_gate(vector, interrupt[vector]); } =20 - for (irq =3D 0; irq < 16; irq++) { + for (irq =3D 0; platform_legacy_irq(irq); irq++) { struct irq_desc *desc =3D irq_to_desc(irq); struct irq_cfg *cfg =3D desc->chip_data; =20 --- 2009-10-27.orig/xen/arch/x86/io_apic.c 2009-10-26 14:42:47.0000000= 00 +0100 +++ 2009-10-27/xen/arch/x86/io_apic.c 2009-10-27 12:05:25.000000000 = +0100 @@ -62,7 +62,8 @@ int sis_apic_bug =3D -1; /* * # of IRQ routing registers */ -int nr_ioapic_registers[MAX_IO_APICS]; +int __read_mostly nr_ioapic_registers[MAX_IO_APICS]; +int __read_mostly nr_ioapics; =20 int disable_timer_pin_1 __initdata; =20 @@ -497,7 +498,7 @@ void /*__init*/ setup_ioapic_dest(void) */ static int EISA_ELCR(unsigned int irq) { - if (irq < 16) { + if (platform_legacy_irq(irq)) { unsigned int port =3D 0x4d0 + (irq >> 3); return (inb(port) >> (irq & 7)) & 1; } @@ -763,8 +764,8 @@ static inline int IO_APIC_irq_trigger(in return 0; } =20 -static struct hw_interrupt_type ioapic_level_type; -static struct hw_interrupt_type ioapic_edge_type; +static hw_irq_controller ioapic_level_type; +static hw_irq_controller ioapic_edge_type; =20 #define IOAPIC_AUTO -1 #define IOAPIC_EDGE 0 @@ -844,7 +845,7 @@ static void __init setup_IO_APIC_irqs(vo entry.vector =3D vector; ioapic_register_intr(irq, IOAPIC_AUTO); =20 - if (!apic && (irq < 16)) + if (!apic && platform_legacy_irq(irq)) disable_8259A_irq(irq); } cfg =3D irq_cfg(irq); @@ -1358,7 +1359,7 @@ static unsigned int startup_edge_ioapic_ unsigned long flags; =20 spin_lock_irqsave(&ioapic_lock, flags); - if (irq < 16) { + if (platform_legacy_irq(irq)) { disable_8259A_irq(irq); if (i8259A_irq_pending(irq)) was_pending =3D 1; @@ -1408,7 +1409,7 @@ static unsigned int startup_level_ioapic return 0; /* don't check for pending */ } =20 -int ioapic_ack_new =3D 1; +int __read_mostly ioapic_ack_new =3D 1; static void setup_ioapic_ack(char *s) { if ( !strcmp(s, "old") ) @@ -1572,7 +1573,7 @@ static void end_edge_ioapic_irq(unsigned * edge-triggered handler, without risking IRQ storms and other ugly * races. */ -static struct hw_interrupt_type ioapic_edge_type =3D { +static hw_irq_controller ioapic_edge_type =3D { .typename =3D "IO-APIC-edge", .startup =3D startup_edge_ioapic_irq, .shutdown =3D disable_edge_ioapic_irq, @@ -1583,7 +1584,7 @@ static struct hw_interrupt_type ioapic_e .set_affinity =3D set_ioapic_affinity_irq, }; =20 -static struct hw_interrupt_type ioapic_level_type =3D { +static hw_irq_controller ioapic_level_type =3D { .typename =3D "IO-APIC-level", .startup =3D startup_level_ioapic_irq, .shutdown =3D mask_IO_APIC_irq, @@ -1631,7 +1632,7 @@ static void set_msi_affinity_irq(unsigne * IRQ Chip for MSI PCI/PCI-X/PCI-Express Devices, * which implement the MSI or MSI-X Capability Structure. */ -struct hw_interrupt_type pci_msi_type =3D { +hw_irq_controller pci_msi_type =3D { .typename =3D "PCI-MSI", .startup =3D startup_msi_irq, .shutdown =3D shutdown_msi_irq, @@ -1646,7 +1647,7 @@ static inline void init_IO_APIC_traps(vo { int irq; /* Xen: This is way simpler than the Linux implementation. */ - for (irq =3D 0; irq < 16 ; irq++) + for (irq =3D 0; platform_legacy_irq(irq); irq++) if (IO_APIC_IRQ(irq) && !IO_APIC_VECTOR(irq)) make_8259A_irq(irq); } @@ -1674,7 +1675,7 @@ static void ack_lapic_irq(unsigned int i =20 static void end_lapic_irq(unsigned int irq) { /* nothing */ } =20 -static struct hw_interrupt_type lapic_irq_type =3D { +static hw_irq_controller lapic_irq_type =3D { .typename =3D "local-APIC-edge", .startup =3D NULL, /* startup_irq() not used for IRQ0 */ .shutdown =3D NULL, /* shutdown_irq() not used for IRQ0 */ @@ -2107,7 +2108,7 @@ int io_apic_set_pci_routing (int ioapic, /* * IRQs < 16 are already in the irq_2_pin[] map */ - if (irq >=3D 16) + if (!platform_legacy_irq(irq)) add_pin_to_irq(irq, ioapic, pin); =20 vector =3D assign_irq_vector(irq); @@ -2122,7 +2123,7 @@ int io_apic_set_pci_routing (int ioapic, =20 ioapic_register_intr(irq, edge_level); =20 - if (!ioapic && (irq < 16)) + if (!ioapic && platform_legacy_irq(irq)) disable_8259A_irq(irq); =20 spin_lock_irqsave(&ioapic_lock, flags); --- 2009-10-27.orig/xen/arch/x86/irq.c 2009-10-26 14:42:47.000000000 = +0100 +++ 2009-10-27/xen/arch/x86/irq.c 2009-10-27 12:04:10.000000000 = +0100 @@ -24,7 +24,7 @@ #include =20 /* opt_noirqbalance: If true, software IRQ balancing/affinity is = disabled. */ -int opt_noirqbalance =3D 0; +int __read_mostly opt_noirqbalance =3D 0; boolean_param("noirqbalance", opt_noirqbalance); =20 unsigned int __read_mostly nr_irqs_gsi =3D 16; @@ -45,7 +45,7 @@ DECLARE_BITMAP(used_vectors, NR_VECTORS) =20 struct irq_cfg __read_mostly *irq_cfg =3D NULL; =20 -static struct timer *irq_guest_eoi_timer; +static struct timer *__read_mostly irq_guest_eoi_timer; =20 static DEFINE_SPINLOCK(vector_lock); =20 @@ -60,7 +60,7 @@ static DEFINE_SPINLOCK(irq_ratelimit_loc static struct timer irq_ratelimit_timer; =20 /* irq_ratelimit: the max irq rate allowed in every 10ms, set 0 to = disable */ -unsigned int __read_mostly irq_ratelimit_threshold =3D 10000; +static unsigned int __read_mostly irq_ratelimit_threshold =3D 10000; integer_param("irq_ratelimit", irq_ratelimit_threshold); =20 /* Must be called when irq disabled */ @@ -321,7 +321,7 @@ static void ack_none(unsigned int irq) #define shutdown_none disable_none #define end_none enable_none =20 -struct hw_interrupt_type no_irq_type =3D { +hw_irq_controller no_irq_type =3D { "none", startup_none, shutdown_none, --- 2009-10-27.orig/xen/arch/x86/mpparse.c 2009-09-03 08:55:14.0000000= 00 +0200 +++ 2009-10-27/xen/arch/x86/mpparse.c 2009-10-27 12:04:10.000000000 = +0100 @@ -58,8 +58,6 @@ struct mpc_config_intsrc mp_irqs[MAX_IRQ /* MP IRQ source entries */ int mp_irq_entries; =20 -int nr_ioapics; - int pic_mode; unsigned long mp_lapic_addr; =20 @@ -525,7 +523,7 @@ static void __init construct_default_ioi } } =20 - for (i =3D 0; i < 16; i++) { + for (i =3D 0; platform_legacy_irq(i); i++) { switch (mpc_default_type) { case 2: if (i =3D=3D 0 || i =3D=3D 13) @@ -1037,7 +1035,7 @@ void __init mp_config_acpi_legacy_irqs ( * Use the default configuration for the IRQs 0-15. Unless * overriden by (MADT) interrupt source override entries. */ - for (i =3D 0; i < 16; i++) { + for (i =3D 0; platform_legacy_irq(i); i++) { int idx; =20 for (idx =3D 0; idx < mp_irq_entries; idx++) { --- 2009-10-27.orig/xen/arch/x86/time.c 2009-10-22 08:18:54.000000000 = +0200 +++ 2009-10-27/xen/arch/x86/time.c 2009-10-27 12:04:10.000000000 = +0100 @@ -232,7 +232,7 @@ static void timer_interrupt(int irq, voi } } =20 -static struct irqaction irq0 =3D { timer_interrupt, "timer", NULL }; +static struct irqaction __read_mostly irq0 =3D { timer_interrupt, = "timer", NULL }; =20 /* ------ Calibrate the TSC -------=20 * Return processor ticks per second / CALIBRATE_FRAC. --- 2009-10-27.orig/xen/common/domain.c 2009-10-22 08:18:54.000000000 = +0200 +++ 2009-10-27/xen/common/domain.c 2009-10-27 12:04:10.000000000 = +0100 @@ -198,7 +198,8 @@ struct vcpu *alloc_idle_vcpu(unsigned in return alloc_vcpu(d, vcpu_id, cpu_id); } =20 -static unsigned int extra_dom0_irqs =3D 256, extra_domU_irqs =3D 32; +static unsigned int __read_mostly extra_dom0_irqs =3D 256; +static unsigned int __read_mostly extra_domU_irqs =3D 32; static void __init parse_extra_guest_irqs(const char *s) { if ( isdigit(*s) ) --- 2009-10-27.orig/xen/drivers/passthrough/amd/iommu_init.c 2009-10-01 = 10:53:02.000000000 +0200 +++ 2009-10-27/xen/drivers/passthrough/amd/iommu_init.c 2009-10-27 = 12:04:10.000000000 +0100 @@ -406,7 +406,7 @@ static void iommu_msi_end(unsigned int i } =20 =20 -static struct hw_interrupt_type iommu_msi_type =3D { +static hw_irq_controller iommu_msi_type =3D { .typename =3D "AMD_IOV_MSI", .startup =3D iommu_msi_startup, .shutdown =3D iommu_msi_mask, --- 2009-10-27.orig/xen/drivers/passthrough/vtd/iommu.c 2009-10-22 = 08:18:54.000000000 +0200 +++ 2009-10-27/xen/drivers/passthrough/vtd/iommu.c 2009-10-27 = 12:04:10.000000000 +0100 @@ -871,7 +871,7 @@ static void dma_msi_set_affinity(unsigne spin_unlock_irqrestore(&iommu->register_lock, flags); } =20 -static struct hw_interrupt_type dma_msi_type =3D { +static hw_irq_controller dma_msi_type =3D { .typename =3D "DMA_MSI", .startup =3D dma_msi_startup, .shutdown =3D dma_msi_mask, --- 2009-10-27.orig/xen/include/asm-ia64/linux-xen/asm/hw_irq.h 2009-03-31 = 17:55:50.000000000 +0200 +++ 2009-10-27/xen/include/asm-ia64/linux-xen/asm/hw_irq.h 2009-10-27 = 12:04:10.000000000 +0100 @@ -79,7 +79,7 @@ enum { extern __u8 isa_irq_to_vector_map[16]; #define isa_irq_to_vector(x) isa_irq_to_vector_map[(x)] =20 -extern struct hw_interrupt_type irq_type_ia64_lsapic; /* CPU-internal = interrupt controller */ +extern hw_irq_controller irq_type_ia64_lsapic; /* CPU-internal interrupt = controller */ =20 extern int assign_irq_vector (int irq); /* allocate a free vector = */ extern void free_irq_vector (int vector); @@ -91,7 +91,7 @@ extern int setup_vector(unsigned int vec #endif =20 static inline void -hw_resend_irq (struct hw_interrupt_type *h, unsigned int vector) +hw_resend_irq (hw_irq_controller *h, unsigned int vector) { platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0); } --- 2009-10-27.orig/xen/include/asm-x86/irq.h 2009-10-26 14:42:47.0000000= 00 +0100 +++ 2009-10-27/xen/include/asm-x86/irq.h 2009-10-27 12:04:10.0000000= 00 +0100 @@ -10,8 +10,9 @@ #include #include =20 -#define IO_APIC_IRQ(irq) (((irq) >=3D 16 && (irq) < nr_irqs_gsi) \ - || (((irq) < 16) && (1<<(irq)) & io_apic_irqs)) +#define IO_APIC_IRQ(irq) (platform_legacy_irq(irq) ? \ + (1 << (irq)) & io_apic_irqs : \ + (irq) < nr_irqs_gsi) #define IO_APIC_VECTOR(irq) (irq_vector[irq]) =20 #define MSI_IRQ(irq) ((irq) >=3D nr_irqs_gsi && (irq) < nr_irqs) @@ -19,14 +20,12 @@ #define LEGACY_VECTOR(irq) ((irq) + FIRST_LEGACY_VECTOR) #define LEGACY_IRQ_FROM_VECTOR(vec) ((vec) - FIRST_LEGACY_VECTOR) =20 -#define vector_to_irq(vec) (vector_irq[vec]) -#define irq_to_desc(irq) &irq_desc[(irq)] +#define irq_to_desc(irq) (&irq_desc[irq]) +#define irq_cfg(irq) (&irq_cfg[irq]) =20 #define MAX_GSI_IRQS PAGE_SIZE * 8 #define MAX_NR_IRQS (2 * MAX_GSI_IRQS) =20 -#define irq_cfg(irq) &irq_cfg[(irq)] - struct irq_cfg { int vector; cpumask_t domain; --- 2009-10-27.orig/xen/include/asm-x86/msi.h 2009-10-01 10:53:02.0000000= 00 +0200 +++ 2009-10-27/xen/include/asm-x86/msi.h 2009-10-27 12:04:10.0000000= 00 +0100 @@ -117,7 +117,7 @@ int msi_free_irq(struct msi_desc *entry) */ #define NR_HP_RESERVED_VECTORS 20 =20 -extern struct hw_interrupt_type pci_msi_type; +extern const struct hw_interrupt_type pci_msi_type; =20 /* * MSI-X Address Register --- 2009-10-27.orig/xen/include/xen/irq.h 2009-10-26 14:42:47.0000000= 00 +0100 +++ 2009-10-27/xen/include/xen/irq.h 2009-10-27 12:04:10.000000000 = +0100 @@ -47,7 +47,7 @@ struct hw_interrupt_type { void (*set_affinity)(unsigned int irq, cpumask_t mask); }; =20 -typedef struct hw_interrupt_type hw_irq_controller; +typedef const struct hw_interrupt_type hw_irq_controller; =20 #include =20