[PATCH] [POWERPC] Wire up some more syscalls

Subsystems: the rest

STALE7059d

7 messages, 4 authors, 2007-05-14 · open the first message on its own page

[PATCH] [POWERPC] Wire up some more syscalls

From: Stephen Rothwell <hidden>
Date: 2007-05-14 03:50:35

signalfd, timerfd and eventfd

Signed-off-by: Stephen Rothwell <redacted>
---
 include/asm-powerpc/systbl.h |    3 +++
 include/asm-powerpc/unistd.h |    5 ++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

This depends on the patch I just sent to declare compat_sys_signalfd and
compat_sys_timerfd.  And I am assuming that the SPU's want these.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h
index 3d44446..700ca59 100644
--- a/include/asm-powerpc/systbl.h
+++ b/include/asm-powerpc/systbl.h
@@ -308,3 +308,6 @@ COMPAT_SYS_SPU(move_pages)
 SYSCALL_SPU(getcpu)
 COMPAT_SYS(epoll_pwait)
 COMPAT_SYS_SPU(utimensat)
+COMPAT_SYS_SPU(signalfd)
+COMPAT_SYS_SPU(timerfd)
+SYSCALL_SPU(eventfd)
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h
index 21f004a..912e009 100644
--- a/include/asm-powerpc/unistd.h
+++ b/include/asm-powerpc/unistd.h
@@ -327,10 +327,13 @@
 #define __NR_getcpu		302
 #define __NR_epoll_pwait	303
 #define __NR_utimensat		304
+#define __NR_signalfd		305
+#define __NR_timerfd		306
+#define __NR_eventfd		307
 
 #ifdef __KERNEL__
 
-#define __NR_syscalls		305
+#define __NR_syscalls		308
 
 #define __NR__exit __NR_exit
 #define NR_syscalls	__NR_syscalls
-- 
1.5.1.4

Re: [PATCH] [POWERPC] Wire up some more syscalls

From: Kumar Gala <hidden>
Date: 2007-05-14 03:56:03

On May 13, 2007, at 10:50 PM, Stephen Rothwell wrote:
quoted hunk
signalfd, timerfd and eventfd

Signed-off-by: Stephen Rothwell <redacted>
---
 include/asm-powerpc/systbl.h |    3 +++
 include/asm-powerpc/unistd.h |    5 ++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

This depends on the patch I just sent to declare  
compat_sys_signalfd and
compat_sys_timerfd.  And I am assuming that the SPU's want these.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/ 
systbl.h
index 3d44446..700ca59 100644
--- a/include/asm-powerpc/systbl.h
+++ b/include/asm-powerpc/systbl.h
@@ -308,3 +308,6 @@ COMPAT_SYS_SPU(move_pages)
 SYSCALL_SPU(getcpu)
 COMPAT_SYS(epoll_pwait)
 COMPAT_SYS_SPU(utimensat)
+COMPAT_SYS_SPU(signalfd)
+COMPAT_SYS_SPU(timerfd)
+SYSCALL_SPU(eventfd)
Just out of interest, what makes a syscall COMPAT_SYS_SPU vs  
SYSCALL_SPU?

- k

Re: [PATCH] [POWERPC] Wire up some more syscalls

From: Stephen Rothwell <hidden>
Date: 2007-05-14 04:13:06

On Sun, 13 May 2007 22:55:01 -0500 Kumar Gala [off-list ref] wrote:
Just out of interest, what makes a syscall COMPAT_SYS_SPU vs
SYSCALL_SPU?
COMPAT_ syscalls need a compatibilty wrapper around the 32 bit calls on
64 bit kernels.

--
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Re: [PATCH] [POWERPC] Wire up some more syscalls

From: David Woodhouse <dwmw2@infradead.org>
Date: 2007-05-14 04:15:48

On Sun, 2007-05-13 at 22:55 -0500, Kumar Gala wrote:
Just out of interest, what makes a syscall COMPAT_SYS_SPU vs  
SYSCALL_SPU?
It's the same as the difference between COMPAT_SYS and SYSCALL.

The _SPU suffix just means that the SPU can use the (native) syscall. 

The COMPAT_ prefix means that there's a compat function to call instead
of calling the native one directly for 32-bit code.

-- 
dwmw2

Re: [PATCH] [POWERPC] Wire up some more syscalls

From: Arnd Bergmann <arnd@arndb.de>
Date: 2007-05-14 09:17:00

On Monday 14 May 2007, Stephen Rothwell wrote:
This depends on the patch I just sent to declare compat_sys_signalfd and
compat_sys_timerfd. =A0And I am assuming that the SPU's want these.
Yes, it's the right thing for SPUs.

signalfd might actually be important since we normally don't have a way
to get signals into an SPU, so some application programmers will love it.

	Arnd <><

Re: [PATCH] [POWERPC] Wire up some more syscalls

From: Kumar Gala <hidden>
Date: 2007-05-14 13:59:46

On May 13, 2007, at 11:15 PM, David Woodhouse wrote:
On Sun, 2007-05-13 at 22:55 -0500, Kumar Gala wrote:
quoted
Just out of interest, what makes a syscall COMPAT_SYS_SPU vs
SYSCALL_SPU?
It's the same as the difference between COMPAT_SYS and SYSCALL.

The _SPU suffix just means that the SPU can use the (native) syscall.

The COMPAT_ prefix means that there's a compat function to call  
instead
of calling the native one directly for 32-bit code.

The COMPAT I get, but what does it mean to be able to use a syscall  
on SPU natively?  When wouldn't you be able to do this?

- k

Re: [PATCH] [POWERPC] Wire up some more syscalls

From: David Woodhouse <dwmw2@infradead.org>
Date: 2007-05-14 14:07:01

On Mon, 2007-05-14 at 08:58 -0500, Kumar Gala wrote:
The COMPAT I get, but what does it mean to be able to use a syscall  
on SPU natively?  When wouldn't you be able to do this? 
There is no native vs. compat on the SPU. The COMPAT_ bit refers only to
32-bit or 64-bit processes on the PPU. 

However, there are some system calls which the SPU may execute, and
other system calls which it may not (usually those involving signals).

Looking back at it, I'm not entirely sure the above description is
actually going to help your confusion... I recommend just looking at the
places that systbl.h is included, and what the macros expand to in each
case.

-- 
dwmw2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help