.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2012 Regents of the University of California |
---|
3 | 4 | * Copyright (C) 2017 SiFive |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or |
---|
6 | | - * modify it under the terms of the GNU General Public License |
---|
7 | | - * as published by the Free Software Foundation, version 2. |
---|
8 | | - * |
---|
9 | | - * This program is distributed in the hope that it will be useful, |
---|
10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | | - * GNU General Public License for more details. |
---|
13 | 5 | */ |
---|
14 | 6 | |
---|
15 | 7 | #define GENERATING_ASM_OFFSETS |
---|
.. | .. |
---|
35 | 27 | OFFSET(TASK_THREAD_S9, task_struct, thread.s[9]); |
---|
36 | 28 | OFFSET(TASK_THREAD_S10, task_struct, thread.s[10]); |
---|
37 | 29 | OFFSET(TASK_THREAD_S11, task_struct, thread.s[11]); |
---|
38 | | - OFFSET(TASK_THREAD_SP, task_struct, thread.sp); |
---|
39 | | - OFFSET(TASK_STACK, task_struct, stack); |
---|
40 | | - OFFSET(TASK_TI, task_struct, thread_info); |
---|
41 | 30 | OFFSET(TASK_TI_FLAGS, task_struct, thread_info.flags); |
---|
| 31 | + OFFSET(TASK_TI_PREEMPT_COUNT, task_struct, thread_info.preempt_count); |
---|
42 | 32 | OFFSET(TASK_TI_KERNEL_SP, task_struct, thread_info.kernel_sp); |
---|
43 | 33 | OFFSET(TASK_TI_USER_SP, task_struct, thread_info.user_sp); |
---|
44 | 34 | OFFSET(TASK_TI_CPU, task_struct, thread_info.cpu); |
---|
.. | .. |
---|
78 | 68 | OFFSET(TASK_THREAD_FCSR, task_struct, thread.fstate.fcsr); |
---|
79 | 69 | |
---|
80 | 70 | DEFINE(PT_SIZE, sizeof(struct pt_regs)); |
---|
81 | | - OFFSET(PT_SEPC, pt_regs, sepc); |
---|
| 71 | + OFFSET(PT_EPC, pt_regs, epc); |
---|
82 | 72 | OFFSET(PT_RA, pt_regs, ra); |
---|
83 | 73 | OFFSET(PT_FP, pt_regs, s0); |
---|
84 | 74 | OFFSET(PT_S0, pt_regs, s0); |
---|
.. | .. |
---|
112 | 102 | OFFSET(PT_T6, pt_regs, t6); |
---|
113 | 103 | OFFSET(PT_GP, pt_regs, gp); |
---|
114 | 104 | OFFSET(PT_ORIG_A0, pt_regs, orig_a0); |
---|
115 | | - OFFSET(PT_SSTATUS, pt_regs, sstatus); |
---|
116 | | - OFFSET(PT_SBADADDR, pt_regs, sbadaddr); |
---|
117 | | - OFFSET(PT_SCAUSE, pt_regs, scause); |
---|
| 105 | + OFFSET(PT_STATUS, pt_regs, status); |
---|
| 106 | + OFFSET(PT_BADADDR, pt_regs, badaddr); |
---|
| 107 | + OFFSET(PT_CAUSE, pt_regs, cause); |
---|
118 | 108 | |
---|
119 | 109 | /* |
---|
120 | 110 | * THREAD_{F,X}* might be larger than a S-type offset can handle, but |
---|
.. | .. |
---|
310 | 300 | offsetof(struct task_struct, thread.fstate.fcsr) |
---|
311 | 301 | - offsetof(struct task_struct, thread.fstate.f[0]) |
---|
312 | 302 | ); |
---|
313 | | - |
---|
314 | | - /* The assembler needs access to THREAD_SIZE as well. */ |
---|
315 | | - DEFINE(ASM_THREAD_SIZE, THREAD_SIZE); |
---|
316 | 303 | |
---|
317 | 304 | /* |
---|
318 | 305 | * We allocate a pt_regs on the stack when entering the kernel. This |
---|