~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/h8300/kernel/asm-offsets.c

Version: ~ [ linux-5.3 ] ~ [ linux-5.2.15 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.73 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.144 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.193 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.193 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.73 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * This program is used to generate definitions needed by
  3  * assembly language modules.
  4  *
  5  * We use the technique used in the OSF Mach kernel code:
  6  * generate asm statements containing #defines,
  7  * compile this file to assembler, and then extract the
  8  * #defines from the assembly-language output.
  9  */
 10 
 11 #include <linux/stddef.h>
 12 #include <linux/sched.h>
 13 #include <linux/kernel_stat.h>
 14 #include <linux/ptrace.h>
 15 #include <linux/hardirq.h>
 16 #include <linux/kbuild.h>
 17 #include <asm/irq.h>
 18 #include <asm/ptrace.h>
 19 
 20 int main(void)
 21 {
 22         /* offsets into the task struct */
 23         OFFSET(TASK_STATE, task_struct, state);
 24         OFFSET(TASK_FLAGS, task_struct, flags);
 25         OFFSET(TASK_PTRACE, task_struct, ptrace);
 26         OFFSET(TASK_BLOCKED, task_struct, blocked);
 27         OFFSET(TASK_THREAD, task_struct, thread);
 28         OFFSET(TASK_THREAD_INFO, task_struct, stack);
 29         OFFSET(TASK_MM, task_struct, mm);
 30         OFFSET(TASK_ACTIVE_MM, task_struct, active_mm);
 31 
 32         /* offsets into the irq_cpustat_t struct */
 33         DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t,
 34                                                  __softirq_pending));
 35 
 36         /* offsets into the thread struct */
 37         OFFSET(THREAD_KSP, thread_struct, ksp);
 38         OFFSET(THREAD_USP, thread_struct, usp);
 39         OFFSET(THREAD_CCR, thread_struct, ccr);
 40 
 41         /* offsets into the pt_regs struct */
 42         DEFINE(LER0,  offsetof(struct pt_regs, er0)      - sizeof(long));
 43         DEFINE(LER1,  offsetof(struct pt_regs, er1)      - sizeof(long));
 44         DEFINE(LER2,  offsetof(struct pt_regs, er2)      - sizeof(long));
 45         DEFINE(LER3,  offsetof(struct pt_regs, er3)      - sizeof(long));
 46         DEFINE(LER4,  offsetof(struct pt_regs, er4)      - sizeof(long));
 47         DEFINE(LER5,  offsetof(struct pt_regs, er5)      - sizeof(long));
 48         DEFINE(LER6,  offsetof(struct pt_regs, er6)      - sizeof(long));
 49         DEFINE(LORIG, offsetof(struct pt_regs, orig_er0) - sizeof(long));
 50         DEFINE(LSP,   offsetof(struct pt_regs, sp)       - sizeof(long));
 51         DEFINE(LCCR,  offsetof(struct pt_regs, ccr)      - sizeof(long));
 52         DEFINE(LVEC,  offsetof(struct pt_regs, vector)   - sizeof(long));
 53 #if defined(CONFIG_CPU_H8S)
 54         DEFINE(LEXR,  offsetof(struct pt_regs, exr)      - sizeof(long));
 55 #endif
 56         DEFINE(LRET,  offsetof(struct pt_regs, pc)       - sizeof(long));
 57 
 58         DEFINE(PT_PTRACED, PT_PTRACED);
 59 
 60         /* offsets in thread_info structure */
 61         OFFSET(TI_TASK, thread_info, task);
 62         OFFSET(TI_FLAGS, thread_info, flags);
 63         OFFSET(TI_CPU, thread_info, cpu);
 64         OFFSET(TI_PRE, thread_info, preempt_count);
 65 
 66         return 0;
 67 }
 68 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp