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

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

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ 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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/arm64/kernel/asm-offsets.c (Version linux-6.12-rc7) and /arch/alpha/kernel/asm-offsets.c (Version linux-4.16.18)


  1 // SPDX-License-Identifier: GPL-2.0-only       !!   1 // SPDX-License-Identifier: GPL-2.0
  2 /*                                                  2 /*
  3  * Based on arch/arm/kernel/asm-offsets.c      !!   3  * Generate definitions needed by assembly language modules.
  4  *                                             !!   4  * This code generates raw asm output which is post-processed to extract
  5  * Copyright (C) 1995-2003 Russell King        !!   5  * and format the required data.
  6  *               2001-2002 Keith Owens         << 
  7  * Copyright (C) 2012 ARM Ltd.                 << 
  8  */                                                 6  */
  9                                                     7 
 10 #include <linux/arm_sdei.h>                    !!   8 #include <linux/types.h>
                                                   >>   9 #include <linux/stddef.h>
 11 #include <linux/sched.h>                           10 #include <linux/sched.h>
 12 #include <linux/ftrace.h>                      !!  11 #include <linux/ptrace.h>
 13 #include <linux/kexec.h>                       << 
 14 #include <linux/mm.h>                          << 
 15 #include <linux/dma-mapping.h>                 << 
 16 #include <linux/kvm_host.h>                    << 
 17 #include <linux/preempt.h>                     << 
 18 #include <linux/suspend.h>                     << 
 19 #include <asm/cpufeature.h>                    << 
 20 #include <asm/fixmap.h>                        << 
 21 #include <asm/thread_info.h>                   << 
 22 #include <asm/memory.h>                        << 
 23 #include <asm/signal32.h>                      << 
 24 #include <asm/smp_plat.h>                      << 
 25 #include <asm/suspend.h>                       << 
 26 #include <linux/kbuild.h>                          12 #include <linux/kbuild.h>
 27 #include <linux/arm-smccc.h>                   !!  13 #include <asm/io.h>
 28                                                    14 
 29 int main(void)                                 !!  15 void foo(void)
 30 {                                                  16 {
 31   DEFINE(TSK_ACTIVE_MM,         offsetof(struc !!  17         DEFINE(TI_TASK, offsetof(struct thread_info, task));
 32   BLANK();                                     !!  18         DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
 33   DEFINE(TSK_TI_CPU,            offsetof(struc !!  19         DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
 34   DEFINE(TSK_TI_FLAGS,          offsetof(struc !!  20         BLANK();
 35   DEFINE(TSK_TI_PREEMPT,        offsetof(struc !!  21 
 36 #ifdef CONFIG_ARM64_SW_TTBR0_PAN               !!  22         DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
 37   DEFINE(TSK_TI_TTBR0,          offsetof(struc !!  23         DEFINE(TASK_CRED, offsetof(struct task_struct, cred));
 38 #endif                                         !!  24         DEFINE(TASK_REAL_PARENT, offsetof(struct task_struct, real_parent));
 39 #ifdef CONFIG_SHADOW_CALL_STACK                !!  25         DEFINE(TASK_GROUP_LEADER, offsetof(struct task_struct, group_leader));
 40   DEFINE(TSK_TI_SCS_BASE,       offsetof(struc !!  26         DEFINE(TASK_TGID, offsetof(struct task_struct, tgid));
 41   DEFINE(TSK_TI_SCS_SP,         offsetof(struc !!  27         BLANK();
 42 #endif                                         !!  28 
 43   DEFINE(TSK_STACK,             offsetof(struc !!  29         DEFINE(CRED_UID,  offsetof(struct cred, uid));
 44 #ifdef CONFIG_STACKPROTECTOR                   !!  30         DEFINE(CRED_EUID, offsetof(struct cred, euid));
 45   DEFINE(TSK_STACK_CANARY,      offsetof(struc !!  31         DEFINE(CRED_GID,  offsetof(struct cred, gid));
 46 #endif                                         !!  32         DEFINE(CRED_EGID, offsetof(struct cred, egid));
 47   BLANK();                                     !!  33         BLANK();
 48   DEFINE(THREAD_CPU_CONTEXT,    offsetof(struc !!  34 
 49   DEFINE(THREAD_SCTLR_USER,     offsetof(struc !!  35         DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
 50 #ifdef CONFIG_ARM64_PTR_AUTH                   !!  36         DEFINE(PT_PTRACED, PT_PTRACED);
 51   DEFINE(THREAD_KEYS_USER,      offsetof(struc !!  37         DEFINE(CLONE_VM, CLONE_VM);
 52 #endif                                         !!  38         DEFINE(CLONE_UNTRACED, CLONE_UNTRACED);
 53 #ifdef CONFIG_ARM64_PTR_AUTH_KERNEL            !!  39         DEFINE(SIGCHLD, SIGCHLD);
 54   DEFINE(THREAD_KEYS_KERNEL,    offsetof(struc !!  40         BLANK();
 55 #endif                                         !!  41 
 56 #ifdef CONFIG_ARM64_MTE                        !!  42         DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache));
 57   DEFINE(THREAD_MTE_CTRL,       offsetof(struc !!  43         DEFINE(HAE_REG, offsetof(struct alpha_machine_vector, hae_register));
 58 #endif                                         << 
 59   BLANK();                                     << 
 60   DEFINE(S_X0,                  offsetof(struc << 
 61   DEFINE(S_X2,                  offsetof(struc << 
 62   DEFINE(S_X4,                  offsetof(struc << 
 63   DEFINE(S_X6,                  offsetof(struc << 
 64   DEFINE(S_X8,                  offsetof(struc << 
 65   DEFINE(S_X10,                 offsetof(struc << 
 66   DEFINE(S_X12,                 offsetof(struc << 
 67   DEFINE(S_X14,                 offsetof(struc << 
 68   DEFINE(S_X16,                 offsetof(struc << 
 69   DEFINE(S_X18,                 offsetof(struc << 
 70   DEFINE(S_X20,                 offsetof(struc << 
 71   DEFINE(S_X22,                 offsetof(struc << 
 72   DEFINE(S_X24,                 offsetof(struc << 
 73   DEFINE(S_X26,                 offsetof(struc << 
 74   DEFINE(S_X28,                 offsetof(struc << 
 75   DEFINE(S_FP,                  offsetof(struc << 
 76   DEFINE(S_LR,                  offsetof(struc << 
 77   DEFINE(S_SP,                  offsetof(struc << 
 78   DEFINE(S_PC,                  offsetof(struc << 
 79   DEFINE(S_PSTATE,              offsetof(struc << 
 80   DEFINE(S_SYSCALLNO,           offsetof(struc << 
 81   DEFINE(S_SDEI_TTBR1,          offsetof(struc << 
 82   DEFINE(S_PMR_SAVE,            offsetof(struc << 
 83   DEFINE(S_STACKFRAME,          offsetof(struc << 
 84   DEFINE(PT_REGS_SIZE,          sizeof(struct  << 
 85   BLANK();                                     << 
 86 #ifdef CONFIG_DYNAMIC_FTRACE_WITH_ARGS         << 
 87   DEFINE(FREGS_X0,              offsetof(struc << 
 88   DEFINE(FREGS_X2,              offsetof(struc << 
 89   DEFINE(FREGS_X4,              offsetof(struc << 
 90   DEFINE(FREGS_X6,              offsetof(struc << 
 91   DEFINE(FREGS_X8,              offsetof(struc << 
 92   DEFINE(FREGS_FP,              offsetof(struc << 
 93   DEFINE(FREGS_LR,              offsetof(struc << 
 94   DEFINE(FREGS_SP,              offsetof(struc << 
 95   DEFINE(FREGS_PC,              offsetof(struc << 
 96 #ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS << 
 97   DEFINE(FREGS_DIRECT_TRAMP,    offsetof(struc << 
 98 #endif                                         << 
 99   DEFINE(FREGS_SIZE,            sizeof(struct  << 
100   BLANK();                                     << 
101 #endif                                         << 
102 #ifdef CONFIG_COMPAT                           << 
103   DEFINE(COMPAT_SIGFRAME_REGS_OFFSET,          << 
104   DEFINE(COMPAT_RT_SIGFRAME_REGS_OFFSET,       << 
105   BLANK();                                     << 
106 #endif                                         << 
107   DEFINE(MM_CONTEXT_ID,         offsetof(struc << 
108   BLANK();                                     << 
109   DEFINE(VMA_VM_MM,             offsetof(struc << 
110   DEFINE(VMA_VM_FLAGS,          offsetof(struc << 
111   BLANK();                                     << 
112   DEFINE(VM_EXEC,               VM_EXEC);      << 
113   BLANK();                                     << 
114   DEFINE(PAGE_SZ,               PAGE_SIZE);    << 
115   BLANK();                                     << 
116   DEFINE(DMA_TO_DEVICE,         DMA_TO_DEVICE) << 
117   DEFINE(DMA_FROM_DEVICE,       DMA_FROM_DEVIC << 
118   BLANK();                                     << 
119   DEFINE(PREEMPT_DISABLE_OFFSET, PREEMPT_DISAB << 
120   BLANK();                                     << 
121   DEFINE(CPU_BOOT_TASK,         offsetof(struc << 
122   BLANK();                                     << 
123   DEFINE(FTR_OVR_VAL_OFFSET,    offsetof(struc << 
124   DEFINE(FTR_OVR_MASK_OFFSET,   offsetof(struc << 
125   BLANK();                                     << 
126 #ifdef CONFIG_KVM                              << 
127   DEFINE(VCPU_CONTEXT,          offsetof(struc << 
128   DEFINE(VCPU_FAULT_DISR,       offsetof(struc << 
129   DEFINE(VCPU_HCR_EL2,          offsetof(struc << 
130   DEFINE(CPU_USER_PT_REGS,      offsetof(struc << 
131   DEFINE(CPU_ELR_EL2,           offsetof(struc << 
132   DEFINE(CPU_RGSR_EL1,          offsetof(struc << 
133   DEFINE(CPU_GCR_EL1,           offsetof(struc << 
134   DEFINE(CPU_APIAKEYLO_EL1,     offsetof(struc << 
135   DEFINE(CPU_APIBKEYLO_EL1,     offsetof(struc << 
136   DEFINE(CPU_APDAKEYLO_EL1,     offsetof(struc << 
137   DEFINE(CPU_APDBKEYLO_EL1,     offsetof(struc << 
138   DEFINE(CPU_APGAKEYLO_EL1,     offsetof(struc << 
139   DEFINE(HOST_CONTEXT_VCPU,     offsetof(struc << 
140   DEFINE(HOST_DATA_CONTEXT,     offsetof(struc << 
141   DEFINE(NVHE_INIT_MAIR_EL2,    offsetof(struc << 
142   DEFINE(NVHE_INIT_TCR_EL2,     offsetof(struc << 
143   DEFINE(NVHE_INIT_TPIDR_EL2,   offsetof(struc << 
144   DEFINE(NVHE_INIT_STACK_HYP_VA,        offset << 
145   DEFINE(NVHE_INIT_PGD_PA,      offsetof(struc << 
146   DEFINE(NVHE_INIT_HCR_EL2,     offsetof(struc << 
147   DEFINE(NVHE_INIT_VTTBR,       offsetof(struc << 
148   DEFINE(NVHE_INIT_VTCR,        offsetof(struc << 
149   DEFINE(NVHE_INIT_TMP,         offsetof(struc << 
150 #endif                                         << 
151 #ifdef CONFIG_CPU_PM                           << 
152   DEFINE(CPU_CTX_SP,            offsetof(struc << 
153   DEFINE(MPIDR_HASH_MASK,       offsetof(struc << 
154   DEFINE(MPIDR_HASH_SHIFTS,     offsetof(struc << 
155   DEFINE(SLEEP_STACK_DATA_SYSTEM_REGS,  offset << 
156   DEFINE(SLEEP_STACK_DATA_CALLEE_REGS,  offset << 
157 #endif                                         << 
158   DEFINE(ARM_SMCCC_RES_X0_OFFS,         offset << 
159   DEFINE(ARM_SMCCC_RES_X2_OFFS,         offset << 
160   DEFINE(ARM_SMCCC_QUIRK_ID_OFFS,       offset << 
161   DEFINE(ARM_SMCCC_QUIRK_STATE_OFFS,    offset << 
162   DEFINE(ARM_SMCCC_1_2_REGS_X0_OFFS,    offset << 
163   DEFINE(ARM_SMCCC_1_2_REGS_X2_OFFS,    offset << 
164   DEFINE(ARM_SMCCC_1_2_REGS_X4_OFFS,    offset << 
165   DEFINE(ARM_SMCCC_1_2_REGS_X6_OFFS,    offset << 
166   DEFINE(ARM_SMCCC_1_2_REGS_X8_OFFS,    offset << 
167   DEFINE(ARM_SMCCC_1_2_REGS_X10_OFFS,   offset << 
168   DEFINE(ARM_SMCCC_1_2_REGS_X12_OFFS,   offset << 
169   DEFINE(ARM_SMCCC_1_2_REGS_X14_OFFS,   offset << 
170   DEFINE(ARM_SMCCC_1_2_REGS_X16_OFFS,   offset << 
171   BLANK();                                     << 
172   DEFINE(HIBERN_PBE_ORIG,       offsetof(struc << 
173   DEFINE(HIBERN_PBE_ADDR,       offsetof(struc << 
174   DEFINE(HIBERN_PBE_NEXT,       offsetof(struc << 
175   DEFINE(ARM64_FTR_SYSVAL,      offsetof(struc << 
176   BLANK();                                     << 
177 #ifdef CONFIG_UNMAP_KERNEL_AT_EL0              << 
178   DEFINE(TRAMP_VALIAS,          TRAMP_VALIAS); << 
179 #endif                                         << 
180 #ifdef CONFIG_ARM_SDE_INTERFACE                << 
181   DEFINE(SDEI_EVENT_INTREGS,    offsetof(struc << 
182   DEFINE(SDEI_EVENT_PRIORITY,   offsetof(struc << 
183 #endif                                         << 
184 #ifdef CONFIG_ARM64_PTR_AUTH                   << 
185   DEFINE(PTRAUTH_USER_KEY_APIA,         offset << 
186 #ifdef CONFIG_ARM64_PTR_AUTH_KERNEL            << 
187   DEFINE(PTRAUTH_KERNEL_KEY_APIA,       offset << 
188 #endif                                         << 
189   BLANK();                                     << 
190 #endif                                         << 
191 #ifdef CONFIG_KEXEC_CORE                       << 
192   DEFINE(KIMAGE_ARCH_DTB_MEM,           offset << 
193   DEFINE(KIMAGE_ARCH_EL2_VECTORS,       offset << 
194   DEFINE(KIMAGE_ARCH_ZERO_PAGE,         offset << 
195   DEFINE(KIMAGE_ARCH_PHYS_OFFSET,       offset << 
196   DEFINE(KIMAGE_ARCH_TTBR1,             offset << 
197   DEFINE(KIMAGE_HEAD,                   offset << 
198   DEFINE(KIMAGE_START,                  offset << 
199   BLANK();                                     << 
200 #endif                                         << 
201 #ifdef CONFIG_FUNCTION_TRACER                  << 
202   DEFINE(FTRACE_OPS_FUNC,               offset << 
203 #endif                                         << 
204   BLANK();                                     << 
205 #ifdef CONFIG_FUNCTION_GRAPH_TRACER            << 
206   DEFINE(FGRET_REGS_X0,                 offset << 
207   DEFINE(FGRET_REGS_X1,                 offset << 
208   DEFINE(FGRET_REGS_X2,                 offset << 
209   DEFINE(FGRET_REGS_X3,                 offset << 
210   DEFINE(FGRET_REGS_X4,                 offset << 
211   DEFINE(FGRET_REGS_X5,                 offset << 
212   DEFINE(FGRET_REGS_X6,                 offset << 
213   DEFINE(FGRET_REGS_X7,                 offset << 
214   DEFINE(FGRET_REGS_FP,                 offset << 
215   DEFINE(FGRET_REGS_SIZE,               sizeof << 
216 #endif                                         << 
217 #ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS << 
218   DEFINE(FTRACE_OPS_DIRECT_CALL,        offset << 
219 #endif                                         << 
220   return 0;                                    << 
221 }                                                  44 }
222                                                    45 

~ [ 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