mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 14:42:08 +02:00
x86/asm: Merge KSTK_ESP() implementations
Commit:
263042e463 ("Save user RSP in pt_regs->sp on SYSCALL64 fastpath")
simplified the 64-bit implementation of KSTK_ESP() which is
now identical to 32-bit. Merge them into a common definition.
No functional change.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250303183111.2245129-1-brgerst@gmail.com
This commit is contained in:
parent
3101900218
commit
399fd7a264
|
|
@ -668,8 +668,6 @@ static __always_inline void prefetchw(const void *x)
|
|||
.sysenter_cs = __KERNEL_CS, \
|
||||
}
|
||||
|
||||
#define KSTK_ESP(task) (task_pt_regs(task)->sp)
|
||||
|
||||
#else
|
||||
extern unsigned long __top_init_kernel_stack[];
|
||||
|
||||
|
|
@ -677,8 +675,6 @@ extern unsigned long __top_init_kernel_stack[];
|
|||
.sp = (unsigned long)&__top_init_kernel_stack, \
|
||||
}
|
||||
|
||||
extern unsigned long KSTK_ESP(struct task_struct *task);
|
||||
|
||||
#endif /* CONFIG_X86_64 */
|
||||
|
||||
extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
|
||||
|
|
@ -692,6 +688,7 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
|
|||
#define TASK_UNMAPPED_BASE __TASK_UNMAPPED_BASE(TASK_SIZE_LOW)
|
||||
|
||||
#define KSTK_EIP(task) (task_pt_regs(task)->ip)
|
||||
#define KSTK_ESP(task) (task_pt_regs(task)->sp)
|
||||
|
||||
/* Get/set a process' ability to use the timestamp counter instruction */
|
||||
#define GET_TSC_CTL(adr) get_tsc_mode((adr))
|
||||
|
|
|
|||
|
|
@ -979,8 +979,3 @@ long do_arch_prctl_64(struct task_struct *task, int option, unsigned long arg2)
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
unsigned long KSTK_ESP(struct task_struct *task)
|
||||
{
|
||||
return task_pt_regs(task)->sp;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user