[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] fold struct irq_cfg into struct irq_desc



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1319021454 -7200
# Node ID 07a80c52d7c1a0cead6dc6654f9bfe4f56740043
# Parent  a33af75083c7baddd3c9c6016657a83d239c6454
fold struct irq_cfg into struct irq_desc

struct irq_cfg really has become an architecture extension to struct
irq_desc, and hence it should be treated as such (rather than as IRQ
chip specific data, which it was meant to be originally).

For a first step, only convert a subset of the uses; subsequent
patches (partly to be sent later) will aim at fully eliminating the
use of the old structure type.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---


diff -r a33af75083c7 -r 07a80c52d7c1 xen/arch/ia64/xen/irq.c
--- a/xen/arch/ia64/xen/irq.c   Thu Oct 13 10:44:27 2011 +0100
+++ b/xen/arch/ia64/xen/irq.c   Wed Oct 19 12:50:54 2011 +0200
@@ -79,16 +79,13 @@
                .status = IRQ_DISABLED,
                .handler = &no_irq_type,
                .lock = SPIN_LOCK_UNLOCKED
+               .arch = {
+                       .vector = -1,
+                       .cpu_mask = CPU_MASK_ALL,
+               }
        }
 };
 
-struct irq_cfg irq_cfg[NR_IRQS] = {
-    [0 ... NR_IRQS-1] ={
-        .vector = -1,
-        .cpu_mask = CPU_MASK_ALL,
-}
-};
-
 void __do_IRQ_guest(int irq);
 
 /*
@@ -238,7 +235,6 @@
        unsigned long flags;
        struct irqaction *old, **p;
        irq_desc_t *desc = irq_descp(vector);
-    struct irq_cfg *cfg = irq_cfg(vector);
 
        /*
         * The following block of code has to be executed atomically
@@ -256,8 +252,7 @@
        desc->status &= ~(IRQ_DISABLED | IRQ_INPROGRESS | IRQ_GUEST);
        desc->handler->startup(vector);
        desc->handler->enable(vector);
-    desc->chip_data = cfg;
-    cfg->vector = vector;
+       desc->arch.vector = vector;
        spin_unlock_irqrestore(&desc->lock,flags);
 
        return 0;
@@ -283,13 +278,11 @@
 {
        unsigned long flags;
        irq_desc_t *desc;
-    struct irq_cfg *cfg;
 
        if ( vec == IA64_INVALID_VECTOR )
                return;
 
        desc = irq_descp(vec);
-    cfg = irq_cfg(vec);
 
        spin_lock_irqsave(&desc->lock, flags);
        clear_bit(vec, ia64_xen_vector);
@@ -297,8 +290,7 @@
        desc->depth = 1;
        desc->status |= IRQ_DISABLED;
        desc->handler->shutdown(vec);
-    desc->chip_data = NULL;
-    cfg->vector = -1;
+       desc->arch.vector = -1;
        spin_unlock_irqrestore(&desc->lock, flags);
 
        while (desc->status & IRQ_INPROGRESS)
diff -r a33af75083c7 -r 07a80c52d7c1 xen/arch/x86/hpet.c
--- a/xen/arch/x86/hpet.c       Thu Oct 13 10:44:27 2011 +0100
+++ b/xen/arch/x86/hpet.c       Wed Oct 19 12:50:54 2011 +0200
@@ -281,7 +281,6 @@
 {
     struct msi_msg msg;
     unsigned int dest;
-    struct irq_cfg *cfg= desc->chip_data;
 
     dest = set_desc_affinity(desc, mask);
     if (dest == BAD_APICID)
@@ -289,7 +288,7 @@
 
     hpet_msi_read(desc->action->dev_id, &msg);
     msg.data &= ~MSI_DATA_VECTOR_MASK;
-    msg.data |= MSI_DATA_VECTOR(cfg->vector);
+    msg.data |= MSI_DATA_VECTOR(desc->arch.vector);
     msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK;
     msg.address_lo |= MSI_ADDR_DEST_ID(dest);
     hpet_msi_write(desc->action->dev_id, &msg);
diff -r a33af75083c7 -r 07a80c52d7c1 xen/arch/x86/i8259.c
--- a/xen/arch/x86/i8259.c      Thu Oct 13 10:44:27 2011 +0100
+++ b/xen/arch/x86/i8259.c      Wed Oct 19 12:50:54 2011 +0200
@@ -395,12 +395,11 @@
 
     for (irq = 0; platform_legacy_irq(irq); irq++) {
         struct irq_desc *desc = irq_to_desc(irq);
-        struct irq_cfg *cfg = desc->chip_data;
         
         desc->handler = &i8259A_irq_type;
         per_cpu(vector_irq, cpu)[FIRST_LEGACY_VECTOR + irq] = irq;
-        cfg->cpu_mask= cpumask_of_cpu(cpu);
-        cfg->vector = FIRST_LEGACY_VECTOR + irq;
+        cpumask_copy(&desc->arch.cpu_mask, cpumask_of(cpu));
+        desc->arch.vector = FIRST_LEGACY_VECTOR + irq;
     }
     
     per_cpu(vector_irq, cpu)[FIRST_HIPRIORITY_VECTOR] = 0;
diff -r a33af75083c7 -r 07a80c52d7c1 xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c    Thu Oct 13 10:44:27 2011 +0100
+++ b/xen/arch/x86/io_apic.c    Wed Oct 19 12:50:54 2011 +0200
@@ -552,7 +552,7 @@
         if (!desc)
             continue;
 
-        cfg = desc->chip_data;
+        cfg = &desc->arch;
         spin_lock(&desc->lock);
         if (!cfg->move_cleanup_count)
             goto unlock;
@@ -613,7 +613,7 @@
 
 void irq_complete_move(struct irq_desc *desc)
 {
-    struct irq_cfg *cfg = desc->chip_data;
+    struct irq_cfg *cfg = &desc->arch;
     unsigned vector, me;
 
     if (likely(!cfg->move_in_progress))
@@ -638,7 +638,7 @@
         return BAD_APICID;
 
     irq = desc->irq;
-    cfg = desc->chip_data;
+    cfg = &desc->arch;
 
     local_irq_save(flags);
     lock_vector_lock();
@@ -661,11 +661,9 @@
     unsigned long flags;
     unsigned int dest;
     int pin, irq;
-    struct irq_cfg *cfg;
     struct irq_pin_list *entry;
 
     irq = desc->irq;
-    cfg = desc->chip_data;
 
     spin_lock_irqsave(&ioapic_lock, flags);
     dest = set_desc_affinity(desc, mask);
@@ -682,7 +680,7 @@
             io_apic_write(entry->apic, 0x10 + 1 + pin*2, dest);
             data = io_apic_read(entry->apic, 0x10 + pin*2);
             data &= ~IO_APIC_REDIR_VECTOR_MASK;
-            data |= cfg->vector & 0xFF;
+            data |= desc->arch.vector & 0xFF;
             io_apic_modify(entry->apic, 0x10 + pin*2, data);
 
             if (!entry->next)
@@ -2448,7 +2446,7 @@
         return irq;
 
     desc = irq_to_desc(irq);
-    cfg = desc->chip_data;
+    cfg = &desc->arch;
 
     /*
      * Since PHYSDEVOP_alloc_irq_vector is dummy, rte.vector is the pirq
diff -r a33af75083c7 -r 07a80c52d7c1 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Thu Oct 13 10:44:27 2011 +0100
+++ b/xen/arch/x86/irq.c        Wed Oct 19 12:50:54 2011 +0200
@@ -45,8 +45,6 @@
 
 static DECLARE_BITMAP(used_vectors, NR_VECTORS);
 
-struct irq_cfg __read_mostly *irq_cfg = NULL;
-
 static DEFINE_SPINLOCK(vector_lock);
 
 DEFINE_PER_CPU(vector_irq_t, vector_irq);
@@ -156,7 +154,7 @@
     int irq;
 
     for (irq = nr_irqs_gsi; irq < nr_irqs; irq++)
-        if (irq_cfg[irq].used == IRQ_UNUSED)
+        if (irq_to_desc(irq)->arch.used == IRQ_UNUSED)
             return irq;
     return -ENOSPC;
 }
@@ -198,7 +196,7 @@
     desc->action  = NULL;
     desc->msi_desc = NULL;
     desc->handler = &no_irq_type;
-    desc->chip_data->used_vectors=NULL;
+    desc->arch.used_vectors = NULL;
     cpus_setall(desc->affinity);
     spin_unlock_irqrestore(&desc->lock, flags);
 
@@ -322,26 +320,22 @@
 int __init init_irq_data(void)
 {
     struct irq_desc *desc;
-    struct irq_cfg *cfg;
     int irq, vector;
 
     for (vector = 0; vector < NR_VECTORS; ++vector)
         this_cpu(vector_irq)[vector] = -1;
 
     irq_desc = xzalloc_array(struct irq_desc, nr_irqs);
-    irq_cfg = xzalloc_array(struct irq_cfg, nr_irqs);
     irq_vector = xzalloc_array(u8, nr_irqs_gsi);
     
-    if ( !irq_desc || !irq_cfg ||! irq_vector )
+    if ( !irq_desc || !irq_vector )
         return -ENOMEM;
 
     for (irq = 0; irq < nr_irqs; irq++) {
         desc = irq_to_desc(irq);
-        cfg = irq_cfg(irq);
         desc->irq = irq;
-        desc->chip_data = cfg;
         init_one_irq_desc(desc);
-        init_one_irq_cfg(cfg);
+        init_one_irq_cfg(&desc->arch);
     }
 
     /* Never allocate the hypercall vector or Linux/BSD fast-trap vector. */
@@ -384,7 +378,7 @@
 
         ret = &global_used_vector_map;
 
-        if ( desc->chip_data->used_vectors )
+        if ( desc->arch.used_vectors )
         {
             printk(XENLOG_INFO "%s: Strange, unassigned irq %d already has 
used_vectors!\n",
                    __func__, irq);
@@ -526,7 +520,7 @@
 {
     int ret;
     unsigned long flags;
-    struct irq_cfg *cfg = &irq_cfg[irq];
+    struct irq_cfg *cfg = irq_cfg(irq);
     struct irq_desc *desc = irq_to_desc(irq);
     
     BUG_ON(irq >= nr_irqs || irq <0);
@@ -1736,15 +1730,15 @@
         setup_msi_handler(desc, msi_desc);
 
         if ( opt_irq_vector_map == OPT_IRQ_VECTOR_MAP_PERDEV
-             && !desc->chip_data->used_vectors )
+             && !desc->arch.used_vectors )
         {
-            desc->chip_data->used_vectors = &pdev->info.used_vectors;
-            if ( desc->chip_data->vector != IRQ_VECTOR_UNASSIGNED )
+            desc->arch.used_vectors = &pdev->info.used_vectors;
+            if ( desc->arch.vector != IRQ_VECTOR_UNASSIGNED )
             {
-                int vector = desc->chip_data->vector;
-                ASSERT(!test_bit(vector, desc->chip_data->used_vectors));
+                int vector = desc->arch.vector;
+                ASSERT(!test_bit(vector, desc->arch.used_vectors));
 
-                set_bit(vector, desc->chip_data->used_vectors);
+                set_bit(vector, desc->arch.used_vectors);
             }
         }
 
@@ -1858,7 +1852,6 @@
 {
     int i, irq, pirq;
     struct irq_desc *desc;
-    struct irq_cfg *cfg;
     irq_guest_action_t *action;
     struct domain *d;
     const struct pirq *info;
@@ -1870,7 +1863,6 @@
     {
 
         desc = irq_to_desc(irq);
-        cfg = desc->chip_data;
 
         if ( !desc->handler || desc->handler == &no_irq_type )
             continue;
@@ -1881,7 +1873,7 @@
                           desc->affinity);
         printk("   IRQ:%4d affinity:%s vec:%02x type=%-15s"
                " status=%08x ",
-               irq, keyhandler_scratch, cfg->vector,
+               irq, keyhandler_scratch, desc->arch.vector,
                desc->handler->typename, desc->status);
 
         if ( !(desc->status & IRQ_GUEST) )
diff -r a33af75083c7 -r 07a80c52d7c1 xen/arch/x86/msi.c
--- a/xen/arch/x86/msi.c        Thu Oct 13 10:44:27 2011 +0100
+++ b/xen/arch/x86/msi.c        Wed Oct 19 12:50:54 2011 +0200
@@ -123,16 +123,15 @@
 void msi_compose_msg(struct irq_desc *desc, struct msi_msg *msg)
 {
     unsigned dest;
-    struct irq_cfg *cfg = desc->chip_data;
-    int vector = cfg->vector;
+    int vector = desc->arch.vector;
 
-    if ( cpus_empty(cfg->cpu_mask) ) {
+    if ( cpumask_empty(&desc->arch.cpu_mask) ) {
         dprintk(XENLOG_ERR,"%s, compose msi message error!!\n", __func__);
         return;
     }
 
     if ( vector ) {
-        dest = cpu_mask_to_apicid(&cfg->cpu_mask);
+        dest = cpu_mask_to_apicid(&desc->arch.cpu_mask);
 
         msg->address_hi = MSI_ADDR_BASE_HI;
         msg->address_lo =
@@ -259,7 +258,6 @@
     struct msi_msg msg;
     unsigned int dest;
     struct msi_desc *msi_desc = desc->msi_desc;
-    struct irq_cfg *cfg = desc->chip_data;
 
     dest = set_desc_affinity(desc, mask);
     if (dest == BAD_APICID || !msi_desc)
@@ -271,7 +269,7 @@
     read_msi_msg(msi_desc, &msg);
 
     msg.data &= ~MSI_DATA_VECTOR_MASK;
-    msg.data |= MSI_DATA_VECTOR(cfg->vector);
+    msg.data |= MSI_DATA_VECTOR(desc->arch.vector);
     msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK;
     msg.address_lo |= MSI_ADDR_DEST_ID(dest);
     msg.dest32 = dest;
diff -r a33af75083c7 -r 07a80c52d7c1 xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c    Thu Oct 13 10:44:27 2011 +0100
+++ b/xen/arch/x86/smpboot.c    Wed Oct 19 12:50:54 2011 +0200
@@ -1010,8 +1010,8 @@
             continue;
         irq_vector[irq] = FIRST_HIPRIORITY_VECTOR + seridx + 1;
         per_cpu(vector_irq, cpu)[FIRST_HIPRIORITY_VECTOR + seridx + 1] = irq;
-        irq_cfg[irq].vector = FIRST_HIPRIORITY_VECTOR + seridx + 1;
-        irq_cfg[irq].cpu_mask = cpu_online_map;
+        irq_to_desc(irq)->arch.vector = FIRST_HIPRIORITY_VECTOR + seridx + 1;
+        cpumask_copy(&irq_to_desc(irq)->arch.cpu_mask, &cpu_online_map);
     }
 
     /* IPI for cleanuping vectors after irq move */
diff -r a33af75083c7 -r 07a80c52d7c1 xen/drivers/passthrough/amd/iommu_init.c
--- a/xen/drivers/passthrough/amd/iommu_init.c  Thu Oct 13 10:44:27 2011 +0100
+++ b/xen/drivers/passthrough/amd/iommu_init.c  Wed Oct 19 12:50:54 2011 +0200
@@ -348,7 +348,6 @@
     struct msi_msg msg;
     unsigned int dest;
     struct amd_iommu *iommu = desc->action->dev_id;
-    struct irq_cfg *cfg = desc->chip_data;
     u16 seg = iommu->seg;
     u8 bus = (iommu->bdf >> 8) & 0xff;
     u8 dev = PCI_SLOT(iommu->bdf & 0xff);
@@ -363,7 +362,7 @@
     }
 
     memset(&msg, 0, sizeof(msg)); 
-    msg.data = MSI_DATA_VECTOR(cfg->vector) & 0xff;
+    msg.data = MSI_DATA_VECTOR(desc->arch.vector) & 0xff;
     msg.data |= 1 << 14;
     msg.data |= (INT_DELIVERY_MODE != dest_LowestPrio) ?
         MSI_DATA_DELIVERY_FIXED:
diff -r a33af75083c7 -r 07a80c52d7c1 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Thu Oct 13 10:44:27 2011 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c       Wed Oct 19 12:50:54 2011 +0200
@@ -1001,7 +1001,6 @@
     unsigned int dest;
     unsigned long flags;
     struct iommu *iommu = desc->action->dev_id;
-    struct irq_cfg *cfg = desc->chip_data;
 
 #ifdef CONFIG_X86
     dest = set_desc_affinity(desc, mask);
@@ -1011,7 +1010,7 @@
     }
 
     memset(&msg, 0, sizeof(msg)); 
-    msg.data = MSI_DATA_VECTOR(cfg->vector) & 0xff;
+    msg.data = MSI_DATA_VECTOR(desc->arch.vector) & 0xff;
     msg.data |= 1 << 14;
     msg.data |= (INT_DELIVERY_MODE != dest_LowestPrio) ?
         MSI_DATA_DELIVERY_FIXED:
@@ -1029,7 +1028,7 @@
     msg.address_lo |= MSI_ADDR_DEST_ID(dest & 0xff);
 #else
     memset(&msg, 0, sizeof(msg));
-    msg.data = cfg->vector & 0xff;
+    msg.data = desc->arch.vector & 0xff;
     msg.data |= 1 << 14;
     msg.address_lo = (MSI_ADDRESS_HEADER << (MSI_ADDRESS_HEADER_SHIFT + 8));
     msg.address_lo |= MSI_PHYSICAL_MODE << 2;
diff -r a33af75083c7 -r 07a80c52d7c1 
xen/include/asm-ia64/linux-xen/asm/README.origin
--- a/xen/include/asm-ia64/linux-xen/asm/README.origin  Thu Oct 13 10:44:27 
2011 +0100
+++ b/xen/include/asm-ia64/linux-xen/asm/README.origin  Wed Oct 19 12:50:54 
2011 +0200
@@ -10,6 +10,7 @@
 gcc_intrin.h           -> linux/include/asm-ia64/gcc_intrin.h
 ia64regs.h             -> linux/include/asm-ia64/ia64regs.h
 io.h                   -> linux/include/asm-ia64/io.h
+irq.h                  -> linux/include/asm-ia64/irq.h
 hw_irq.h               -> linux/include/asm-ia64/hw_irq.h
 kregs.h                        -> linux/include/asm-ia64/kregs.h
 mca_asm.h              -> linux/include/asm-ia64/mca_asm.h
diff -r a33af75083c7 -r 07a80c52d7c1 xen/include/asm-ia64/linux-xen/asm/irq.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-ia64/linux-xen/asm/irq.h  Wed Oct 19 12:50:54 2011 +0200
@@ -0,0 +1,73 @@
+#ifndef _ASM_IA64_IRQ_H
+#define _ASM_IA64_IRQ_H
+
+/*
+ * Copyright (C) 1999-2000, 2002 Hewlett-Packard Co
+ *     David Mosberger-Tang <davidm@xxxxxxxxxx>
+ *     Stephane Eranian <eranian@xxxxxxxxxx>
+ *
+ * 11/24/98    S.Eranian       updated TIMER_IRQ and irq_canonicalize
+ * 01/20/99    S.Eranian       added keyboard interrupt
+ * 02/29/00     D.Mosberger    moved most things into hw_irq.h
+ */
+
+#define NR_VECTORS     256
+#define NR_IRQS                256
+
+#ifdef XEN
+struct irq_cfg {
+#define arch_irq_desc irq_cfg
+        int  vector;
+        cpumask_t cpu_mask;
+};
+#endif
+
+static __inline__ int
+irq_canonicalize (int irq)
+{
+       /*
+        * We do the legacy thing here of pretending that irqs < 16
+        * are 8259 irqs.  This really shouldn't be necessary at all,
+        * but we keep it here as serial.c still uses it...
+        */
+       return ((irq == 2) ? 9 : irq);
+}
+
+extern void disable_irq (unsigned int);
+extern void disable_irq_nosync (unsigned int);
+extern void enable_irq (unsigned int);
+extern void set_irq_affinity_info (unsigned int irq, int dest, int redir);
+
+#ifdef CONFIG_SMP
+extern void move_irq(int irq);
+#else
+#define move_irq(irq)
+#endif
+
+struct irqaction;
+struct pt_regs;
+int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
+
+extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
+
+#ifdef XEN
+static inline unsigned int irq_to_vector(int);
+extern int setup_irq_vector(unsigned int, struct irqaction *);
+extern void release_irq_vector(unsigned int);
+extern int request_irq_vector(unsigned int vector,
+               void (*handler)(int, void *, struct cpu_user_regs *),
+               unsigned long irqflags, const char * devname, void *dev_id);
+
+#define create_irq(x) assign_irq_vector(AUTO_ASSIGN_IRQ)
+#define destroy_irq(x) free_irq_vector(x)
+
+#define irq_cfg(x)        (&irq_desc[x].arch)
+#define irq_to_desc(x)    (&irq_desc[x]
+
+#define irq_complete_move(x) do {} \
+    while(!x)
+
+#define domain_pirq_to_irq(d, irq) domain_irq_to_vector(d, irq)
+#endif
+
+#endif /* _ASM_IA64_IRQ_H */
diff -r a33af75083c7 -r 07a80c52d7c1 
xen/include/asm-ia64/linux/asm/README.origin
--- a/xen/include/asm-ia64/linux/asm/README.origin      Thu Oct 13 10:44:27 
2011 +0100
+++ b/xen/include/asm-ia64/linux/asm/README.origin      Wed Oct 19 12:50:54 
2011 +0200
@@ -19,7 +19,6 @@
 hdreg.h                        -> linux/include/asm-ia64/hdreg.h
 intrinsics.h           -> linux/include/asm-ia64/intrinsics.h
 ioctl.h                        -> linux/include/asm-ia64/ioctl.h
-irq.h                  -> linux/include/asm-ia64/irq.h
 linkage.h              -> linux/include/asm-ia64/linkage.h
 machvec_hpsim.h                -> linux/include/asm-ia64/machvec_hpsim.h
 mca.h                  -> linux/include/asm-ia64/mca.h
diff -r a33af75083c7 -r 07a80c52d7c1 xen/include/asm-ia64/linux/asm/irq.h
--- a/xen/include/asm-ia64/linux/asm/irq.h      Thu Oct 13 10:44:27 2011 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-#ifndef _ASM_IA64_IRQ_H
-#define _ASM_IA64_IRQ_H
-
-/*
- * Copyright (C) 1999-2000, 2002 Hewlett-Packard Co
- *     David Mosberger-Tang <davidm@xxxxxxxxxx>
- *     Stephane Eranian <eranian@xxxxxxxxxx>
- *
- * 11/24/98    S.Eranian       updated TIMER_IRQ and irq_canonicalize
- * 01/20/99    S.Eranian       added keyboard interrupt
- * 02/29/00     D.Mosberger    moved most things into hw_irq.h
- */
-
-#define NR_VECTORS     256
-#define NR_IRQS                256
-
-static __inline__ int
-irq_canonicalize (int irq)
-{
-       /*
-        * We do the legacy thing here of pretending that irqs < 16
-        * are 8259 irqs.  This really shouldn't be necessary at all,
-        * but we keep it here as serial.c still uses it...
-        */
-       return ((irq == 2) ? 9 : irq);
-}
-
-extern void disable_irq (unsigned int);
-extern void disable_irq_nosync (unsigned int);
-extern void enable_irq (unsigned int);
-extern void set_irq_affinity_info (unsigned int irq, int dest, int redir);
-
-#ifdef CONFIG_SMP
-extern void move_irq(int irq);
-#else
-#define move_irq(irq)
-#endif
-
-struct irqaction;
-struct pt_regs;
-int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
-
-extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
-
-#endif /* _ASM_IA64_IRQ_H */
diff -r a33af75083c7 -r 07a80c52d7c1 xen/include/asm-x86/irq.h
--- a/xen/include/asm-x86/irq.h Thu Oct 13 10:44:27 2011 +0100
+++ b/xen/include/asm-x86/irq.h Wed Oct 19 12:50:54 2011 +0200
@@ -21,7 +21,7 @@
 #define LEGACY_VECTOR(irq)          ((irq) + FIRST_LEGACY_VECTOR)
 
 #define irq_to_desc(irq)    (&irq_desc[irq])
-#define irq_cfg(irq)        (&irq_cfg[irq])
+#define irq_cfg(irq)        (&irq_desc[irq].arch)
 
 typedef struct {
     DECLARE_BITMAP(_bits,NR_VECTORS);
@@ -30,6 +30,7 @@
 struct irq_desc;
 
 struct irq_cfg {
+#define arch_irq_desc irq_cfg
         s16 vector;                  /* vector itself is only 8 bits, */
         s16 old_vector;              /* but we use -1 for unassigned  */
         cpumask_t cpu_mask;
@@ -46,8 +47,6 @@
 
 #define IRQ_VECTOR_UNASSIGNED (-1)
 
-extern struct irq_cfg *irq_cfg;
-
 typedef int vector_irq_t[NR_VECTORS];
 DECLARE_PER_CPU(vector_irq_t, vector_irq);
 
diff -r a33af75083c7 -r 07a80c52d7c1 xen/include/xen/irq.h
--- a/xen/include/xen/irq.h     Thu Oct 13 10:44:27 2011 +0100
+++ b/xen/include/xen/irq.h     Wed Oct 19 12:50:54 2011 +0200
@@ -63,7 +63,6 @@
 #endif
 
 struct msi_desc;
-struct irq_cfg;
 /*
  * This is the "IRQ descriptor", which contains various information
  * about the irq, including what kind of hardware handling it has,
@@ -74,9 +73,9 @@
     hw_irq_controller *handler;
     struct msi_desc   *msi_desc;
     struct irqaction *action;  /* IRQ action list */
-    struct irq_cfg *chip_data;
     int irq;
     spinlock_t lock;
+    struct arch_irq_desc arch;
     cpumask_t affinity;
     cpumask_t pending_mask;  /* IRQ migration pending mask */
 
@@ -97,32 +96,6 @@
 
 #define request_irq(irq, handler, irqflags, devname, devid) \
     request_irq_vector(irq_to_vector(irq), handler, irqflags, devname, devid)
-
-static inline unsigned int irq_to_vector(int);
-extern int setup_irq_vector(unsigned int, struct irqaction *);
-extern void release_irq_vector(unsigned int);
-extern int request_irq_vector(unsigned int vector,
-               void (*handler)(int, void *, struct cpu_user_regs *),
-               unsigned long irqflags, const char * devname, void *dev_id);
-
-#define create_irq(x) assign_irq_vector(AUTO_ASSIGN_IRQ)
-#define destroy_irq(x) free_irq_vector(x)
-
-#define irq_cfg(x)        &irq_cfg[(x)]
-#define irq_to_desc(x)    &irq_desc[(x)]
-
-#define irq_complete_move(x) do {} \
-    while(!x)
-
-#define domain_pirq_to_irq(d, irq) domain_irq_to_vector(d, irq)
-
-struct irq_cfg {
-        int  vector;
-        cpumask_t cpu_mask;
-};
-
-extern struct irq_cfg irq_cfg[];
-
 #else
 extern int setup_irq(unsigned int irq, struct irqaction *);
 extern void release_irq(unsigned int irq);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.