mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
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 <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
This commit is contained in:
parent
65883b78bc
commit
cb3ac45214
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ static int map_patch_area(void *addr, unsigned long text_poke_addr)
|
||||||
{
|
{
|
||||||
unsigned long pfn;
|
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);
|
pfn = vmalloc_to_pfn(addr);
|
||||||
else
|
else
|
||||||
pfn = __pa_symbol(addr) >> PAGE_SHIFT;
|
pfn = __pa_symbol(addr) >> PAGE_SHIFT;
|
||||||
|
|
Loading…
Reference in a new issue