xref: /kernel/linux/linux-5.10/arch/powerpc/kernel/jump_label.c (revision 8c2ecf20)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/arch/powerpc/kernel/
18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright 2010 Michael Ellerman, IBM Corp.
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#include <linux/kernel.h>
78c2ecf20Sopenharmony_ci#include <linux/jump_label.h>
88c2ecf20Sopenharmony_ci#include <asm/code-patching.h>
98c2ecf20Sopenharmony_ci#include <asm/inst.h>
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_civoid arch_jump_label_transform(struct jump_entry *entry,
128c2ecf20Sopenharmony_ci			       enum jump_label_type type)
138c2ecf20Sopenharmony_ci{
148c2ecf20Sopenharmony_ci	struct ppc_inst *addr = (struct ppc_inst *)(unsigned long)entry->code;
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci	if (type == JUMP_LABEL_JMP)
178c2ecf20Sopenharmony_ci		patch_branch(addr, entry->target, 0);
188c2ecf20Sopenharmony_ci	else
198c2ecf20Sopenharmony_ci		patch_instruction(addr, ppc_inst(PPC_INST_NOP));
208c2ecf20Sopenharmony_ci}
21

Indexes created Thu Nov 07 10:32:03 CST 2024