mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
net: mvpp2: fix interrupt mask/unmask skip condition
[ Upstream commit 7867299cde34e9c2d2c676f2a384a9d5853b914d ]
The condition should be skipped if CPU ID equal to nthreads.
The patch doesn't fix any actual issue since
nthreads = min_t(unsigned int, num_present_cpus(), MVPP2_MAX_THREADS).
On all current Armada platforms, the number of CPU's is
less than MVPP2_MAX_THREADS.
Fixes: e531f76757 ("net: mvpp2: handle cases where more CPUs are available than s/w threads")
Reported-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Stefan Chulski <stefanc@marvell.com>
Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
aa9345d10f
commit
ee5055593d
1 changed files with 2 additions and 2 deletions
|
|
@ -1073,7 +1073,7 @@ static void mvpp2_interrupts_unmask(void *arg)
|
|||
u32 val;
|
||||
|
||||
/* If the thread isn't used, don't do anything */
|
||||
if (smp_processor_id() > port->priv->nthreads)
|
||||
if (smp_processor_id() >= port->priv->nthreads)
|
||||
return;
|
||||
|
||||
val = MVPP2_CAUSE_MISC_SUM_MASK |
|
||||
|
|
@ -2078,7 +2078,7 @@ static void mvpp2_txq_sent_counter_clear(void *arg)
|
|||
int queue;
|
||||
|
||||
/* If the thread isn't used, don't do anything */
|
||||
if (smp_processor_id() > port->priv->nthreads)
|
||||
if (smp_processor_id() >= port->priv->nthreads)
|
||||
return;
|
||||
|
||||
for (queue = 0; queue < port->ntxqs; queue++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue