All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [powerpc] Wire up fanotify_init, fanotify_mark, prlimit64 syscalls
@ 2010-08-19 15:15 Andreas Schwab
  2010-08-19 17:37 ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2010-08-19 15:15 UTC (permalink / raw)
  To: Linuxppc-dev

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
---
 arch/powerpc/include/asm/systbl.h |    3 +++
 arch/powerpc/include/asm/unistd.h |    5 ++++-
 arch/powerpc/kernel/sys_ppc32.c   |    8 ++++++++
 3 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index a5ee345..3d21266 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -326,3 +326,6 @@ SYSCALL_SPU(perf_event_open)
 COMPAT_SYS_SPU(preadv)
 COMPAT_SYS_SPU(pwritev)
 COMPAT_SYS(rt_tgsigqueueinfo)
+SYSCALL(fanotify_init)
+COMPAT_SYS(fanotify_mark)
+SYSCALL_SPU(prlimit64)
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index f0a1026..597e6f9 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -345,10 +345,13 @@
 #define __NR_preadv		320
 #define __NR_pwritev		321
 #define __NR_rt_tgsigqueueinfo	322
+#define __NR_fanotify_init	323
+#define __NR_fanotify_mark	324
+#define __NR_prlimit64		325
 
 #ifdef __KERNEL__
 
-#define __NR_syscalls		323
+#define __NR_syscalls		326
 
 #define __NR__exit __NR_exit
 #define NR_syscalls	__NR_syscalls
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index 20fd701..b1b6043 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -616,3 +616,11 @@ asmlinkage long compat_sys_sync_file_range2(int fd, unsigned int flags,
 
 	return sys_sync_file_range(fd, offset, nbytes, flags);
 }
+
+asmlinkage long compat_sys_fanotify_mark(int fanotify_fd, unsigned int flags,
+					 unsigned mask_hi, unsigned mask_lo,
+					 int dfd, const char __user *pathname)
+{
+	u64 mask = ((u64)mask_hi << 32) | mask_lo;
+	return sys_fanotify_mark(fanotify_fd, flags, mask, dfd, pathname);
+}
-- 
1.7.2.1


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: [PATCH] [powerpc] Wire up fanotify_init, fanotify_mark, prlimit64 syscalls
  2010-08-19 15:15 [PATCH] [powerpc] Wire up fanotify_init, fanotify_mark, prlimit64 syscalls Andreas Schwab
@ 2010-08-19 17:37 ` Arnd Bergmann
  2010-08-19 22:19   ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2010-08-19 17:37 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Linuxppc-dev, Andreas Schwab

On Thursday 19 August 2010 17:15:37 Andreas Schwab wrote:
> +SYSCALL(fanotify_init)
> +COMPAT_SYS(fanotify_mark)

why not _SPU? If it doesn't depend on getting signals,
SPUs should be able to use it.

	Arnd

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

* Re: [PATCH] [powerpc] Wire up fanotify_init, fanotify_mark, prlimit64 syscalls
  2010-08-19 17:37 ` Arnd Bergmann
@ 2010-08-19 22:19   ` Andreas Schwab
  2010-08-23 13:52     ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2010-08-19 22:19 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linuxppc-dev, linuxppc-dev

Arnd Bergmann <arndbergmann@googlemail.com> writes:

> On Thursday 19 August 2010 17:15:37 Andreas Schwab wrote:
>> +SYSCALL(fanotify_init)
>> +COMPAT_SYS(fanotify_mark)
>
> why not _SPU?

See arch/powerpc/platforms/cell/spu_callbacks.c.

 * 4. They are optional and we can't rely on them being
 *    linked into the kernel. Unfortunately, the cond_syscall
 *    helper does not work here as it does not add the necessary
 *    opd symbols:

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: [PATCH] [powerpc] Wire up fanotify_init, fanotify_mark, prlimit64 syscalls
  2010-08-19 22:19   ` Andreas Schwab
@ 2010-08-23 13:52     ` Arnd Bergmann
  2010-08-24  6:33       ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2010-08-23 13:52 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Linuxppc-dev, Arnd Bergmann, Andreas Schwab

On Friday 20 August 2010, Andreas Schwab wrote:
> See arch/powerpc/platforms/cell/spu_callbacks.c.
> 
>  * 4. They are optional and we can't rely on them being
>  *    linked into the kernel. Unfortunately, the cond_syscall
>  *    helper does not work here as it does not add the necessary
>  *    opd symbols:

Right. I should blame the person that wrote this comment.
If only I could remember who that was.

	Arnd

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

* Re: [PATCH] [powerpc] Wire up fanotify_init, fanotify_mark, prlimit64 syscalls
  2010-08-23 13:52     ` Arnd Bergmann
@ 2010-08-24  6:33       ` Benjamin Herrenschmidt
  2010-08-24  7:58         ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2010-08-24  6:33 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linuxppc-dev, Andreas Schwab, Arnd Bergmann, linuxppc-dev

On Mon, 2010-08-23 at 15:52 +0200, Arnd Bergmann wrote:
> On Friday 20 August 2010, Andreas Schwab wrote:
> > See arch/powerpc/platforms/cell/spu_callbacks.c.
> > 
> >  * 4. They are optional and we can't rely on them being
> >  *    linked into the kernel. Unfortunately, the cond_syscall
> >  *    helper does not work here as it does not add the necessary
> >  *    opd symbols:
> 
> Right. I should blame the person that wrote this comment.
> If only I could remember who that was.

Regardless of the outcome of that, I'm merging Andreas patch. We can
always add SPU bindings if we feel like it later.

Cheers,
Ben.

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

* Re: [PATCH] [powerpc] Wire up fanotify_init, fanotify_mark, prlimit64 syscalls
  2010-08-24  6:33       ` Benjamin Herrenschmidt
@ 2010-08-24  7:58         ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2010-08-24  7:58 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Linuxppc-dev, Andreas Schwab, Arnd Bergmann, linuxppc-dev

On Tuesday 24 August 2010, Benjamin Herrenschmidt wrote:
> On Mon, 2010-08-23 at 15:52 +0200, Arnd Bergmann wrote:
> > On Friday 20 August 2010, Andreas Schwab wrote:
> > > See arch/powerpc/platforms/cell/spu_callbacks.c.
> > > 
> > >  * 4. They are optional and we can't rely on them being
> > >  *    linked into the kernel. Unfortunately, the cond_syscall
> > >  *    helper does not work here as it does not add the necessary
> > >  *    opd symbols:
> > 
> > Right. I should blame the person that wrote this comment.
> > If only I could remember who that was.
> 
> Regardless of the outcome of that, I'm merging Andreas patch. We can
> always add SPU bindings if we feel like it later.

Sorry, I should have added a ';-)' or been clearer. The patch is good,
I wrote the comment that Andreas quoted and it's probably my own fault
that we never found a way to handle syscalls like this correctly from
the SPU.

	Arnd

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

end of thread, other threads:[~2010-08-24  7:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-19 15:15 [PATCH] [powerpc] Wire up fanotify_init, fanotify_mark, prlimit64 syscalls Andreas Schwab
2010-08-19 17:37 ` Arnd Bergmann
2010-08-19 22:19   ` Andreas Schwab
2010-08-23 13:52     ` Arnd Bergmann
2010-08-24  6:33       ` Benjamin Herrenschmidt
2010-08-24  7:58         ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.