Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212142
b: refs/heads/master
c: a77c463
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Oct 4, 2010
1 parent 4e31efa commit a8e5ac5
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f8822657e799b02c55556c99a601261e207a299d
refs/heads/master: a77c4635915021c646cc017f22239e66d1aab4d5
59 changes: 42 additions & 17 deletions trunk/kernel/irq/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,15 @@ void clear_kstat_irqs(struct irq_desc *desc)
* What should we do if we get a hw irq event on an illegal vector?
* Each architecture has to answer this themself.
*/
static void ack_bad(unsigned int irq)
static void ack_bad(struct irq_data *data)
{
struct irq_desc *desc = irq_data_to_desc(data);

print_irq_desc(data->irq, desc);
ack_bad_irq(data->irq);
}

static void compat_ack_bad(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc(irq);

Expand All @@ -302,11 +310,16 @@ static void ack_bad(unsigned int irq)
/*
* NOP functions
*/
static void noop(unsigned int irq)
static void noop(struct irq_data *data) { }

static unsigned int noop_ret(struct irq_data *data)
{
return 0;
}

static unsigned int noop_ret(unsigned int irq)
static void compat_noop(unsigned int irq) { }

static unsigned int compat_noop_ret(unsigned int irq)
{
return 0;
}
Expand All @@ -316,12 +329,17 @@ static unsigned int noop_ret(unsigned int irq)
*/
struct irq_chip no_irq_chip = {
.name = "none",
.startup = noop_ret,
.shutdown = noop,
.enable = noop,
.disable = noop,
.ack = ack_bad,
.end = noop,
.irq_startup = noop_ret,
.irq_shutdown = noop,
.irq_enable = noop,
.irq_disable = noop,
.irq_ack = ack_bad,
.startup = compat_noop_ret,
.shutdown = compat_noop,
.enable = compat_noop,
.disable = compat_noop,
.ack = compat_ack_bad,
.end = compat_noop,
};

/*
Expand All @@ -330,14 +348,21 @@ struct irq_chip no_irq_chip = {
*/
struct irq_chip dummy_irq_chip = {
.name = "dummy",
.startup = noop_ret,
.shutdown = noop,
.enable = noop,
.disable = noop,
.ack = noop,
.mask = noop,
.unmask = noop,
.end = noop,
.irq_startup = noop_ret,
.irq_shutdown = noop,
.irq_enable = noop,
.irq_disable = noop,
.irq_ack = noop,
.irq_mask = noop,
.irq_unmask = noop,
.startup = compat_noop_ret,
.shutdown = compat_noop,
.enable = compat_noop,
.disable = compat_noop,
.ack = compat_noop,
.mask = compat_noop,
.unmask = compat_noop,
.end = compat_noop,
};

/*
Expand Down
2 changes: 2 additions & 0 deletions trunk/kernel/irq/internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

extern int noirqdebug;

#define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data)

/* Set default functions for irq_chip structures: */
extern void irq_chip_set_defaults(struct irq_chip *chip);

Expand Down

0 comments on commit a8e5ac5

Please sign in to comment.