asm-offsets.c 660 B

123456789101112131415161718192021222324
  1. /*
  2. * Generate definitions needed by assembly language modules.
  3. * This code generates raw asm output which is post-processed
  4. * to extract and format the required data.
  5. */
  6. #include <linux/mm.h>
  7. #include <linux/sched.h>
  8. #include <linux/thread_info.h>
  9. #include <linux/kbuild.h>
  10. void foo(void)
  11. {
  12. OFFSET(TI_task, thread_info, task);
  13. OFFSET(TI_flags, thread_info, flags);
  14. OFFSET(TI_cpu, thread_info, cpu);
  15. OFFSET(TI_preempt_count, thread_info, preempt_count);
  16. OFFSET(TI_rar_saved, thread_info, rar_saved);
  17. OFFSET(TI_rsr_saved, thread_info, rsr_saved);
  18. BLANK();
  19. OFFSET(TSK_active_mm, task_struct, active_mm);
  20. BLANK();
  21. OFFSET(MM_pgd, mm_struct, pgd);
  22. }