]> git.neil.brown.name Git - history.git/commitdiff
Import 2.2.8pre2 2.2.8pre2
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:18:48 +0000 (15:18 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:18:48 +0000 (15:18 -0500)
arch/i386/kernel/io_apic.c
arch/i386/kernel/irq.c
arch/i386/kernel/irq.h
arch/i386/kernel/visws_apic.c

index f06a68dbb3baadbd1262a8861bbdd57e1cfb0e9e..42ebd964376fd99252c1bb006f0a96374aea4a9a 100644 (file)
@@ -1049,7 +1049,7 @@ static void do_edge_ioapic_IRQ(unsigned int irq, struct pt_regs * regs)
         * and do not need to be masked.
         */
        ack_APIC_irq();
-       status = desc->status & ~IRQ_REPLAY;
+       status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
        status |= IRQ_PENDING;
 
        /*
@@ -1104,7 +1104,7 @@ static void do_level_ioapic_IRQ(unsigned int irq, struct pt_regs * regs)
         * So this all has to be within the spinlock.
         */
        mask_IO_APIC_irq(irq);
-       status = desc->status & ~IRQ_REPLAY;
+       status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
 
        /*
         * If the IRQ is disabled for whatever reason, we must
index 2fe967aa9e106deaabfc7669d457c966439c1721..6170e0ce1b1dd387f018f5349682544e95089e92 100644 (file)
@@ -239,10 +239,9 @@ static void do_8259A_IRQ(unsigned int irq, struct pt_regs * regs)
        {
                unsigned int status;
                mask_and_ack_8259A(irq);
-               status = desc->status & ~IRQ_REPLAY;
+               status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
                action = NULL;
-               if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))
-               {
+               if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
                        action = desc->action;
                        status |= IRQ_INPROGRESS;
                }
@@ -770,7 +769,7 @@ void disable_irq(unsigned int irq)
 {
        disable_irq_nosync(irq);
 
-       if (!local_irq_count[smp_processor_id()] && irq_desc[irq].action) {
+       if (!local_irq_count[smp_processor_id()]) {
                do {
                        barrier();
                } while (irq_desc[irq].status & IRQ_INPROGRESS);
@@ -879,7 +878,7 @@ int setup_x86_irq(unsigned int irq, struct irqaction * new)
 
        if (!shared) {
                irq_desc[irq].depth = 0;
-               irq_desc[irq].status &= ~(IRQ_DISABLED | IRQ_INPROGRESS);
+               irq_desc[irq].status &= ~IRQ_DISABLED;
                irq_desc[irq].handler->startup(irq);
        }
        spin_unlock_irqrestore(&irq_controller_lock,flags);
@@ -951,7 +950,7 @@ out:
  *
  * This depends on the fact that any interrupt that
  * comes in on to an unassigned handler will get stuck
- * with "IRQ_INPROGRESS" asserted and the interrupt
+ * with "IRQ_WAITING" cleared and the interrupt
  * disabled.
  */
 unsigned long probe_irq_on(void)
@@ -965,8 +964,7 @@ unsigned long probe_irq_on(void)
        spin_lock_irq(&irq_controller_lock);
        for (i = NR_IRQS-1; i > 0; i--) {
                if (!irq_desc[i].action) {
-                       unsigned int status = irq_desc[i].status | IRQ_AUTODETECT;
-                       irq_desc[i].status = status & ~(IRQ_INPROGRESS|IRQ_DISABLED);
+                       irq_desc[i].status |= IRQ_AUTODETECT | IRQ_WAITING;
                        irq_desc[i].handler->startup(i);
                }
        }
@@ -989,8 +987,8 @@ unsigned long probe_irq_on(void)
                        continue;
                
                /* It triggered already - consider it spurious. */
-               if (status & IRQ_INPROGRESS) {
-                       irq_desc[i].status = (status & ~(IRQ_INPROGRESS | IRQ_AUTODETECT)) | IRQ_DISABLED;
+               if (!(status & IRQ_WAITING)) {
+                       irq_desc[i].status = status & ~IRQ_AUTODETECT;
                        irq_desc[i].handler->shutdown(i);
                }
        }
@@ -1015,12 +1013,12 @@ int probe_irq_off(unsigned long unused)
                if (!(status & IRQ_AUTODETECT))
                        continue;
 
-               if (status & IRQ_INPROGRESS) {
+               if (!(status & IRQ_WAITING)) {
                        if (!nr_irqs)
                                irq_found = i;
                        nr_irqs++;
                }
-               irq_desc[i].status = (status & ~(IRQ_AUTODETECT | IRQ_INPROGRESS)) | IRQ_DISABLED;
+               irq_desc[i].status = status & ~IRQ_AUTODETECT;
                irq_desc[i].handler->shutdown(i);
        }
        spin_unlock_irq(&irq_controller_lock);
index 5efbe3bea472237b28109a899c68f72061c0c426..533ab9c9a7596fc5ea3bd9c50010c19fd9811cb7 100644 (file)
@@ -26,6 +26,7 @@ extern struct hw_interrupt_type no_irq_type;
 #define IRQ_PENDING    4       /* IRQ pending - replay on enable */
 #define IRQ_REPLAY     8       /* IRQ has been replayed but not acked yet */
 #define IRQ_AUTODETECT 16      /* IRQ is being autodetected */
+#define IRQ_WAITING    32      /* IRQ not yet seen - for autodetection */
 
 /*
  * This is the "IRQ descriptor", which contains various information
index 783080553831c491aba4a1c50a130c609a79a277..c120546894e018dedaf46b720b16568d7784cf5f 100644 (file)
@@ -201,10 +201,9 @@ static void do_cobalt_IRQ(unsigned int irq, struct pt_regs * regs)
        {
                unsigned int status;
                /* XXX APIC EOI? */
-               status = desc->status & ~IRQ_REPLAY;
+               status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
                action = NULL;
-               if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))
-               {
+               if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
                        action = desc->action;
                        status |= IRQ_INPROGRESS;
                }