fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / sparc64 / kernel / irq.c
index 4e64724..c3d068c 100644 (file)
@@ -372,14 +372,14 @@ static void run_pre_handler(unsigned int virt_irq)
        }
 }
 
-static struct hw_interrupt_type sun4u_irq = {
+static struct irq_chip sun4u_irq = {
        .typename       = "sun4u",
        .enable         = sun4u_irq_enable,
        .disable        = sun4u_irq_disable,
        .end            = sun4u_irq_end,
 };
 
-static struct hw_interrupt_type sun4u_irq_ack = {
+static struct irq_chip sun4u_irq_ack = {
        .typename       = "sun4u+ack",
        .enable         = sun4u_irq_enable,
        .disable        = sun4u_irq_disable,
@@ -387,14 +387,14 @@ static struct hw_interrupt_type sun4u_irq_ack = {
        .end            = sun4u_irq_end,
 };
 
-static struct hw_interrupt_type sun4v_irq = {
+static struct irq_chip sun4v_irq = {
        .typename       = "sun4v",
        .enable         = sun4v_irq_enable,
        .disable        = sun4v_irq_disable,
        .end            = sun4v_irq_end,
 };
 
-static struct hw_interrupt_type sun4v_irq_ack = {
+static struct irq_chip sun4v_irq_ack = {
        .typename       = "sun4v+ack",
        .enable         = sun4v_irq_enable,
        .disable        = sun4v_irq_disable,
@@ -493,22 +493,6 @@ out:
        return bucket->virt_irq;
 }
 
-void hw_resend_irq(struct hw_interrupt_type *handler, unsigned int virt_irq)
-{
-       struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
-       unsigned long pstate;
-       unsigned int *ent;
-
-       __asm__ __volatile__("rdpr %%pstate, %0" : "=r" (pstate));
-       __asm__ __volatile__("wrpr %0, %1, %%pstate"
-                            : : "r" (pstate), "i" (PSTATE_IE));
-       ent = irq_work(smp_processor_id());
-       bucket->irq_chain = *ent;
-       *ent = __irq(bucket);
-       set_softint(1 << PIL_DEVICE_IRQ);
-       __asm__ __volatile__("wrpr %0, 0x0, %%pstate" : : "r" (pstate));
-}
-
 void ack_bad_irq(unsigned int virt_irq)
 {
        struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
@@ -522,12 +506,13 @@ void ack_bad_irq(unsigned int virt_irq)
 }
 
 #ifndef CONFIG_SMP
-extern irqreturn_t timer_interrupt(int, void *, struct pt_regs *);
+extern irqreturn_t timer_interrupt(int, void *);
 
 void timer_irq(int irq, struct pt_regs *regs)
 {
        unsigned long clr_mask = 1 << irq;
        unsigned long tick_mask = tick_ops->softint_mask;
+       struct pt_regs *old_regs;
 
        if (get_softint() & tick_mask) {
                irq = 0;
@@ -535,21 +520,25 @@ void timer_irq(int irq, struct pt_regs *regs)
        }
        clear_softint(clr_mask);
 
+       old_regs = set_irq_regs(regs);
        irq_enter();
 
        kstat_this_cpu.irqs[0]++;
-       timer_interrupt(irq, NULL, regs);
+       timer_interrupt(irq, NULL);
 
        irq_exit();
+       set_irq_regs(old_regs);
 }
 #endif
 
 void handler_irq(int irq, struct pt_regs *regs)
 {
        struct ino_bucket *bucket;
+       struct pt_regs *old_regs;
 
        clear_softint(1 << irq);
 
+       old_regs = set_irq_regs(regs);
        irq_enter();
 
        /* Sliiiick... */
@@ -558,12 +547,13 @@ void handler_irq(int irq, struct pt_regs *regs)
                struct ino_bucket *next = __bucket(bucket->irq_chain);
 
                bucket->irq_chain = 0;
-               __do_IRQ(bucket->virt_irq, regs);
+               __do_IRQ(bucket->virt_irq);
 
                bucket = next;
        }
 
        irq_exit();
+       set_irq_regs(old_regs);
 }
 
 struct sun5_timer {