Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Copyright 2010 Michael Ellerman, IBM Corp.
0004  */
0005 
0006 #include <linux/kernel.h>
0007 #include <linux/jump_label.h>
0008 #include <asm/code-patching.h>
0009 #include <asm/inst.h>
0010 
0011 void arch_jump_label_transform(struct jump_entry *entry,
0012                    enum jump_label_type type)
0013 {
0014     u32 *addr = (u32 *)jump_entry_code(entry);
0015 
0016     if (type == JUMP_LABEL_JMP)
0017         patch_branch(addr, jump_entry_target(entry), 0);
0018     else
0019         patch_instruction(addr, ppc_inst(PPC_RAW_NOP()));
0020 }