diff options
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/arm64/include/asm/linkage.h | 7 | ||||
-rw-r--r-- | arch/arm64/include/asm/processor.h | 10 | ||||
-rw-r--r-- | arch/arm64/include/uapi/asm/ptrace.h | 3 |
4 files changed, 9 insertions, 12 deletions
diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index fe77e51a7847..a581a2205938 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild | |||
@@ -18,7 +18,6 @@ generic-y += ipcbuf.h | |||
18 | generic-y += irq_regs.h | 18 | generic-y += irq_regs.h |
19 | generic-y += kdebug.h | 19 | generic-y += kdebug.h |
20 | generic-y += kmap_types.h | 20 | generic-y += kmap_types.h |
21 | generic-y += linkage.h | ||
22 | generic-y += local.h | 21 | generic-y += local.h |
23 | generic-y += local64.h | 22 | generic-y += local64.h |
24 | generic-y += mman.h | 23 | generic-y += mman.h |
diff --git a/arch/arm64/include/asm/linkage.h b/arch/arm64/include/asm/linkage.h new file mode 100644 index 000000000000..636c1bced7d4 --- /dev/null +++ b/arch/arm64/include/asm/linkage.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __ASM_LINKAGE_H | ||
2 | #define __ASM_LINKAGE_H | ||
3 | |||
4 | #define __ALIGN .align 4 | ||
5 | #define __ALIGN_STR ".align 4" | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 39a208a392f7..5d810044feda 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h | |||
@@ -92,30 +92,20 @@ static inline void start_thread_common(struct pt_regs *regs, unsigned long pc) | |||
92 | static inline void start_thread(struct pt_regs *regs, unsigned long pc, | 92 | static inline void start_thread(struct pt_regs *regs, unsigned long pc, |
93 | unsigned long sp) | 93 | unsigned long sp) |
94 | { | 94 | { |
95 | unsigned long *stack = (unsigned long *)sp; | ||
96 | |||
97 | start_thread_common(regs, pc); | 95 | start_thread_common(regs, pc); |
98 | regs->pstate = PSR_MODE_EL0t; | 96 | regs->pstate = PSR_MODE_EL0t; |
99 | regs->sp = sp; | 97 | regs->sp = sp; |
100 | regs->regs[2] = stack[2]; /* x2 (envp) */ | ||
101 | regs->regs[1] = stack[1]; /* x1 (argv) */ | ||
102 | regs->regs[0] = stack[0]; /* x0 (argc) */ | ||
103 | } | 98 | } |
104 | 99 | ||
105 | #ifdef CONFIG_COMPAT | 100 | #ifdef CONFIG_COMPAT |
106 | static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc, | 101 | static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc, |
107 | unsigned long sp) | 102 | unsigned long sp) |
108 | { | 103 | { |
109 | unsigned int *stack = (unsigned int *)sp; | ||
110 | |||
111 | start_thread_common(regs, pc); | 104 | start_thread_common(regs, pc); |
112 | regs->pstate = COMPAT_PSR_MODE_USR; | 105 | regs->pstate = COMPAT_PSR_MODE_USR; |
113 | if (pc & 1) | 106 | if (pc & 1) |
114 | regs->pstate |= COMPAT_PSR_T_BIT; | 107 | regs->pstate |= COMPAT_PSR_T_BIT; |
115 | regs->compat_sp = sp; | 108 | regs->compat_sp = sp; |
116 | regs->regs[2] = stack[2]; /* x2 (envp) */ | ||
117 | regs->regs[1] = stack[1]; /* x1 (argv) */ | ||
118 | regs->regs[0] = stack[0]; /* x0 (argc) */ | ||
119 | } | 109 | } |
120 | #endif | 110 | #endif |
121 | 111 | ||
diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h index 9b131b4efa0b..6913643bbe54 100644 --- a/arch/arm64/include/uapi/asm/ptrace.h +++ b/arch/arm64/include/uapi/asm/ptrace.h | |||
@@ -79,13 +79,14 @@ struct user_fpsimd_state { | |||
79 | 79 | ||
80 | struct user_hwdebug_state { | 80 | struct user_hwdebug_state { |
81 | __u32 dbg_info; | 81 | __u32 dbg_info; |
82 | __u32 pad; | ||
82 | struct { | 83 | struct { |
83 | __u64 addr; | 84 | __u64 addr; |
84 | __u32 ctrl; | 85 | __u32 ctrl; |
86 | __u32 pad; | ||
85 | } dbg_regs[16]; | 87 | } dbg_regs[16]; |
86 | }; | 88 | }; |
87 | 89 | ||
88 | |||
89 | #endif /* __ASSEMBLY__ */ | 90 | #endif /* __ASSEMBLY__ */ |
90 | 91 | ||
91 | #endif /* _UAPI__ASM_PTRACE_H */ | 92 | #endif /* _UAPI__ASM_PTRACE_H */ |