linkage.h 721 B

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