1b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvalds /*
31da177e4SLinus Torvalds * Generate definitions needed by assembly language modules.
41da177e4SLinus Torvalds * This code generates raw asm output which is post-processed to extract
51da177e4SLinus Torvalds * and format the required data.
61da177e4SLinus Torvalds */
71da177e4SLinus Torvalds
81da177e4SLinus Torvalds #include <linux/types.h>
91da177e4SLinus Torvalds #include <linux/stddef.h>
101da177e4SLinus Torvalds #include <linux/sched.h>
111da177e4SLinus Torvalds #include <linux/ptrace.h>
1226946f4eSChristoph Lameter #include <linux/kbuild.h>
131da177e4SLinus Torvalds #include <asm/io.h>
141da177e4SLinus Torvalds
foo(void)151da177e4SLinus Torvalds void foo(void)
161da177e4SLinus Torvalds {
171da177e4SLinus Torvalds DEFINE(TI_TASK, offsetof(struct thread_info, task));
181da177e4SLinus Torvalds DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
191da177e4SLinus Torvalds DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
2005096666SAl Viro DEFINE(TI_FP, offsetof(struct thread_info, fp));
2105096666SAl Viro DEFINE(TI_STATUS, offsetof(struct thread_info, status));
221da177e4SLinus Torvalds BLANK();
231da177e4SLinus Torvalds
241da177e4SLinus Torvalds DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
25b6dff3ecSDavid Howells DEFINE(TASK_CRED, offsetof(struct task_struct, cred));
261da177e4SLinus Torvalds DEFINE(TASK_REAL_PARENT, offsetof(struct task_struct, real_parent));
279a5e7339SEric W. Biederman DEFINE(TASK_GROUP_LEADER, offsetof(struct task_struct, group_leader));
281da177e4SLinus Torvalds DEFINE(TASK_TGID, offsetof(struct task_struct, tgid));
291da177e4SLinus Torvalds BLANK();
301da177e4SLinus Torvalds
31b6dff3ecSDavid Howells DEFINE(CRED_UID, offsetof(struct cred, uid));
32b6dff3ecSDavid Howells DEFINE(CRED_EUID, offsetof(struct cred, euid));
33b6dff3ecSDavid Howells DEFINE(CRED_GID, offsetof(struct cred, gid));
34b6dff3ecSDavid Howells DEFINE(CRED_EGID, offsetof(struct cred, egid));
35b6dff3ecSDavid Howells BLANK();
36b6dff3ecSDavid Howells
37*fd0d07cbSIvan Kokshaysky DEFINE(SP_OFF, offsetof(struct pt_regs, ps));
381da177e4SLinus Torvalds DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
39*fd0d07cbSIvan Kokshaysky DEFINE(SWITCH_STACK_SIZE, sizeof(struct switch_stack));
401da177e4SLinus Torvalds DEFINE(PT_PTRACED, PT_PTRACED);
411da177e4SLinus Torvalds DEFINE(CLONE_VM, CLONE_VM);
421da177e4SLinus Torvalds DEFINE(CLONE_UNTRACED, CLONE_UNTRACED);
431da177e4SLinus Torvalds DEFINE(SIGCHLD, SIGCHLD);
441da177e4SLinus Torvalds BLANK();
451da177e4SLinus Torvalds
461da177e4SLinus Torvalds DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache));
471da177e4SLinus Torvalds DEFINE(HAE_REG, offsetof(struct alpha_machine_vector, hae_register));
481da177e4SLinus Torvalds }
49