Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212140
b: refs/heads/master
c: 6b8ff31
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Oct 4, 2010
1 parent 260d6a8 commit 002f389
Show file tree
Hide file tree
Showing 12 changed files with 112 additions and 111 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: ff7dcd44dd446db2c3e13bdedf2d52b8e0127f16
refs/heads/master: 6b8ff3120c758340505dddf08ad685ebb841d5d5
10 changes: 5 additions & 5 deletions trunk/include/linux/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,12 +475,12 @@ static inline bool alloc_desc_masks(struct irq_desc *desc, int node,
gfp = GFP_NOWAIT;

#ifdef CONFIG_CPUMASK_OFFSTACK
if (!alloc_cpumask_var_node(&desc->affinity, gfp, node))
if (!alloc_cpumask_var_node(&desc->irq_data.affinity, gfp, node))
return false;

#ifdef CONFIG_GENERIC_PENDING_IRQ
if (!alloc_cpumask_var_node(&desc->pending_mask, gfp, node)) {
free_cpumask_var(desc->affinity);
free_cpumask_var(desc->irq_data.affinity);
return false;
}
#endif
Expand All @@ -490,7 +490,7 @@ static inline bool alloc_desc_masks(struct irq_desc *desc, int node,

static inline void init_desc_masks(struct irq_desc *desc)
{
cpumask_setall(desc->affinity);
cpumask_setall(desc->irq_data.affinity);
#ifdef CONFIG_GENERIC_PENDING_IRQ
cpumask_clear(desc->pending_mask);
#endif
Expand All @@ -510,7 +510,7 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc,
struct irq_desc *new_desc)
{
#ifdef CONFIG_CPUMASK_OFFSTACK
cpumask_copy(new_desc->affinity, old_desc->affinity);
cpumask_copy(new_desc->irq_data.affinity, old_desc->irq_data.affinity);

#ifdef CONFIG_GENERIC_PENDING_IRQ
cpumask_copy(new_desc->pending_mask, old_desc->pending_mask);
Expand All @@ -521,7 +521,7 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc,
static inline void free_desc_masks(struct irq_desc *old_desc,
struct irq_desc *new_desc)
{
free_cpumask_var(old_desc->affinity);
free_cpumask_var(old_desc->irq_data.affinity);

#ifdef CONFIG_GENERIC_PENDING_IRQ
free_cpumask_var(old_desc->pending_mask);
Expand Down
14 changes: 7 additions & 7 deletions trunk/kernel/irq/autoprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ unsigned long probe_irq_on(void)
* Some chips need to know about probing in
* progress:
*/
if (desc->chip->set_type)
desc->chip->set_type(i, IRQ_TYPE_PROBE);
desc->chip->startup(i);
if (desc->irq_data.chip->set_type)
desc->irq_data.chip->set_type(i, IRQ_TYPE_PROBE);
desc->irq_data.chip->startup(i);
}
raw_spin_unlock_irq(&desc->lock);
}
Expand All @@ -76,7 +76,7 @@ unsigned long probe_irq_on(void)
raw_spin_lock_irq(&desc->lock);
if (!desc->action && !(desc->status & IRQ_NOPROBE)) {
desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
if (desc->chip->startup(i))
if (desc->irq_data.chip->startup(i))
desc->status |= IRQ_PENDING;
}
raw_spin_unlock_irq(&desc->lock);
Expand All @@ -98,7 +98,7 @@ unsigned long probe_irq_on(void)
/* It triggered already - consider it spurious. */
if (!(status & IRQ_WAITING)) {
desc->status = status & ~IRQ_AUTODETECT;
desc->chip->shutdown(i);
desc->irq_data.chip->shutdown(i);
} else
if (i < 32)
mask |= 1 << i;
Expand Down Expand Up @@ -137,7 +137,7 @@ unsigned int probe_irq_mask(unsigned long val)
mask |= 1 << i;

desc->status = status & ~IRQ_AUTODETECT;
desc->chip->shutdown(i);
desc->irq_data.chip->shutdown(i);
}
raw_spin_unlock_irq(&desc->lock);
}
Expand Down Expand Up @@ -181,7 +181,7 @@ int probe_irq_off(unsigned long val)
nr_of_irqs++;
}
desc->status = status & ~IRQ_AUTODETECT;
desc->chip->shutdown(i);
desc->irq_data.chip->shutdown(i);
}
raw_spin_unlock_irq(&desc->lock);
}
Expand Down
78 changes: 39 additions & 39 deletions trunk/kernel/irq/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ static void dynamic_irq_init_x(unsigned int irq, bool keep_chip_data)
/* Ensure we don't have left over values from a previous use of this irq */
raw_spin_lock_irqsave(&desc->lock, flags);
desc->status = IRQ_DISABLED;
desc->chip = &no_irq_chip;
desc->irq_data.chip = &no_irq_chip;
desc->handle_irq = handle_bad_irq;
desc->depth = 1;
desc->msi_desc = NULL;
desc->handler_data = NULL;
desc->irq_data.msi_desc = NULL;
desc->irq_data.handler_data = NULL;
if (!keep_chip_data)
desc->chip_data = NULL;
desc->irq_data.chip_data = NULL;
desc->action = NULL;
desc->irq_count = 0;
desc->irqs_unhandled = 0;
#ifdef CONFIG_SMP
cpumask_setall(desc->affinity);
cpumask_setall(desc->irq_data.affinity);
#ifdef CONFIG_GENERIC_PENDING_IRQ
cpumask_clear(desc->pending_mask);
#endif
Expand All @@ -64,7 +64,7 @@ void dynamic_irq_init(unsigned int irq)
* dynamic_irq_init_keep_chip_data - initialize a dynamically allocated irq
* @irq: irq number to initialize
*
* does not set irq_to_desc(irq)->chip_data to NULL
* does not set irq_to_desc(irq)->irq_data.chip_data to NULL
*/
void dynamic_irq_init_keep_chip_data(unsigned int irq)
{
Expand All @@ -88,12 +88,12 @@ static void dynamic_irq_cleanup_x(unsigned int irq, bool keep_chip_data)
irq);
return;
}
desc->msi_desc = NULL;
desc->handler_data = NULL;
desc->irq_data.msi_desc = NULL;
desc->irq_data.handler_data = NULL;
if (!keep_chip_data)
desc->chip_data = NULL;
desc->irq_data.chip_data = NULL;
desc->handle_irq = handle_bad_irq;
desc->chip = &no_irq_chip;
desc->irq_data.chip = &no_irq_chip;
desc->name = NULL;
clear_kstat_irqs(desc);
raw_spin_unlock_irqrestore(&desc->lock, flags);
Expand All @@ -112,7 +112,7 @@ void dynamic_irq_cleanup(unsigned int irq)
* dynamic_irq_cleanup_keep_chip_data - cleanup a dynamically allocated irq
* @irq: irq number to initialize
*
* does not set irq_to_desc(irq)->chip_data to NULL
* does not set irq_to_desc(irq)->irq_data.chip_data to NULL
*/
void dynamic_irq_cleanup_keep_chip_data(unsigned int irq)
{
Expand Down Expand Up @@ -140,7 +140,7 @@ int set_irq_chip(unsigned int irq, struct irq_chip *chip)

raw_spin_lock_irqsave(&desc->lock, flags);
irq_chip_set_defaults(chip);
desc->chip = chip;
desc->irq_data.chip = chip;
raw_spin_unlock_irqrestore(&desc->lock, flags);

return 0;
Expand Down Expand Up @@ -193,7 +193,7 @@ int set_irq_data(unsigned int irq, void *data)
}

raw_spin_lock_irqsave(&desc->lock, flags);
desc->handler_data = data;
desc->irq_data.handler_data = data;
raw_spin_unlock_irqrestore(&desc->lock, flags);
return 0;
}
Expand All @@ -218,7 +218,7 @@ int set_irq_msi(unsigned int irq, struct msi_desc *entry)
}

raw_spin_lock_irqsave(&desc->lock, flags);
desc->msi_desc = entry;
desc->irq_data.msi_desc = entry;
if (entry)
entry->irq = irq;
raw_spin_unlock_irqrestore(&desc->lock, flags);
Expand All @@ -243,13 +243,13 @@ int set_irq_chip_data(unsigned int irq, void *data)
return -EINVAL;
}

if (!desc->chip) {
if (!desc->irq_data.chip) {
printk(KERN_ERR "BUG: bad set_irq_chip_data(IRQ#%d)\n", irq);
return -EINVAL;
}

raw_spin_lock_irqsave(&desc->lock, flags);
desc->chip_data = data;
desc->irq_data.chip_data = data;
raw_spin_unlock_irqrestore(&desc->lock, flags);

return 0;
Expand Down Expand Up @@ -291,7 +291,7 @@ static void default_enable(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc(irq);

desc->chip->unmask(irq);
desc->irq_data.chip->unmask(irq);
desc->status &= ~IRQ_MASKED;
}

Expand All @@ -309,7 +309,7 @@ static unsigned int default_startup(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc(irq);

desc->chip->enable(irq);
desc->irq_data.chip->enable(irq);
return 0;
}

Expand All @@ -320,7 +320,7 @@ static void default_shutdown(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc(irq);

desc->chip->mask(irq);
desc->irq_data.chip->mask(irq);
desc->status |= IRQ_MASKED;
}

Expand Down Expand Up @@ -350,28 +350,28 @@ void irq_chip_set_defaults(struct irq_chip *chip)

static inline void mask_ack_irq(struct irq_desc *desc, int irq)
{
if (desc->chip->mask_ack)
desc->chip->mask_ack(irq);
if (desc->irq_data.chip->mask_ack)
desc->irq_data.chip->mask_ack(irq);
else {
desc->chip->mask(irq);
if (desc->chip->ack)
desc->chip->ack(irq);
desc->irq_data.chip->mask(irq);
if (desc->irq_data.chip->ack)
desc->irq_data.chip->ack(irq);
}
desc->status |= IRQ_MASKED;
}

static inline void mask_irq(struct irq_desc *desc, int irq)
{
if (desc->chip->mask) {
desc->chip->mask(irq);
if (desc->irq_data.chip->mask) {
desc->irq_data.chip->mask(irq);
desc->status |= IRQ_MASKED;
}
}

static inline void unmask_irq(struct irq_desc *desc, int irq)
{
if (desc->chip->unmask) {
desc->chip->unmask(irq);
if (desc->irq_data.chip->unmask) {
desc->irq_data.chip->unmask(irq);
desc->status &= ~IRQ_MASKED;
}
}
Expand Down Expand Up @@ -552,7 +552,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
raw_spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS;
out:
desc->chip->eoi(irq);
desc->irq_data.chip->eoi(irq);

raw_spin_unlock(&desc->lock);
}
Expand Down Expand Up @@ -594,8 +594,8 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
kstat_incr_irqs_this_cpu(irq, desc);

/* Start handling the irq */
if (desc->chip->ack)
desc->chip->ack(irq);
if (desc->irq_data.chip->ack)
desc->irq_data.chip->ack(irq);

/* Mark the IRQ currently in progress.*/
desc->status |= IRQ_INPROGRESS;
Expand Down Expand Up @@ -648,15 +648,15 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)

kstat_incr_irqs_this_cpu(irq, desc);

if (desc->chip->ack)
desc->chip->ack(irq);
if (desc->irq_data.chip->ack)
desc->irq_data.chip->ack(irq);

action_ret = handle_IRQ_event(irq, desc->action);
if (!noirqdebug)
note_interrupt(irq, desc, action_ret);

if (desc->chip->eoi)
desc->chip->eoi(irq);
if (desc->irq_data.chip->eoi)
desc->irq_data.chip->eoi(irq);
}

void
Expand All @@ -674,7 +674,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,

if (!handle)
handle = handle_bad_irq;
else if (desc->chip == &no_irq_chip) {
else if (desc->irq_data.chip == &no_irq_chip) {
printk(KERN_WARNING "Trying to install %sinterrupt handler "
"for IRQ%d\n", is_chained ? "chained " : "", irq);
/*
Expand All @@ -684,15 +684,15 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
* prevent us to setup the interrupt at all. Switch it to
* dummy_irq_chip for easy transition.
*/
desc->chip = &dummy_irq_chip;
desc->irq_data.chip = &dummy_irq_chip;
}

chip_bus_lock(irq, desc);
raw_spin_lock_irqsave(&desc->lock, flags);

/* Uninstall? */
if (handle == handle_bad_irq) {
if (desc->chip != &no_irq_chip)
if (desc->irq_data.chip != &no_irq_chip)
mask_ack_irq(desc, irq);
desc->status |= IRQ_DISABLED;
desc->depth = 1;
Expand All @@ -704,7 +704,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
desc->status &= ~IRQ_DISABLED;
desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE;
desc->depth = 0;
desc->chip->startup(irq);
desc->irq_data.chip->startup(irq);
}
raw_spin_unlock_irqrestore(&desc->lock, flags);
chip_bus_sync_unlock(irq, desc);
Expand Down
16 changes: 8 additions & 8 deletions trunk/kernel/irq/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static void init_one_irq_desc(int irq, struct irq_desc *desc, int node)
raw_spin_lock_init(&desc->lock);
desc->irq_data.irq = irq;
#ifdef CONFIG_SMP
desc->node = node;
desc->irq_data.node = node;
#endif
lockdep_set_class(&desc->lock, &irq_desc_lock_class);
init_kstat_irqs(desc, node, nr_cpu_ids);
Expand Down Expand Up @@ -185,7 +185,7 @@ int __init early_irq_init(void)
desc[i].irq_data.irq = i;
desc[i].irq_data.chip = &no_irq_chip;
#ifdef CONFIG_SMP
desc[i].node = node;
desc[i].irq_data.node = node;
#endif
desc[i].kstat_irqs = kstat_irqs_legacy + i * nr_cpu_ids;
lockdep_set_class(&desc[i].lock, &irq_desc_lock_class);
Expand Down Expand Up @@ -456,20 +456,20 @@ unsigned int __do_IRQ(unsigned int irq)
/*
* No locking required for CPU-local interrupts:
*/
if (desc->chip->ack)
desc->chip->ack(irq);
if (desc->irq_data.chip->ack)
desc->irq_data.chip->ack(irq);
if (likely(!(desc->status & IRQ_DISABLED))) {
action_ret = handle_IRQ_event(irq, desc->action);
if (!noirqdebug)
note_interrupt(irq, desc, action_ret);
}
desc->chip->end(irq);
desc->irq_data.chip->end(irq);
return 1;
}

raw_spin_lock(&desc->lock);
if (desc->chip->ack)
desc->chip->ack(irq);
if (desc->irq_data.chip->ack)
desc->irq_data.chip->ack(irq);
/*
* REPLAY is when Linux resends an IRQ that was dropped earlier
* WAITING is used by probe to mark irqs that are being tested
Expand Down Expand Up @@ -529,7 +529,7 @@ unsigned int __do_IRQ(unsigned int irq)
* The ->end() handler has to deal with interrupts which got
* disabled while the handler was running.
*/
desc->chip->end(irq);
desc->irq_data.chip->end(irq);
raw_spin_unlock(&desc->lock);

return 1;
Expand Down
Loading

0 comments on commit 002f389

Please sign in to comment.