[PATCH v7 12/13] alpha: Remove alpha_ prefix from custom syscall entries
André Almeida
andrealmeid at igalia.com
Fri Sep 18 13:11:06 PDT 2026
Em 18/09/2026 07:54, Magnus Lindholm escreveu:
> Hi André,
>
> On Fri, Sep 18, 2026 at 1:48 AM André Almeida <andrealmeid at igalia.com> wrote:
>>
>> Some architectures need special entry points for some syscalls (like
>> clone3). The current approach is, instead of having a special name like
>> arch_syscall, to name if as __syscall. This is enough to different the
>> common entry point to the architecture specific entry point.
>>
>> Change alpha special syscall entries to do the same. This makes easier to
>> join the syscall tables. Leave alpha_syscall_zero because this syscall only
>> exists in alpha anyway.
>>
>> Signed-off-by: André Almeida <andrealmeid at igalia.com>
>> ---
>> arch/alpha/kernel/entry.S | 8 ++++----
>> arch/alpha/kernel/syscalls/syscall.tbl | 8 ++++----
>> 2 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
>> index 9f2608de2544..8a85fcf117cb 100644
>> --- a/arch/alpha/kernel/entry.S
>> +++ b/arch/alpha/kernel/entry.S
>> @@ -879,9 +879,9 @@ ret_from_kernel_thread:
>>
>> .macro fork_like name
>> .align 4
>> - .globl alpha_\name
>> - .ent alpha_\name
>> -alpha_\name:
>> + .globl __sys_\name
>> + .ent __sys_\name
>> +__sys_\name:
>> .prologue 0
>> bsr $1, do_switch_stack
>> // NB: if anyone adds preemption, this block will need to be protected
>> @@ -896,7 +896,7 @@ alpha_\name:
>> ldq $26, 56($sp)
>> lda $sp, SWITCH_STACK_SIZE($sp)
>> ret
>> -.end alpha_\name
>> +.end __sys_\name
>> .endm
>>
>> fork_like fork
>> diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl
>> index 8fc4701a6328..a41276634923 100644
>> --- a/arch/alpha/kernel/syscalls/syscall.tbl
>> +++ b/arch/alpha/kernel/syscalls/syscall.tbl
>> @@ -9,7 +9,7 @@
>> #
>> 0 common osf_syscall alpha_syscall_zero
>> 1 common exit sys_exit
>> -2 common fork alpha_fork
>> +2 common fork __sys_fork
>> 3 common read sys_read
>> 4 common write sys_write
>> 5 common osf_old_open sys_ni_syscall
>> @@ -72,7 +72,7 @@
>> 63 common getpgrp sys_getpgrp
>> 64 common getpagesize sys_getpagesize
>> 65 common osf_mremap sys_ni_syscall
>> -66 common vfork alpha_vfork
>> +66 common vfork __sys_vfork
>> 67 common stat sys_newstat
>> 68 common lstat sys_newlstat
>> 69 common osf_sbrk sys_ni_syscall
>> @@ -242,7 +242,7 @@
>> 309 common get_kernel_syms sys_ni_syscall
>> 310 common syslog sys_syslog
>> 311 common reboot sys_reboot
>> -312 common clone alpha_clone
>> +312 common clone __sys_clone
>> 313 common uselib sys_uselib
>> 314 common mlock sys_mlock
>> 315 common munlock sys_munlock
>> @@ -474,7 +474,7 @@
>> 542 common fsmount sys_fsmount
>> 543 common fspick sys_fspick
>> 544 common pidfd_open sys_pidfd_open
>> -545 common clone3 alpha_clone3
>> +545 common clone3 __clone3
>> 546 common close_range sys_close_range
>> 547 common openat2 sys_openat2
>> 548 common pidfd_getfd sys_pidfd_getfd
>>
>> --
>> 2.55.0
>>
>>
>
> The fork_like macro now defines __sys_clone3, but the syscall table
> entry is changed from alpha_clone3 to __clone3.
>
> This should be __sys_clone3, like the other custom entry points.
>
> I also confirmed this by building the tree at this patch, before applying
> patch 13:
>
> LD .tmp_vmlinux1
> alpha-unknown-linux-gnu-ld: arch/alpha/kernel/systbls.o:
> in function `sys_call_table':
> (.data+0x1108): undefined reference to `__clone3'
>
> Patch 13 hides the issue because the common table uses __clone3 as the
> ABI tag but correctly selects __sys_clone3 as the syscall entry point.
Thank you very much for testing this work! I've applied a fix for this
for the next version.
More information about the linux-arm-kernel
mailing list