asm-offsets.c 889 B

12345678910111213141516171819202122232425262728293031
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Generate definitions needed by assembly language modules.
  4. * This code generates raw asm output which is post-processed to extract
  5. * and format the required data.
  6. */
  7. #include <linux/types.h>
  8. #include <linux/stddef.h>
  9. #include <linux/sched.h>
  10. #include <linux/ptrace.h>
  11. #include <linux/kbuild.h>
  12. #include <asm/machvec.h>
  13. static void __used foo(void)
  14. {
  15. DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
  16. DEFINE(TI_FP, offsetof(struct thread_info, fp));
  17. DEFINE(TI_STATUS, offsetof(struct thread_info, status));
  18. BLANK();
  19. DEFINE(SP_OFF, offsetof(struct pt_regs, ps));
  20. DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
  21. BLANK();
  22. DEFINE(SWITCH_STACK_SIZE, sizeof(struct switch_stack));
  23. BLANK();
  24. DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache));
  25. DEFINE(HAE_REG, offsetof(struct alpha_machine_vector, hae_register));
  26. }