linkage.h 633 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_LINKAGE_H
  3. #define __ASM_LINKAGE_H
  4. #include <linux/stringify.h>
  5. #define __ALIGN .align 4, 0x07
  6. #define __ALIGN_STR __stringify(__ALIGN)
  7. #ifndef __ASSEMBLY__
  8. /*
  9. * Helper macro for exception table entries
  10. */
  11. #define EX_TABLE(_fault, _target) \
  12. ".section __ex_table,\"a\"\n" \
  13. ".align 4\n" \
  14. ".long (" #_fault ") - .\n" \
  15. ".long (" #_target ") - .\n" \
  16. ".previous\n"
  17. #else /* __ASSEMBLY__ */
  18. #define EX_TABLE(_fault, _target) \
  19. .section __ex_table,"a" ; \
  20. .align 4 ; \
  21. .long (_fault) - . ; \
  22. .long (_target) - . ; \
  23. .previous
  24. #endif /* __ASSEMBLY__ */
  25. #endif