mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 18:40:10 +00:00
MIPS: PCI: remember nasid changed by set interrupt affinity
commit37640adbefupstream. When changing interrupt affinity remember the possible changed nasid, otherwise an interrupt deactivate/activate sequence will incorrectly setup interrupt. Fixes:e6308b6d35("MIPS: SGI-IP27: abstract chipset irq from bridge") Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by: Paul Burton <paulburton@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2264fcac85
commit
957978aa56
@@ -279,16 +279,15 @@ static int bridge_set_affinity(struct irq_data *d, const struct cpumask *mask,
|
|||||||
struct bridge_irq_chip_data *data = d->chip_data;
|
struct bridge_irq_chip_data *data = d->chip_data;
|
||||||
int bit = d->parent_data->hwirq;
|
int bit = d->parent_data->hwirq;
|
||||||
int pin = d->hwirq;
|
int pin = d->hwirq;
|
||||||
nasid_t nasid;
|
|
||||||
int ret, cpu;
|
int ret, cpu;
|
||||||
|
|
||||||
ret = irq_chip_set_affinity_parent(d, mask, force);
|
ret = irq_chip_set_affinity_parent(d, mask, force);
|
||||||
if (ret >= 0) {
|
if (ret >= 0) {
|
||||||
cpu = cpumask_first_and(mask, cpu_online_mask);
|
cpu = cpumask_first_and(mask, cpu_online_mask);
|
||||||
nasid = COMPACT_TO_NASID_NODEID(cpu_to_node(cpu));
|
data->nnasid = COMPACT_TO_NASID_NODEID(cpu_to_node(cpu));
|
||||||
bridge_write(data->bc, b_int_addr[pin].addr,
|
bridge_write(data->bc, b_int_addr[pin].addr,
|
||||||
(((data->bc->intr_addr >> 30) & 0x30000) |
|
(((data->bc->intr_addr >> 30) & 0x30000) |
|
||||||
bit | (nasid << 8)));
|
bit | (data->nasid << 8)));
|
||||||
bridge_read(data->bc, b_wid_tflush);
|
bridge_read(data->bc, b_wid_tflush);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user