Skip to content

Commit 7867299

Browse files
stefanchulskidavem330
authored andcommitted
net: mvpp2: fix interrupt mask/unmask skip condition
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: e531f76 ("net: mvpp2: handle cases where more CPUs are available than s/w threads") Reported-by: Russell King <[email protected]> Signed-off-by: Stefan Chulski <[email protected]> Reviewed-by: Russell King <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f79beba commit 7867299

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ static void mvpp2_interrupts_unmask(void *arg)
14091409
u32 val, thread;
14101410

14111411
/* If the thread isn't used, don't do anything */
1412-
if (cpu > port->priv->nthreads)
1412+
if (cpu >= port->priv->nthreads)
14131413
return;
14141414

14151415
thread = mvpp2_cpu_to_thread(port->priv, cpu);
@@ -2595,7 +2595,7 @@ static void mvpp2_txq_sent_counter_clear(void *arg)
25952595
int queue;
25962596

25972597
/* If the thread isn't used, don't do anything */
2598-
if (smp_processor_id() > port->priv->nthreads)
2598+
if (smp_processor_id() >= port->priv->nthreads)
25992599
return;
26002600

26012601
for (queue = 0; queue < port->ntxqs; queue++) {

0 commit comments

Comments
 (0)