mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
alpha: stop storing the user stack pointer in pt_regs
Nothing reads pt_regs->usp now that user_stack_pointer() uses the PCB. Drop the stores, which saves a PAL_rdusp call on every syscall, and give the field back its old name. Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Magnus Lindholm <linmag7@gmail.com> Tested-by: Magnus Lindholm <linmag7@gmail.com> Acked-by: Ian Rogers <irogers@google.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Link: https://lore.kernel.org/r/20261018-alpha-perf-regs-v3-v3-2-52be85332c57@gmail.com Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
This commit is contained in:
parent
bceba446fa
commit
501bcb5953
|
|
@ -43,7 +43,7 @@ struct pt_regs {
|
|||
unsigned long trap_a1;
|
||||
unsigned long trap_a2;
|
||||
/* This makes the stack 16-byte aligned as GCC expects */
|
||||
unsigned long usp;
|
||||
unsigned long __pad0;
|
||||
/* These are saved by PAL-code: */
|
||||
unsigned long ps;
|
||||
unsigned long pc;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ static void __used foo(void)
|
|||
|
||||
DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache));
|
||||
DEFINE(HAE_REG, offsetof(struct alpha_machine_vector, hae_register));
|
||||
DEFINE(PT_REGS_USP, offsetof(struct pt_regs, usp));
|
||||
|
||||
DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
|
||||
DEFINE(TI_SYSCALL_WORK, offsetof(struct thread_info, syscall_work));
|
||||
|
|
|
|||
|
|
@ -476,11 +476,6 @@ entSys:
|
|||
ldq $1, 0($sp) /* syscall nr from saved r0 */
|
||||
stq $1, 8($sp) /* regs->r1 = shadow syscall nr */
|
||||
|
||||
mov $0, $8
|
||||
call_pal PAL_rdusp
|
||||
stq $0, PT_REGS_USP($sp)
|
||||
mov $8, $0
|
||||
|
||||
lda $8, 0x3fff
|
||||
bic $sp, $8, $8
|
||||
|
||||
|
|
|
|||
|
|
@ -30,12 +30,6 @@
|
|||
|
||||
#include "proto.h"
|
||||
|
||||
static __always_inline void alpha_snapshot_usp(struct pt_regs *regs)
|
||||
{
|
||||
if (user_mode(regs))
|
||||
regs->usp = rdusp();
|
||||
}
|
||||
|
||||
void
|
||||
dik_show_regs(struct pt_regs *regs, unsigned long *r9_15)
|
||||
{
|
||||
|
|
@ -186,7 +180,6 @@ do_entArith(unsigned long summary, unsigned long write_mask,
|
|||
{
|
||||
long si_code = FPE_FLTINV;
|
||||
|
||||
alpha_snapshot_usp(regs);
|
||||
if (summary & 1) {
|
||||
/* Software-completion summary bit is set, so try to
|
||||
emulate the instruction. If the processor supports
|
||||
|
|
@ -208,7 +201,6 @@ do_entIF(unsigned long type, struct pt_regs *regs)
|
|||
{
|
||||
int signo, code;
|
||||
|
||||
alpha_snapshot_usp(regs);
|
||||
if (type == 3) { /* FEN fault */
|
||||
/* Irritating users can call PAL_clrfen to disable the
|
||||
FPU for the process. The kernel will then trap in
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user