diff options
| author | Christophe Leroy <[email protected]> | 2022-03-22 15:40:18 +0000 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2022-05-08 12:15:41 +0000 |
| commit | cb3ac45214c03852430979a43180371a44b74596 (patch) | |
| tree | 6ab9c9d1fba2707d16e9c6c396f3a963eafde0f9 /arch/powerpc/lib/code-patching.c | |
| parent | powerpc: align address to page boundary in change_page_attr() (diff) | |
| download | kernel-cb3ac45214c03852430979a43180371a44b74596.tar.gz kernel-cb3ac45214c03852430979a43180371a44b74596.zip | |
powerpc/code-patching: Don't call is_vmalloc_or_module_addr() without CONFIG_MODULES
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 <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/f3c701cce00a38620788c0fc43ff0b611a268c54.1647962456.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
| -rw-r--r-- | arch/powerpc/lib/code-patching.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c index 00c68e7fb11e..f970f189875b 100644 --- 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; |
