module.h 847 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_M68K_MODULE_H
  3. #define _ASM_M68K_MODULE_H
  4. #include <asm-generic/module.h>
  5. enum m68k_fixup_type {
  6. m68k_fixup_memoffset,
  7. m68k_fixup_vnode_shift,
  8. };
  9. struct m68k_fixup_info {
  10. enum m68k_fixup_type type;
  11. void *addr;
  12. };
  13. struct mod_arch_specific {
  14. struct m68k_fixup_info *fixup_start, *fixup_end;
  15. };
  16. #ifdef CONFIG_MMU
  17. #define MODULE_ARCH_INIT { \
  18. .fixup_start = __start_fixup, \
  19. .fixup_end = __stop_fixup, \
  20. }
  21. #define m68k_fixup(type, addr) \
  22. " .section \".m68k_fixup\",\"aw\"\n" \
  23. " .long " #type "," #addr "\n" \
  24. " .previous\n"
  25. #endif /* CONFIG_MMU */
  26. extern struct m68k_fixup_info __start_fixup[], __stop_fixup[];
  27. struct module;
  28. extern void module_fixup(struct module *mod, struct m68k_fixup_info *start,
  29. struct m68k_fixup_info *end);
  30. #endif /* _ASM_M68K_MODULE_H */