projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
396faf8
)
mm/early_ioremap.c: improve the execution efficiency of early_ioremap_setup()
author
Liam Ni
<zhiguangni01@gmail.com>
Sat, 3 Jun 2023 02:31:16 +0000
(10:31 +0800)
committer
Andrew Morton
<akpm@linux-foundation.org>
Fri, 9 Jun 2023 23:25:56 +0000
(16:25 -0700)
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 <zhiguangni01@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/early_ioremap.c
patch
|
blob
|
history
diff --git
a/mm/early_ioremap.c
b/mm/early_ioremap.c
index
9bc12e5
..
ce06b28
100644
(file)
--- a/
mm/early_ioremap.c
+++ b/
mm/early_ioremap.c
@@
-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)