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

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

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
  3 
  4 #include <linux/sched.h>
  5 #include <linux/kernel_stat.h>
  6 #include <linux/kbuild.h>
  7 #include <abi/regdef.h>
  8 
  9 int main(void)
 10 {
 11         /* offsets into the task struct */
 12         DEFINE(TASK_THREAD_INFO,  offsetof(struct task_struct, stack));
 13         DEFINE(TASK_FLAGS,        offsetof(struct task_struct, flags));
 14         DEFINE(TASK_PTRACE,       offsetof(struct task_struct, ptrace));
 15         DEFINE(TASK_THREAD,       offsetof(struct task_struct, thread));
 16         DEFINE(TASK_MM,           offsetof(struct task_struct, mm));
 17         DEFINE(TASK_ACTIVE_MM,    offsetof(struct task_struct, active_mm));
 18 
 19         /* offsets into the thread struct */
 20         DEFINE(THREAD_KSP,        offsetof(struct thread_struct, sp));
 21         DEFINE(THREAD_FESR,       offsetof(struct thread_struct, user_fp.fesr));
 22         DEFINE(THREAD_FCR,        offsetof(struct thread_struct, user_fp.fcr));
 23         DEFINE(THREAD_FPREG,      offsetof(struct thread_struct, user_fp.vr));
 24 
 25         /* offsets into the thread_info struct */
 26         DEFINE(TINFO_FLAGS,       offsetof(struct thread_info, flags));
 27         DEFINE(TINFO_PREEMPT,     offsetof(struct thread_info, preempt_count));
 28         DEFINE(TINFO_TP_VALUE,   offsetof(struct thread_info, tp_value));
 29         DEFINE(TINFO_TASK,        offsetof(struct thread_info, task));
 30 
 31         /* offsets into the pt_regs */
 32         DEFINE(PT_PC,             offsetof(struct pt_regs, pc));
 33         DEFINE(PT_ORIG_AO,        offsetof(struct pt_regs, orig_a0));
 34         DEFINE(PT_SR,             offsetof(struct pt_regs, sr));
 35 
 36         DEFINE(PT_A0,             offsetof(struct pt_regs, a0));
 37         DEFINE(PT_A1,             offsetof(struct pt_regs, a1));
 38         DEFINE(PT_A2,             offsetof(struct pt_regs, a2));
 39         DEFINE(PT_A3,             offsetof(struct pt_regs, a3));
 40         DEFINE(PT_REGS0,          offsetof(struct pt_regs, regs[0]));
 41         DEFINE(PT_REGS1,          offsetof(struct pt_regs, regs[1]));
 42         DEFINE(PT_REGS2,          offsetof(struct pt_regs, regs[2]));
 43         DEFINE(PT_REGS3,          offsetof(struct pt_regs, regs[3]));
 44         DEFINE(PT_REGS4,          offsetof(struct pt_regs, regs[4]));
 45         DEFINE(PT_REGS5,          offsetof(struct pt_regs, regs[5]));
 46         DEFINE(PT_REGS6,          offsetof(struct pt_regs, regs[6]));
 47         DEFINE(PT_REGS7,          offsetof(struct pt_regs, regs[7]));
 48         DEFINE(PT_REGS8,          offsetof(struct pt_regs, regs[8]));
 49         DEFINE(PT_REGS9,          offsetof(struct pt_regs, regs[9]));
 50         DEFINE(PT_R15,            offsetof(struct pt_regs, lr));
 51 #if defined(__CSKYABIV2__)
 52         DEFINE(PT_R16,            offsetof(struct pt_regs, exregs[0]));
 53         DEFINE(PT_R17,            offsetof(struct pt_regs, exregs[1]));
 54         DEFINE(PT_R18,            offsetof(struct pt_regs, exregs[2]));
 55         DEFINE(PT_R19,            offsetof(struct pt_regs, exregs[3]));
 56         DEFINE(PT_R20,            offsetof(struct pt_regs, exregs[4]));
 57         DEFINE(PT_R21,            offsetof(struct pt_regs, exregs[5]));
 58         DEFINE(PT_R22,            offsetof(struct pt_regs, exregs[6]));
 59         DEFINE(PT_R23,            offsetof(struct pt_regs, exregs[7]));
 60         DEFINE(PT_R24,            offsetof(struct pt_regs, exregs[8]));
 61         DEFINE(PT_R25,            offsetof(struct pt_regs, exregs[9]));
 62         DEFINE(PT_R26,            offsetof(struct pt_regs, exregs[10]));
 63         DEFINE(PT_R27,            offsetof(struct pt_regs, exregs[11]));
 64         DEFINE(PT_R28,            offsetof(struct pt_regs, exregs[12]));
 65         DEFINE(PT_R29,            offsetof(struct pt_regs, exregs[13]));
 66         DEFINE(PT_R30,            offsetof(struct pt_regs, exregs[14]));
 67         DEFINE(PT_R31,            offsetof(struct pt_regs, exregs[15]));
 68         DEFINE(PT_RHI,            offsetof(struct pt_regs, rhi));
 69         DEFINE(PT_RLO,            offsetof(struct pt_regs, rlo));
 70 #endif
 71         DEFINE(PT_USP,            offsetof(struct pt_regs, usp));
 72         DEFINE(PT_FRAME_SIZE,     sizeof(struct pt_regs));
 73 
 74         /* offsets into the irq_cpustat_t struct */
 75         DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t,
 76                                                 __softirq_pending));
 77 
 78         /* signal defines */
 79         DEFINE(SIGSEGV, SIGSEGV);
 80         DEFINE(SIGTRAP, SIGTRAP);
 81 
 82         return 0;
 83 }
 84 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php