Merge tag 'sched-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / powerpc / kernel / jump_label.c
blob144858027fa38f245e04301bef8b6b0539b955d1
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright 2010 Michael Ellerman, IBM Corp.
4 */
6 #include <linux/kernel.h>
7 #include <linux/jump_label.h>
8 #include <asm/code-patching.h>
9 #include <asm/inst.h>
11 void arch_jump_label_transform(struct jump_entry *entry,
12 enum jump_label_type type)
14 struct ppc_inst *addr = (struct ppc_inst *)(unsigned long)entry->code;
16 if (type == JUMP_LABEL_JMP)
17 patch_branch(addr, entry->target, 0);
18 else
19 patch_instruction(addr, ppc_inst(PPC_INST_NOP));