Skip to content

Commit

Permalink
mm/early_ioremap.c: improve the execution efficiency of early_ioremap…
Browse files Browse the repository at this point in the history
…_setup()

Reduce the number of invalid loops of the function early_ioremap_setup()
to improve the efficiency of function execution

Link: https://lkml.kernel.org/r/CACZJ9cU6t5sLoDwE6_XOg+UJLpZt4+qHfjYN2bA0s+3y9y6pQQ@mail.gmail.com
Signed-off-by: LiamNi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
Liam Ni authored and akpm00 committed Jun 9, 2023
1 parent 396faf8 commit 5e07472
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions mm/early_ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,10 @@ void __init early_ioremap_setup(void)
{
int i;

for (i = 0; i < FIX_BTMAPS_SLOTS; i++)
if (WARN_ON(prev_map[i]))
break;

for (i = 0; i < FIX_BTMAPS_SLOTS; i++)
for (i = 0; i < FIX_BTMAPS_SLOTS; i++) {
WARN_ON_ONCE(prev_map[i]);
slot_virt[i] = __fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i);
}
}

static int __init check_early_ioremap_leak(void)
Expand Down

0 comments on commit 5e07472

Please sign in to comment.