mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 06:50:08 +00:00
x86: Convert irq_chip access to new functions
Before moving the irq chips to the new functions, fixup direct callers. The cpu offline irq fixup code needs to become generic and archs need to honour the "force" flag as an indicator, but that's for later. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
011d578fda
commit
a3c08e5d80
@ -159,7 +159,7 @@ int show_interrupts(struct seq_file *p, void *v)
|
|||||||
seq_printf(p, "%*d: ", prec, i);
|
seq_printf(p, "%*d: ", prec, i);
|
||||||
for_each_online_cpu(j)
|
for_each_online_cpu(j)
|
||||||
seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
|
seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
|
||||||
seq_printf(p, " %8s", desc->chip->name);
|
seq_printf(p, " %8s", desc->irq_data.chip->name);
|
||||||
seq_printf(p, "-%-8s", desc->name);
|
seq_printf(p, "-%-8s", desc->name);
|
||||||
|
|
||||||
if (action) {
|
if (action) {
|
||||||
@ -282,6 +282,7 @@ void fixup_irqs(void)
|
|||||||
unsigned int irq, vector;
|
unsigned int irq, vector;
|
||||||
static int warned;
|
static int warned;
|
||||||
struct irq_desc *desc;
|
struct irq_desc *desc;
|
||||||
|
struct irq_data *data;
|
||||||
|
|
||||||
for_each_irq_desc(irq, desc) {
|
for_each_irq_desc(irq, desc) {
|
||||||
int break_affinity = 0;
|
int break_affinity = 0;
|
||||||
@ -296,7 +297,8 @@ void fixup_irqs(void)
|
|||||||
/* interrupt's are disabled at this point */
|
/* interrupt's are disabled at this point */
|
||||||
raw_spin_lock(&desc->lock);
|
raw_spin_lock(&desc->lock);
|
||||||
|
|
||||||
affinity = desc->affinity;
|
data = &desc->irq_data;
|
||||||
|
affinity = data->affinity;
|
||||||
if (!irq_has_action(irq) ||
|
if (!irq_has_action(irq) ||
|
||||||
cpumask_equal(affinity, cpu_online_mask)) {
|
cpumask_equal(affinity, cpu_online_mask)) {
|
||||||
raw_spin_unlock(&desc->lock);
|
raw_spin_unlock(&desc->lock);
|
||||||
@ -315,16 +317,16 @@ void fixup_irqs(void)
|
|||||||
affinity = cpu_all_mask;
|
affinity = cpu_all_mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(desc->status & IRQ_MOVE_PCNTXT) && desc->chip->mask)
|
if (!(desc->status & IRQ_MOVE_PCNTXT) && data->chip->irq_mask)
|
||||||
desc->chip->mask(irq);
|
data->chip->irq_mask(data);
|
||||||
|
|
||||||
if (desc->chip->set_affinity)
|
if (data->chip->irq_set_affinity)
|
||||||
desc->chip->set_affinity(irq, affinity);
|
data->chip->irq_set_affinity(data, affinity, true);
|
||||||
else if (!(warned++))
|
else if (!(warned++))
|
||||||
set_affinity = 0;
|
set_affinity = 0;
|
||||||
|
|
||||||
if (!(desc->status & IRQ_MOVE_PCNTXT) && desc->chip->unmask)
|
if (!(desc->status & IRQ_MOVE_PCNTXT) && data->chip->irq_unmask)
|
||||||
desc->chip->unmask(irq);
|
data->chip->irq_unmask(data);
|
||||||
|
|
||||||
raw_spin_unlock(&desc->lock);
|
raw_spin_unlock(&desc->lock);
|
||||||
|
|
||||||
@ -355,10 +357,10 @@ void fixup_irqs(void)
|
|||||||
if (irr & (1 << (vector % 32))) {
|
if (irr & (1 << (vector % 32))) {
|
||||||
irq = __get_cpu_var(vector_irq)[vector];
|
irq = __get_cpu_var(vector_irq)[vector];
|
||||||
|
|
||||||
desc = irq_to_desc(irq);
|
data = irq_get_irq_data(irq);
|
||||||
raw_spin_lock(&desc->lock);
|
raw_spin_lock(&desc->lock);
|
||||||
if (desc->chip->retrigger)
|
if (data->chip->irq_retrigger)
|
||||||
desc->chip->retrigger(irq);
|
data->chip->irq_retrigger(data);
|
||||||
raw_spin_unlock(&desc->lock);
|
raw_spin_unlock(&desc->lock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user