Re: [PATCH v3 8/8] alpha: enable GENERIC_ENTRY and GENERIC_IRQ_ENTRY
From: Matt Turner
Date: Fri Jun 12 2026 - 17:39:23 EST
On Fri, Jun 12, 2026 at 4:33 PM Magnus Lindholm <linmag7@xxxxxxxxx> wrote:
>
> Wire Alpha into the generic entry code for syscall entry/exit and
> return-to-user handling, while keeping the low-level PALcode return paths
> Alpha-specific.
>
> Move most of the syscall entry/exit logic out of entSys and into C helpers
> built around the generic entry API. Syscall entry now uses
> syscall_enter_from_user_mode(), records Alpha-local syscall metadata in
> thread_info, handles the ptrace/seccomp skip decision, and selects the
> syscall table target in C. The final target call remains in entry.S so
> Alpha can preserve its existing syscall ABI and assembly syscall-table
> wrappers.
>
> On return from syscalls, finish Alpha's r0/r19 result encoding and
> skipped-syscall restart handling in C before calling
> syscall_exit_to_user_mode(). Non-syscall returns to user mode use a
> separate alpha_exit_to_user_mode() helper, which disables interrupts,
> runs irqentry_exit_to_user_mode_prepare(), and then enters the common
> exit_to_user_mode() path.
>
> Keep the remaining PALcode restore handling in assembly. In particular,
> kernel-mode returns still need Alpha-specific lockdep IRQ-state annotation
> based on the saved processor status, while user-mode returns are handed to
> the generic exit-to-user code.
>
> Add the generic-entry support bits needed by common code, including
> thread_info.syscall_work, syscall trace support, ptrace sysemu request
> numbers, and arch_syscall_is_vdso_sigreturn().
>
> This has been tested by booting Alpha with GENERIC_ENTRY enabled, checking
> lockdep IRQ-state accounting, running fork/clone-heavy package builds, and
> running the seccomp as well as strace test suites.
>
> Signed-off-by: Magnus Lindholm <linmag7@xxxxxxxxx>
Reviewed-by: Matt Turner <mattst88@xxxxxxxxx>