Skip to content

Commit b83f5ac

Browse files
tititiou36davem330
authored andcommitted
net: marvell: mvpp2: Fix the computation of shared CPUs
'bitmap_fill()' fills a bitmap one 'long' at a time. It is likely that an exact number of bits is expected. Use 'bitmap_set()' instead in order not to set unexpected bits. Fixes: e531f76 ("net: mvpp2: handle cases where more CPUs are available than s/w threads") Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1a59c9c commit b83f5ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7458,7 +7458,7 @@ static int mvpp2_probe(struct platform_device *pdev)
74587458

74597459
shared = num_present_cpus() - priv->nthreads;
74607460
if (shared > 0)
7461-
bitmap_fill(&priv->lock_map,
7461+
bitmap_set(&priv->lock_map, 0,
74627462
min_t(int, shared, MVPP2_MAX_THREADS));
74637463

74647464
for (i = 0; i < MVPP2_MAX_THREADS; i++) {

0 commit comments

Comments
 (0)