Linux Audio

Check our new training course

Loading...
v5.14.15
 1// SPDX-License-Identifier: GPL-2.0-or-later
 2/*
 3 * Copyright 2010 Michael Ellerman, IBM Corp.
 
 
 
 
 
 4 */
 5
 6#include <linux/kernel.h>
 7#include <linux/jump_label.h>
 8#include <asm/code-patching.h>
 9#include <asm/inst.h>
10
 
11void arch_jump_label_transform(struct jump_entry *entry,
12			       enum jump_label_type type)
13{
14	u32 *addr = (u32 *)jump_entry_code(entry);
15
16	if (type == JUMP_LABEL_JMP)
17		patch_branch(addr, jump_entry_target(entry), 0);
18	else
19		patch_instruction(addr, ppc_inst(PPC_RAW_NOP()));
20}
v3.5.6
 
 1/*
 2 * Copyright 2010 Michael Ellerman, IBM Corp.
 3 *
 4 * This program is free software; you can redistribute it and/or
 5 * modify it under the terms of the GNU General Public License
 6 * as published by the Free Software Foundation; either version
 7 * 2 of the License, or (at your option) any later version.
 8 */
 9
10#include <linux/kernel.h>
11#include <linux/jump_label.h>
12#include <asm/code-patching.h>
 
13
14#ifdef HAVE_JUMP_LABEL
15void arch_jump_label_transform(struct jump_entry *entry,
16			       enum jump_label_type type)
17{
18	u32 *addr = (u32 *)(unsigned long)entry->code;
19
20	if (type == JUMP_LABEL_ENABLE)
21		patch_branch(addr, entry->target, 0);
22	else
23		patch_instruction(addr, PPC_INST_NOP);
24}
25#endif