Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1232923
| From | Gregory CLEMENT <gregory.clement@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 4/7] net: mvneta: Fix CPU_MAP registers initialisation |
| Date | 2015-09-25 18:20 +0200 |
| Message-ID | <qcDT4-6vz-35@gated-at.bofh.it> (permalink) |
| References | <qcDT3-6vz-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Maxime Ripard <maxime.ripard@free-electrons.com>
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>
---
drivers/net/ethernet/marvell/mvneta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index fe2299ac4f5c..ea587d964c46 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -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));
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/7] net: mvneta: Switch to per-CPU irq and make rxq_def useful Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-09-25 18:20 +0200
[PATCH v2 7/7] net: mvneta: Statically assign queues to CPUs Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-09-25 18:20 +0200
[PATCH v2 5/7] net: mvneta: Handle per-cpu interrupts Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-09-25 18:20 +0200
[PATCH v2 4/7] net: mvneta: Fix CPU_MAP registers initialisation Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-09-25 18:20 +0200
[PATCH v2 1/7] genirq: Fix the documentation of request_percpu_irq Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-09-25 18:20 +0200
Re: [PATCH v2 0/7] net: mvneta: Switch to per-CPU irq and make rxq_def useful David Miller <davem@davemloft.net> - 2015-09-29 21:00 +0200
Re: [PATCH v2 0/7] net: mvneta: Switch to per-CPU irq and make rxq_def useful Thomas Gleixner <tglx@linutronix.de> - 2015-09-30 17:00 +0200
Re: [PATCH v2 0/7] net: mvneta: Switch to per-CPU irq and make rxq_def useful David Miller <davem@davemloft.net> - 2015-09-30 17:50 +0200
Re: [PATCH v2 0/7] net: mvneta: Switch to per-CPU irq and make rxq_def useful Thomas Gleixner <tglx@linutronix.de> - 2015-09-30 19:50 +0200
Re: [PATCH v2 0/7] net: mvneta: Switch to per-CPU irq and make rxq_def useful Thomas Gleixner <tglx@linutronix.de> - 2015-09-30 17:00 +0200
csiph-web