forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/arch/xtensa/include/asm/elf.h
....@@ -15,10 +15,10 @@
1515
1616 #include <asm/ptrace.h>
1717 #include <asm/coprocessor.h>
18
+#include <linux/elf-em.h>
1819
1920 /* Xtensa processor ELF architecture-magic number */
2021
21
-#define EM_XTENSA 94
2222 #define EM_XTENSA_OLD 0xABC7
2323
2424 /* Xtensa relocations defined by the ABIs */
....@@ -75,19 +75,7 @@
7575
7676 typedef unsigned long elf_greg_t;
7777
78
-typedef struct {
79
- elf_greg_t pc;
80
- elf_greg_t ps;
81
- elf_greg_t lbeg;
82
- elf_greg_t lend;
83
- elf_greg_t lcount;
84
- elf_greg_t sar;
85
- elf_greg_t windowstart;
86
- elf_greg_t windowbase;
87
- elf_greg_t threadptr;
88
- elf_greg_t reserved[7+48];
89
- elf_greg_t a[64];
90
-} xtensa_gregset_t;
78
+typedef struct user_pt_regs xtensa_gregset_t;
9179
9280 #define ELF_NGREG (sizeof(xtensa_gregset_t) / sizeof(elf_greg_t))
9381
....@@ -97,11 +85,6 @@
9785
9886 typedef unsigned int elf_fpreg_t;
9987 typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
100
-
101
-#define ELF_CORE_COPY_REGS(_eregs, _pregs) \
102
- xtensa_elf_core_copy_regs ((xtensa_gregset_t*)&(_eregs), _pregs);
103
-
104
-extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *);
10588
10689 /*
10790 * This is used to ensure we don't load something for the wrong architecture.
....@@ -126,6 +109,7 @@
126109 #define ELF_ARCH EM_XTENSA
127110
128111 #define ELF_EXEC_PAGESIZE PAGE_SIZE
112
+#define CORE_DUMP_USE_REGSET
129113
130114 /*
131115 * This is the location that an ET_DYN program is loaded if exec'ed. Typical
....@@ -192,16 +176,5 @@
192176
193177 #define SET_PERSONALITY(ex) \
194178 set_personality(PER_LINUX_32BIT | (current->personality & (~PER_MASK)))
195
-
196
-struct task_struct;
197
-
198
-extern void do_copy_regs (xtensa_gregset_t*, struct pt_regs*,
199
- struct task_struct*);
200
-extern void do_restore_regs (xtensa_gregset_t*, struct pt_regs*,
201
- struct task_struct*);
202
-extern void do_save_fpregs (elf_fpregset_t*, struct pt_regs*,
203
- struct task_struct*);
204
-extern int do_restore_fpregs (elf_fpregset_t*, struct pt_regs*,
205
- struct task_struct*);
206179
207180 #endif /* _XTENSA_ELF_H */