projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65883b7
)
powerpc/code-patching: Don't call is_vmalloc_or_module_addr() without CONFIG_MODULES
author
Christophe Leroy
<christophe.leroy@csgroup.eu>
Tue, 22 Mar 2022 15:40:18 +0000
(16:40 +0100)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Sun, 8 May 2022 12:15:41 +0000
(22:15 +1000)
If CONFIG_MODULES is not set, there is no point in checking
whether text is in module area.
This reduced the time needed to activate/deactivate ftrace
by more than 10% on an 8xx.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://lore.kernel.org/r/f3c701cce00a38620788c0fc43ff0b611a268c54.1647962456.git.christophe.leroy@csgroup.eu
arch/powerpc/lib/code-patching.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/lib/code-patching.c
b/arch/powerpc/lib/code-patching.c
index 00c68e7fb11e4cd13b20c85c8783dd921168f86f..f970f189875b47986cc1e03045fcd747f0296b81 100644
(file)
--- a/
arch/powerpc/lib/code-patching.c
+++ b/
arch/powerpc/lib/code-patching.c
@@
-97,7
+97,7
@@
static int map_patch_area(void *addr, unsigned long text_poke_addr)
{
unsigned long pfn;
- if (is_vmalloc_or_module_addr(addr))
+ if (
IS_ENABLED(CONFIG_MODULES) &&
is_vmalloc_or_module_addr(addr))
pfn = vmalloc_to_pfn(addr);
else
pfn = __pa_symbol(addr) >> PAGE_SHIFT;