2009-10-19 08:52:35

by Michael Cree

[permalink] [raw]
Subject: Unimplemented syscalls on Alpha

I couldn't but help notice the increasing number of unimplemented syscalls
on the Alpha architecture. I thought I might poke around to see what might
be required to get these implemented and got a pleasant surprise when it
seems some only need an entry in the syscall table. Indeed, the patch in
reply to this message gets preadv and pwritev going -- tested with the
sample program at http://lkml.org/lkml/2009/4/6/535.

I am happy to write patches to wire up more of the syscalls, but I am
wondering which ones are as straightforward as the preadv/pwritev case?
That is, do any require extra programming other than the syscall table? Do
I need to get the entries in the syscall table in the same order as other
architectures?

The unimplemented syscalls on Alpha are:

<stdin>:395:2: warning: #warning syscall umount2 not implemented
<stdin>:1463:2: warning: #warning syscall timerfd_create not implemented
<stdin>:1471:2: warning: #warning syscall fallocate not implemented
<stdin>:1475:2: warning: #warning syscall timerfd_settime not implemented
<stdin>:1479:2: warning: #warning syscall timerfd_gettime not implemented
<stdin>:1483:2: warning: #warning syscall signalfd4 not implemented
<stdin>:1487:2: warning: #warning syscall eventfd2 not implemented
<stdin>:1491:2: warning: #warning syscall epoll_create1 not implemented
<stdin>:1495:2: warning: #warning syscall dup3 not implemented
<stdin>:1499:2: warning: #warning syscall pipe2 not implemented
<stdin>:1503:2: warning: #warning syscall inotify_init1 not implemented
<stdin>:1507:2: warning: #warning syscall preadv not implemented
<stdin>:1511:2: warning: #warning syscall pwritev not implemented
<stdin>:1515:2: warning: #warning syscall rt_tgsigqueueinfo not implemented
<stdin>:1519:2: warning: #warning syscall perf_event_open not implemented

Cheers
Michael.


2009-10-19 09:12:00

by Michael Cree

[permalink] [raw]
Subject: [PATCH] Wire up preadv and pwritev on Alpha.

---
arch/alpha/include/asm/unistd.h | 4 +++-
arch/alpha/kernel/systbls.S | 2 ++
2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h
index 5b5c174..bba503a 100644
--- a/arch/alpha/include/asm/unistd.h
+++ b/arch/alpha/include/asm/unistd.h
@@ -433,10 +433,12 @@
#define __NR_signalfd 476
#define __NR_timerfd 477
#define __NR_eventfd 478
+#define __NR_preadv 479
+#define __NR_pwritev 480

#ifdef __KERNEL__

-#define NR_SYSCALLS 479
+#define NR_SYSCALLS 481

#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S
index 95c9aef..8182792 100644
--- a/arch/alpha/kernel/systbls.S
+++ b/arch/alpha/kernel/systbls.S
@@ -497,6 +497,8 @@ sys_call_table:
.quad sys_signalfd
.quad sys_ni_syscall
.quad sys_eventfd
+ .quad sys_preadv
+ .quad sys_pwritev /* 480 */

.size sys_call_table, . - sys_call_table
.type sys_call_table, @object
--
1.6.3.3

2009-10-19 15:53:23

by Matt Turner

[permalink] [raw]
Subject: Re: Unimplemented syscalls on Alpha

On Mon, Oct 19, 2009 at 4:11 AM, Michael Cree <[email protected]> wrote:
> I couldn't but help notice the increasing number of unimplemented syscalls
> on the Alpha architecture. ?I thought I might poke around to see what might
> be required to get these implemented and got a pleasant surprise when it
> seems some only need an entry in the syscall table. ?Indeed, the patch in
> reply to this message gets preadv and pwritev going -- tested with the
> sample program at http://lkml.org/lkml/2009/4/6/535.

Cool. I was looking into doing this, but I didn't know how to test the syscalls.

I tried to keep a list of missing syscalls here,
http://alphalinux.org/wiki/index.php/TODO_List but as you can see it's
already out of date.

> I am happy to write patches to wire up more of the syscalls, but I am
> wondering which ones are as straightforward as the preadv/pwritev case?
> That is, do any require extra programming other than the syscall table? ?Do
> I need to get the entries in the syscall table in the same order as other
> architectures?

I'm curious and unsure about this too. Patches would be great. I think
we should figure out who we need to CC to get patches into the kernel,
as neither of our maintainers have any sort of Alpha tree. I've
noticed a few patches submitted to this list have never made it into
the kernel, as well, maybe we should start an alpha tree?

The entries do not need to be in the same order of have the same
number as other architectures, just once you set the number you cannot
change it (without breaking the ABI).

Thanks Michael,
Matt