linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [POWERPC] Wire up some more syscalls
@ 2007-05-14  3:50 Stephen Rothwell
  2007-05-14  3:55 ` Kumar Gala
  2007-05-14  9:16 ` Arnd Bergmann
  0 siblings, 2 replies; 7+ messages in thread
From: Stephen Rothwell @ 2007-05-14  3:50 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev, Andrew Morton, Arnd Bergmann

signalfd, timerfd and eventfd

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] [POWERPC] Wire up some more syscalls
  2007-05-14  3:50 [PATCH] [POWERPC] Wire up some more syscalls Stephen Rothwell
@ 2007-05-14  3:55 ` Kumar Gala
  2007-05-14  4:13   ` Stephen Rothwell
  2007-05-14  4:15   ` David Woodhouse
  2007-05-14  9:16 ` Arnd Bergmann
  1 sibling, 2 replies; 7+ messages in thread
From: Kumar Gala @ 2007-05-14  3:55 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: ppc-dev, Andrew Morton, paulus, Arnd Bergmann


On May 13, 2007, at 10:50 PM, Stephen Rothwell wrote:

> signalfd, timerfd and eventfd
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] [POWERPC] Wire up some more syscalls
  2007-05-14  3:55 ` Kumar Gala
@ 2007-05-14  4:13   ` Stephen Rothwell
  2007-05-14  4:15   ` David Woodhouse
  1 sibling, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2007-05-14  4:13 UTC (permalink / raw)
  To: Kumar Gala; +Cc: ppc-dev, Andrew Morton, paulus, Arnd Bergmann

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

On Sun, 13 May 2007 22:55:01 -0500 Kumar Gala <galak@kernel.crashing.org> 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/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] [POWERPC] Wire up some more syscalls
  2007-05-14  3:55 ` Kumar Gala
  2007-05-14  4:13   ` Stephen Rothwell
@ 2007-05-14  4:15   ` David Woodhouse
  2007-05-14 13:58     ` Kumar Gala
  1 sibling, 1 reply; 7+ messages in thread
From: David Woodhouse @ 2007-05-14  4:15 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Stephen Rothwell, Andrew Morton, paulus, Arnd Bergmann, ppc-dev

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] [POWERPC] Wire up some more syscalls
  2007-05-14  3:50 [PATCH] [POWERPC] Wire up some more syscalls Stephen Rothwell
  2007-05-14  3:55 ` Kumar Gala
@ 2007-05-14  9:16 ` Arnd Bergmann
  1 sibling, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2007-05-14  9:16 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: ppc-dev, Andrew Morton, paulus

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 <><

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] [POWERPC] Wire up some more syscalls
  2007-05-14  4:15   ` David Woodhouse
@ 2007-05-14 13:58     ` Kumar Gala
  2007-05-14 14:06       ` David Woodhouse
  0 siblings, 1 reply; 7+ messages in thread
From: Kumar Gala @ 2007-05-14 13:58 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Stephen Rothwell, Andrew Morton, paulus, Arnd Bergmann, ppc-dev


On May 13, 2007, at 11:15 PM, David Woodhouse wrote:

> 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.


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] [POWERPC] Wire up some more syscalls
  2007-05-14 13:58     ` Kumar Gala
@ 2007-05-14 14:06       ` David Woodhouse
  0 siblings, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2007-05-14 14:06 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Stephen Rothwell, Andrew Morton, paulus, Arnd Bergmann, ppc-dev

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-05-14 14:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-14  3:50 [PATCH] [POWERPC] Wire up some more syscalls Stephen Rothwell
2007-05-14  3:55 ` Kumar Gala
2007-05-14  4:13   ` Stephen Rothwell
2007-05-14  4:15   ` David Woodhouse
2007-05-14 13:58     ` Kumar Gala
2007-05-14 14:06       ` David Woodhouse
2007-05-14  9:16 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).