Commit f1c7404e37a8970bd58cc10a6d96534d42b9aac6

Authored by Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sunhme: Fix qfe parent detection.
  sparc64: Fix lost interrupts on sun4u.
  sparc64: wait_event_interruptible_timeout may return -ERESTARTSYS
  jsflash: stop defining MAJOR_NR

Showing 4 changed files Side-by-side Diff

arch/sparc/kernel/irq_64.c
... ... @@ -323,17 +323,25 @@
323 323 sun4u_irq_enable(virt_irq);
324 324 }
325 325  
  326 +/* Don't do anything. The desc->status check for IRQ_DISABLED in
  327 + * handler_irq() will skip the handler call and that will leave the
  328 + * interrupt in the sent state. The next ->enable() call will hit the
  329 + * ICLR register to reset the state machine.
  330 + *
  331 + * This scheme is necessary, instead of clearing the Valid bit in the
  332 + * IMAP register, to handle the case of IMAP registers being shared by
  333 + * multiple INOs (and thus ICLR registers). Since we use a different
  334 + * virtual IRQ for each shared IMAP instance, the generic code thinks
  335 + * there is only one user so it prematurely calls ->disable() on
  336 + * free_irq().
  337 + *
  338 + * We have to provide an explicit ->disable() method instead of using
  339 + * NULL to get the default. The reason is that if the generic code
  340 + * sees that, it also hooks up a default ->shutdown method which
  341 + * invokes ->mask() which we do not want. See irq_chip_set_defaults().
  342 + */
326 343 static void sun4u_irq_disable(unsigned int virt_irq)
327 344 {
328   - struct irq_handler_data *data = get_irq_chip_data(virt_irq);
329   -
330   - if (likely(data)) {
331   - unsigned long imap = data->imap;
332   - unsigned long tmp = upa_readq(imap);
333   -
334   - tmp &= ~IMAP_VALID;
335   - upa_writeq(tmp, imap);
336   - }
337 345 }
338 346  
339 347 static void sun4u_irq_eoi(unsigned int virt_irq)
... ... @@ -746,7 +754,8 @@
746 754  
747 755 desc = irq_desc + virt_irq;
748 756  
749   - desc->handle_irq(virt_irq, desc);
  757 + if (!(desc->status & IRQ_DISABLED))
  758 + desc->handle_irq(virt_irq, desc);
750 759  
751 760 bucket_pa = next_pa;
752 761 }
drivers/net/sunhme.c
... ... @@ -2649,8 +2649,6 @@
2649 2649 int err = -ENODEV;
2650 2650  
2651 2651 sbus_dp = to_of_device(op->dev.parent)->node;
2652   - if (is_qfe)
2653   - sbus_dp = to_of_device(op->dev.parent->parent)->node;
2654 2652  
2655 2653 /* We can match PCI devices too, do not accept those here. */
2656 2654 if (strcmp(sbus_dp->name, "sbus"))
drivers/sbus/char/bbc_i2c.c
... ... @@ -129,7 +129,7 @@
129 129 bp->waiting = 1;
130 130 add_wait_queue(&bp->wq, &wait);
131 131 while (limit-- > 0) {
132   - unsigned long val;
  132 + long val;
133 133  
134 134 val = wait_event_interruptible_timeout(
135 135 bp->wq,
drivers/sbus/char/jsflash.c
... ... @@ -38,9 +38,6 @@
38 38 #include <linux/string.h>
39 39 #include <linux/genhd.h>
40 40 #include <linux/blkdev.h>
41   -
42   -#define MAJOR_NR JSFD_MAJOR
43   -
44 41 #include <asm/uaccess.h>
45 42 #include <asm/pgtable.h>
46 43 #include <asm/io.h>