summaryrefslogtreecommitdiffstats
path: root/arch/loongarch/kernel/process.c
diff options
context:
space:
mode:
authorJinyang He <hejinyang@loongson.cn>2022-10-29 10:29:31 +0200
committerHuacai Chen <chenhuacai@loongson.cn>2022-10-29 10:29:31 +0200
commitb40fa75e1542e069a4eb9b33d62061d4ae734537 (patch)
tree42b4675b92d528242d7252012d482a84d772622e /arch/loongarch/kernel/process.c
parentLinux 6.1-rc2 (diff)
downloadlinux-b40fa75e1542e069a4eb9b33d62061d4ae734537.tar.xz
linux-b40fa75e1542e069a4eb9b33d62061d4ae734537.zip
LoongArch: Remove unused kernel stack padding
The current LoongArch kernel stack is padded as if obeying the MIPS o32 calling convention (32 bytes), signifying the port's MIPS lineage but no longer making sense. Remove the padding for clarity. Reviewed-by: WANG Xuerui <git@xen0n.name> Signed-off-by: Jinyang He <hejinyang@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kernel/process.c')
-rw-r--r--arch/loongarch/kernel/process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/loongarch/kernel/process.c b/arch/loongarch/kernel/process.c
index 1256e3582475..2526b68f1c0f 100644
--- a/arch/loongarch/kernel/process.c
+++ b/arch/loongarch/kernel/process.c
@@ -129,7 +129,7 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args)
unsigned long clone_flags = args->flags;
struct pt_regs *childregs, *regs = current_pt_regs();
- childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32;
+ childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE;
/* set up new TSS. */
childregs = (struct pt_regs *) childksp - 1;
@@ -236,7 +236,7 @@ bool in_task_stack(unsigned long stack, struct task_struct *task,
struct stack_info *info)
{
unsigned long begin = (unsigned long)task_stack_page(task);
- unsigned long end = begin + THREAD_SIZE - 32;
+ unsigned long end = begin + THREAD_SIZE;
if (stack < begin || stack >= end)
return false;