]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: mvneta: Remove per-cpu queue mapping for Armada 3700
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Tue, 16 Feb 2021 09:25:35 +0000 (10:25 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 15 Mar 2021 14:09:00 +0000 (15:09 +0100)
[ Upstream commit cf9bf871280d9e0a8869d98c2602d29caf69dfa3 ]

According to Errata #23 "The per-CPU GbE interrupt is limited to Core
0", we can't use the per-cpu interrupt mechanism on the Armada 3700
familly.

This is correctly checked for RSS configuration, but the initial queue
mapping is still done by having the queues spread across all the CPUs in
the system, both in the init path and in the cpu_hotplug path.

Fixes: 2636ac3cc2b4 ("net: mvneta: Add network support for Armada 3700 SoC")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/net/ethernet/marvell/mvneta.c

index bc4d8d14440199b5d3d548204d010927ae1802d6..fd5b33646ea71ad14810e42c6d7be8dd4f53ffcd 100644 (file)
@@ -3432,7 +3432,9 @@ static int mvneta_txq_sw_init(struct mvneta_port *pp,
                return -ENOMEM;
 
        /* Setup XPS mapping */
-       if (txq_number > 1)
+       if (pp->neta_armada3700)
+               cpu = 0;
+       else if (txq_number > 1)
                cpu = txq->id % num_present_cpus();
        else
                cpu = pp->rxq_def % num_present_cpus();
@@ -4210,6 +4212,11 @@ static int mvneta_cpu_online(unsigned int cpu, struct hlist_node *node)
                                                  node_online);
        struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu);
 
+       /* Armada 3700's per-cpu interrupt for mvneta is broken, all interrupts
+        * are routed to CPU 0, so we don't need all the cpu-hotplug support
+        */
+       if (pp->neta_armada3700)
+               return 0;
 
        spin_lock(&pp->lock);
        /*