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