License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-2.6-block.git] / arch / alpha / kernel / asm-offsets.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
1da177e4
LT
2/*
3 * Generate definitions needed by assembly language modules.
4 * This code generates raw asm output which is post-processed to extract
5 * and format the required data.
6 */
7
8#include <linux/types.h>
9#include <linux/stddef.h>
10#include <linux/sched.h>
11#include <linux/ptrace.h>
26946f4e 12#include <linux/kbuild.h>
1da177e4
LT
13#include <asm/io.h>
14
1da177e4
LT
15void foo(void)
16{
17 DEFINE(TI_TASK, offsetof(struct thread_info, task));
18 DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
19 DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
20 BLANK();
21
22 DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
b6dff3ec 23 DEFINE(TASK_CRED, offsetof(struct task_struct, cred));
1da177e4 24 DEFINE(TASK_REAL_PARENT, offsetof(struct task_struct, real_parent));
9a5e7339 25 DEFINE(TASK_GROUP_LEADER, offsetof(struct task_struct, group_leader));
1da177e4
LT
26 DEFINE(TASK_TGID, offsetof(struct task_struct, tgid));
27 BLANK();
28
b6dff3ec
DH
29 DEFINE(CRED_UID, offsetof(struct cred, uid));
30 DEFINE(CRED_EUID, offsetof(struct cred, euid));
31 DEFINE(CRED_GID, offsetof(struct cred, gid));
32 DEFINE(CRED_EGID, offsetof(struct cred, egid));
33 BLANK();
34
1da177e4
LT
35 DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
36 DEFINE(PT_PTRACED, PT_PTRACED);
37 DEFINE(CLONE_VM, CLONE_VM);
38 DEFINE(CLONE_UNTRACED, CLONE_UNTRACED);
39 DEFINE(SIGCHLD, SIGCHLD);
40 BLANK();
41
42 DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache));
43 DEFINE(HAE_REG, offsetof(struct alpha_machine_vector, hae_register));
44}