License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-2.6-block.git] / arch / mn10300 / kernel / asm-offsets.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
b920de1b
DH
2/*
3 * Generate definitions needed by assembly language modules.
4 * This code generates raw asm output which is post-processed
5 * to extract and format the required data.
6 */
7
8#include <linux/sched.h>
9#include <linux/signal.h>
10#include <linux/personality.h>
59957fc3 11#include <linux/kbuild.h>
b920de1b
DH
12#include <asm/ucontext.h>
13#include <asm/processor.h>
14#include <asm/thread_info.h>
15#include <asm/ptrace.h>
16#include "sigframe.h"
17#include "mn10300-serial.h"
18
b920de1b
DH
19void foo(void)
20{
21 OFFSET(SIGCONTEXT_d0, sigcontext, d0);
22 OFFSET(SIGCONTEXT_d1, sigcontext, d1);
23 BLANK();
24
25 OFFSET(TI_task, thread_info, task);
7c7fcf76 26 OFFSET(TI_frame, thread_info, frame);
b920de1b
DH
27 OFFSET(TI_flags, thread_info, flags);
28 OFFSET(TI_cpu, thread_info, cpu);
29 OFFSET(TI_preempt_count, thread_info, preempt_count);
30 OFFSET(TI_addr_limit, thread_info, addr_limit);
b920de1b
DH
31 BLANK();
32
33 OFFSET(REG_D0, pt_regs, d0);
34 OFFSET(REG_D1, pt_regs, d1);
35 OFFSET(REG_D2, pt_regs, d2);
36 OFFSET(REG_D3, pt_regs, d3);
37 OFFSET(REG_A0, pt_regs, a0);
38 OFFSET(REG_A1, pt_regs, a1);
39 OFFSET(REG_A2, pt_regs, a2);
40 OFFSET(REG_A3, pt_regs, a3);
41 OFFSET(REG_E0, pt_regs, e0);
42 OFFSET(REG_E1, pt_regs, e1);
43 OFFSET(REG_E2, pt_regs, e2);
44 OFFSET(REG_E3, pt_regs, e3);
45 OFFSET(REG_E4, pt_regs, e4);
46 OFFSET(REG_E5, pt_regs, e5);
47 OFFSET(REG_E6, pt_regs, e6);
48 OFFSET(REG_E7, pt_regs, e7);
49 OFFSET(REG_SP, pt_regs, sp);
50 OFFSET(REG_EPSW, pt_regs, epsw);
51 OFFSET(REG_PC, pt_regs, pc);
52 OFFSET(REG_LAR, pt_regs, lar);
53 OFFSET(REG_LIR, pt_regs, lir);
54 OFFSET(REG_MDR, pt_regs, mdr);
55 OFFSET(REG_MCVF, pt_regs, mcvf);
56 OFFSET(REG_MCRL, pt_regs, mcrl);
57 OFFSET(REG_MCRH, pt_regs, mcrh);
58 OFFSET(REG_MDRQ, pt_regs, mdrq);
59 OFFSET(REG_ORIG_D0, pt_regs, orig_d0);
60 OFFSET(REG_NEXT, pt_regs, next);
61 DEFINE(REG__END, sizeof(struct pt_regs));
62 BLANK();
63
64 OFFSET(THREAD_UREGS, thread_struct, uregs);
65 OFFSET(THREAD_PC, thread_struct, pc);
66 OFFSET(THREAD_SP, thread_struct, sp);
67 OFFSET(THREAD_A3, thread_struct, a3);
68 OFFSET(THREAD_USP, thread_struct, usp);
278d91c4
AT
69#ifdef CONFIG_FPU
70 OFFSET(THREAD_FPU_FLAGS, thread_struct, fpu_flags);
71 OFFSET(THREAD_FPU_STATE, thread_struct, fpu_state);
72 DEFINE(__THREAD_USING_FPU, THREAD_USING_FPU);
73 DEFINE(__THREAD_HAS_FPU, THREAD_HAS_FPU);
74#endif /* CONFIG_FPU */
75 BLANK();
76
77 OFFSET(TASK_THREAD, task_struct, thread);
b920de1b
DH
78 BLANK();
79
80 DEFINE(CLONE_VM_asm, CLONE_VM);
81 DEFINE(CLONE_FS_asm, CLONE_FS);
82 DEFINE(CLONE_FILES_asm, CLONE_FILES);
83 DEFINE(CLONE_SIGHAND_asm, CLONE_SIGHAND);
84 DEFINE(CLONE_UNTRACED_asm, CLONE_UNTRACED);
85 DEFINE(SIGCHLD_asm, SIGCHLD);
86 BLANK();
87
b920de1b
DH
88 OFFSET(RT_SIGFRAME_sigcontext, rt_sigframe, uc.uc_mcontext);
89
90 DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
91
92 OFFSET(__rx_buffer, mn10300_serial_port, rx_buffer);
93 OFFSET(__rx_inp, mn10300_serial_port, rx_inp);
94 OFFSET(__rx_outp, mn10300_serial_port, rx_outp);
70430786 95 OFFSET(__uart_state, mn10300_serial_port, uart.state);
b920de1b 96 OFFSET(__tx_xchar, mn10300_serial_port, tx_xchar);
8f0bcbca 97 OFFSET(__tx_flags, mn10300_serial_port, tx_flags);
b920de1b
DH
98 OFFSET(__intr_flags, mn10300_serial_port, intr_flags);
99 OFFSET(__rx_icr, mn10300_serial_port, rx_icr);
100 OFFSET(__tx_icr, mn10300_serial_port, tx_icr);
101 OFFSET(__tm_icr, mn10300_serial_port, _tmicr);
102 OFFSET(__iobase, mn10300_serial_port, _iobase);
103
104 DEFINE(__UART_XMIT_SIZE, UART_XMIT_SIZE);
ebd2c8f6
AC
105 OFFSET(__xmit_buffer, uart_state, xmit.buf);
106 OFFSET(__xmit_head, uart_state, xmit.head);
107 OFFSET(__xmit_tail, uart_state, xmit.tail);
b920de1b 108}