net: mvneta: Fix CPU_MAP registers initialisation
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Fri, 25 Sep 2015 16:09:35 +0000 (18:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Sep 2015 18:51:40 +0000 (11:51 -0700)
commit2502d0ef272da7058ef303b849a2c8dc324c2e2e
treea2abd1513e432f20d6091aa0b8fea00348086fe1
parent080481f97f425f89440386d02201c1d014f9e0dc
net: mvneta: Fix CPU_MAP registers initialisation

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: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit")
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: <stable@vger.kernel.org> # v3.8+
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c