summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/code-patching-asm.h
blob: ed7b1448493a76911ec8b67f23c7793117fee119 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright 2018, Michael Ellerman, IBM Corporation.
 */
#ifndef _ASM_POWERPC_CODE_PATCHING_ASM_H
#define _ASM_POWERPC_CODE_PATCHING_ASM_H

/* Define a "site" that can be patched */
.macro patch_site label name
	.pushsection ".rodata"
	.balign 4
	.global \name
\name:
	.4byte	\label - .
	.popsection
.endm

#endif /* _ASM_POWERPC_CODE_PATCHING_ASM_H */