Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
torvalds committed Mar 12, 2009
2 parents 8c57a8f + 0796e75 commit f1c7404
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
29 changes: 19 additions & 10 deletions arch/sparc/kernel/irq_64.c
Expand Up @@ -323,17 +323,25 @@ static void sun4u_set_affinity(unsigned int virt_irq,
sun4u_irq_enable(virt_irq);
}

/* Don't do anything. The desc->status check for IRQ_DISABLED in
* handler_irq() will skip the handler call and that will leave the
* interrupt in the sent state. The next ->enable() call will hit the
* ICLR register to reset the state machine.
*
* This scheme is necessary, instead of clearing the Valid bit in the
* IMAP register, to handle the case of IMAP registers being shared by
* multiple INOs (and thus ICLR registers). Since we use a different
* virtual IRQ for each shared IMAP instance, the generic code thinks
* there is only one user so it prematurely calls ->disable() on
* free_irq().
*
* We have to provide an explicit ->disable() method instead of using
* NULL to get the default. The reason is that if the generic code
* sees that, it also hooks up a default ->shutdown method which
* invokes ->mask() which we do not want. See irq_chip_set_defaults().
*/
static void sun4u_irq_disable(unsigned int virt_irq)
{
struct irq_handler_data *data = get_irq_chip_data(virt_irq);

if (likely(data)) {
unsigned long imap = data->imap;
unsigned long tmp = upa_readq(imap);

tmp &= ~IMAP_VALID;
upa_writeq(tmp, imap);
}
}

static void sun4u_irq_eoi(unsigned int virt_irq)
Expand Down Expand Up @@ -746,7 +754,8 @@ void handler_irq(int irq, struct pt_regs *regs)

desc = irq_desc + virt_irq;

desc->handle_irq(virt_irq, desc);
if (!(desc->status & IRQ_DISABLED))
desc->handle_irq(virt_irq, desc);

bucket_pa = next_pa;
}
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/sunhme.c
Expand Up @@ -2649,8 +2649,6 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe)
int err = -ENODEV;

sbus_dp = to_of_device(op->dev.parent)->node;
if (is_qfe)
sbus_dp = to_of_device(op->dev.parent->parent)->node;

/* We can match PCI devices too, do not accept those here. */
if (strcmp(sbus_dp->name, "sbus"))
Expand Down
2 changes: 1 addition & 1 deletion drivers/sbus/char/bbc_i2c.c
Expand Up @@ -129,7 +129,7 @@ static int wait_for_pin(struct bbc_i2c_bus *bp, u8 *status)
bp->waiting = 1;
add_wait_queue(&bp->wq, &wait);
while (limit-- > 0) {
unsigned long val;
long val;

val = wait_event_interruptible_timeout(
bp->wq,
Expand Down
3 changes: 0 additions & 3 deletions drivers/sbus/char/jsflash.c
Expand Up @@ -38,9 +38,6 @@
#include <linux/string.h>
#include <linux/genhd.h>
#include <linux/blkdev.h>

#define MAJOR_NR JSFD_MAJOR

#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/io.h>
Expand Down

0 comments on commit f1c7404

Please sign in to comment.