mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
net: mvneta: Fix CPU_MAP registers initialisation
commit2502d0ef27upstream. The CPU_MAP register is duplicated for each CPUs at different addresses, each instance being at a different address. However, the code so far was using CONFIG_NR_CPUS to initialise the CPU_MAP registers for each registers, while the SoCs embed at most 4 CPUs. This is especially an issue with multi_v7_defconfig, where CONFIG_NR_CPUS is currently set to 16, resulting in writes to registers that are not CPU_MAP. Fixes:c5aff18204("net: mvneta: driver for Marvell Armada 370/XP network unit") Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
158b78a4a0
commit
b4a0135c37
@@ -949,7 +949,7 @@ static void mvneta_defaults_set(struct mvneta_port *pp)
|
||||
/* Set CPU queue access map - all CPUs have access to all RX
|
||||
* queues and to all TX queues
|
||||
*/
|
||||
for (cpu = 0; cpu < CONFIG_NR_CPUS; cpu++)
|
||||
for_each_present_cpu(cpu)
|
||||
mvreg_write(pp, MVNETA_CPU_MAP(cpu),
|
||||
(MVNETA_CPU_RXQ_ACCESS_ALL_MASK |
|
||||
MVNETA_CPU_TXQ_ACCESS_ALL_MASK));
|
||||
|
||||
Reference in New Issue
Block a user