code-patching-asm.h 397 B

123456789101112131415161718
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright 2018, Michael Ellerman, IBM Corporation.
  4. */
  5. #ifndef _ASM_POWERPC_CODE_PATCHING_ASM_H
  6. #define _ASM_POWERPC_CODE_PATCHING_ASM_H
  7. /* Define a "site" that can be patched */
  8. .macro patch_site label name
  9. .pushsection ".rodata"
  10. .balign 4
  11. .global \name
  12. \name:
  13. .4byte \label - .
  14. .popsection
  15. .endm
  16. #endif /* _ASM_POWERPC_CODE_PATCHING_ASM_H */