diff options
| author | Christophe Leroy <[email protected]> | 2021-12-02 12:00:18 +0000 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2021-12-23 11:35:24 +0000 |
| commit | af5304a7506588221d8317ef3f76585eb4483506 (patch) | |
| tree | 99678764ed14701a77caaf0129950e6abf0f2df7 /arch/powerpc/lib/code-patching.c | |
| parent | powerpc/code-patching: Remove pr_debug()/pr_devel() messages and fix check() (diff) | |
| download | kernel-af5304a7506588221d8317ef3f76585eb4483506.tar.gz kernel-af5304a7506588221d8317ef3f76585eb4483506.zip | |
powerpc/code-patching: Remove init_mem_is_free
A new state has been added by commit d2635f2012a4 ("mm: create a new
system state and fix core_kernel_text()"). That state tells when
initmem is about to be released and is redundant with init_mem_is_free.
Remove init_mem_is_free.
Signed-off-by: Christophe Leroy <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/ad8c3ccb39c8edaa89fd3eda1cc7218baea1cde5.1638446239.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
| -rw-r--r-- | arch/powerpc/lib/code-patching.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c index 7334ea99efd0..1c05fc725af8 100644 --- a/arch/powerpc/lib/code-patching.c +++ b/arch/powerpc/lib/code-patching.c @@ -15,7 +15,6 @@ #include <asm/tlbflush.h> #include <asm/page.h> #include <asm/code-patching.h> -#include <asm/setup.h> #include <asm/inst.h> static int __patch_instruction(u32 *exec_addr, ppc_inst_t instr, u32 *patch_addr) @@ -187,7 +186,7 @@ static int do_patch_instruction(u32 *addr, ppc_inst_t instr) int patch_instruction(u32 *addr, ppc_inst_t instr) { /* Make sure we aren't patching a freed init section */ - if (init_mem_is_free && init_section_contains(addr, 4)) + if (system_state >= SYSTEM_FREEING_INITMEM && init_section_contains(addr, 4)) return 0; return do_patch_instruction(addr, instr); |
