Daniel Schwierzeck | c8e280f | 2016-01-09 18:34:14 +0100 | [diff] [blame] | 1 | /* |
| 2 | * offset.c: Calculate pt_regs and task_struct offsets. |
| 3 | * |
| 4 | * Copyright (C) 1996 David S. Miller |
| 5 | * Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Ralf Baechle |
| 6 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
| 7 | * |
| 8 | * Kevin Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com |
| 9 | * Copyright (C) 2000 MIPS Technologies, Inc. |
| 10 | * |
| 11 | * SPDX-License-Identifier: GPL-2.0+ |
| 12 | */ |
| 13 | |
| 14 | #include <asm/ptrace.h> |
| 15 | #include <linux/stddef.h> |
| 16 | #include <linux/kbuild.h> |
| 17 | |
| 18 | void output_ptreg_defines(void) |
| 19 | { |
| 20 | COMMENT("MIPS pt_regs offsets."); |
| 21 | OFFSET(PT_R0, pt_regs, regs[0]); |
| 22 | OFFSET(PT_R1, pt_regs, regs[1]); |
| 23 | OFFSET(PT_R2, pt_regs, regs[2]); |
| 24 | OFFSET(PT_R3, pt_regs, regs[3]); |
| 25 | OFFSET(PT_R4, pt_regs, regs[4]); |
| 26 | OFFSET(PT_R5, pt_regs, regs[5]); |
| 27 | OFFSET(PT_R6, pt_regs, regs[6]); |
| 28 | OFFSET(PT_R7, pt_regs, regs[7]); |
| 29 | OFFSET(PT_R8, pt_regs, regs[8]); |
| 30 | OFFSET(PT_R9, pt_regs, regs[9]); |
| 31 | OFFSET(PT_R10, pt_regs, regs[10]); |
| 32 | OFFSET(PT_R11, pt_regs, regs[11]); |
| 33 | OFFSET(PT_R12, pt_regs, regs[12]); |
| 34 | OFFSET(PT_R13, pt_regs, regs[13]); |
| 35 | OFFSET(PT_R14, pt_regs, regs[14]); |
| 36 | OFFSET(PT_R15, pt_regs, regs[15]); |
| 37 | OFFSET(PT_R16, pt_regs, regs[16]); |
| 38 | OFFSET(PT_R17, pt_regs, regs[17]); |
| 39 | OFFSET(PT_R18, pt_regs, regs[18]); |
| 40 | OFFSET(PT_R19, pt_regs, regs[19]); |
| 41 | OFFSET(PT_R20, pt_regs, regs[20]); |
| 42 | OFFSET(PT_R21, pt_regs, regs[21]); |
| 43 | OFFSET(PT_R22, pt_regs, regs[22]); |
| 44 | OFFSET(PT_R23, pt_regs, regs[23]); |
| 45 | OFFSET(PT_R24, pt_regs, regs[24]); |
| 46 | OFFSET(PT_R25, pt_regs, regs[25]); |
| 47 | OFFSET(PT_R26, pt_regs, regs[26]); |
| 48 | OFFSET(PT_R27, pt_regs, regs[27]); |
| 49 | OFFSET(PT_R28, pt_regs, regs[28]); |
| 50 | OFFSET(PT_R29, pt_regs, regs[29]); |
| 51 | OFFSET(PT_R30, pt_regs, regs[30]); |
| 52 | OFFSET(PT_R31, pt_regs, regs[31]); |
| 53 | OFFSET(PT_LO, pt_regs, lo); |
| 54 | OFFSET(PT_HI, pt_regs, hi); |
| 55 | OFFSET(PT_EPC, pt_regs, cp0_epc); |
| 56 | OFFSET(PT_BVADDR, pt_regs, cp0_badvaddr); |
| 57 | OFFSET(PT_STATUS, pt_regs, cp0_status); |
| 58 | OFFSET(PT_CAUSE, pt_regs, cp0_cause); |
| 59 | DEFINE(PT_SIZE, sizeof(struct pt_regs)); |
| 60 | BLANK(); |
| 61 | } |