hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/arch/arc/kernel/asm-offsets.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 */
85
96 #include <linux/sched.h>
....@@ -14,6 +11,7 @@
1411 #include <linux/ptrace.h>
1512 #include <asm/hardirq.h>
1613 #include <asm/page.h>
14
+
1715
1816 int main(void)
1917 {
....@@ -58,11 +56,29 @@
5856 DEFINE(PT_r5, offsetof(struct pt_regs, r5));
5957 DEFINE(PT_r6, offsetof(struct pt_regs, r6));
6058 DEFINE(PT_r7, offsetof(struct pt_regs, r7));
59
+ DEFINE(PT_r8, offsetof(struct pt_regs, r8));
60
+ DEFINE(PT_r10, offsetof(struct pt_regs, r10));
61
+ DEFINE(PT_r26, offsetof(struct pt_regs, r26));
6162 DEFINE(PT_ret, offsetof(struct pt_regs, ret));
63
+ DEFINE(PT_blink, offsetof(struct pt_regs, blink));
64
+ DEFINE(PT_lpe, offsetof(struct pt_regs, lp_end));
65
+ DEFINE(PT_lpc, offsetof(struct pt_regs, lp_count));
66
+ DEFINE(PT_user_r25, offsetof(struct pt_regs, user_r25));
6267
6368 DEFINE(SZ_CALLEE_REGS, sizeof(struct callee_regs));
6469 DEFINE(SZ_PT_REGS, sizeof(struct pt_regs));
65
- DEFINE(PT_user_r25, offsetof(struct pt_regs, user_r25));
70
+
71
+#ifdef CONFIG_ISA_ARCV2
72
+ OFFSET(PT_r12, pt_regs, r12);
73
+ OFFSET(PT_r30, pt_regs, r30);
74
+#endif
75
+#ifdef CONFIG_ARC_HAS_ACCL_REGS
76
+ OFFSET(PT_r58, pt_regs, r58);
77
+ OFFSET(PT_r59, pt_regs, r59);
78
+#endif
79
+#ifdef CONFIG_ARC_DSP_SAVE_RESTORE_REGS
80
+ OFFSET(PT_DSP_CTRL, pt_regs, DSP_CTRL);
81
+#endif
6682
6783 return 0;
6884 }