linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wire up sys_accept4() on ARM
@ 2010-08-03 14:41 Mikael Pettersson
  2010-08-13 10:25 ` Mikael Pettersson
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Pettersson @ 2010-08-03 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

sys_accept4() was added in kernel 2.6.28, but ARM was not updated
to include it.  The number and types of parameters is such that
no ARM-specific processing is needed, so wiring up sys_accept4()
just requires defining __NR_accept4 and adding a direct call in
the syscall entry table.

Tested with an EABI 2.6.35 kernel and Ulrich Drepper's original
accept4() test program, modified to define __NR_accept4 for ARM.

Using the updated unistd.h also eliminates a warning then building
glibc (2.10.2 and newer) about accept4() being unimplemented.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
---
 arch/arm/include/asm/unistd.h |    1 +
 arch/arm/kernel/calls.S       |    1 +

 2 files changed, 2 insertions(+)
diff -rupN linux-2.6.35/arch/arm/include/asm/unistd.h linux-2.6.35.arm-sys_accept4/arch/arm/include/asm/unistd.h
--- linux-2.6.35/arch/arm/include/asm/unistd.h	2010-05-17 19:51:29.000000000 +0200
+++ linux-2.6.35.arm-sys_accept4/arch/arm/include/asm/unistd.h	2010-08-03 14:34:35.000000000 +0200
@@ -392,6 +392,7 @@
 #define __NR_rt_tgsigqueueinfo		(__NR_SYSCALL_BASE+363)
 #define __NR_perf_event_open		(__NR_SYSCALL_BASE+364)
 #define __NR_recvmmsg			(__NR_SYSCALL_BASE+365)
+#define __NR_accept4			(__NR_SYSCALL_BASE+366)
 
 /*
  * The following SWIs are ARM private.
diff -rupN linux-2.6.35/arch/arm/kernel/calls.S linux-2.6.35.arm-sys_accept4/arch/arm/kernel/calls.S
--- linux-2.6.35/arch/arm/kernel/calls.S	2010-05-17 19:51:29.000000000 +0200
+++ linux-2.6.35.arm-sys_accept4/arch/arm/kernel/calls.S	2010-08-03 14:34:35.000000000 +0200
@@ -375,6 +375,7 @@
 		CALL(sys_rt_tgsigqueueinfo)
 		CALL(sys_perf_event_open)
 /* 365 */	CALL(sys_recvmmsg)
+		CALL(sys_accept4)
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 #define syscalls_counted

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

* [PATCH] wire up sys_accept4() on ARM
  2010-08-03 14:41 [PATCH] wire up sys_accept4() on ARM Mikael Pettersson
@ 2010-08-13 10:25 ` Mikael Pettersson
  2010-08-14 21:05   ` Russell King - ARM Linux
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Pettersson @ 2010-08-13 10:25 UTC (permalink / raw)
  To: linux-arm-kernel

Mikael Pettersson writes:
 > sys_accept4() was added in kernel 2.6.28, but ARM was not updated
 > to include it.  The number and types of parameters is such that
 > no ARM-specific processing is needed, so wiring up sys_accept4()
 > just requires defining __NR_accept4 and adding a direct call in
 > the syscall entry table.
 > 
 > Tested with an EABI 2.6.35 kernel and Ulrich Drepper's original
 > accept4() test program, modified to define __NR_accept4 for ARM.
 > 
 > Using the updated unistd.h also eliminates a warning then building
 > glibc (2.10.2 and newer) about accept4() being unimplemented.
 > 
 > Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>

Ping.  Ok for patch system?

 > ---
 >  arch/arm/include/asm/unistd.h |    1 +
 >  arch/arm/kernel/calls.S       |    1 +
 > 
 >  2 files changed, 2 insertions(+)
 > diff -rupN linux-2.6.35/arch/arm/include/asm/unistd.h linux-2.6.35.arm-sys_accept4/arch/arm/include/asm/unistd.h
 > --- linux-2.6.35/arch/arm/include/asm/unistd.h	2010-05-17 19:51:29.000000000 +0200
 > +++ linux-2.6.35.arm-sys_accept4/arch/arm/include/asm/unistd.h	2010-08-03 14:34:35.000000000 +0200
 > @@ -392,6 +392,7 @@
 >  #define __NR_rt_tgsigqueueinfo		(__NR_SYSCALL_BASE+363)
 >  #define __NR_perf_event_open		(__NR_SYSCALL_BASE+364)
 >  #define __NR_recvmmsg			(__NR_SYSCALL_BASE+365)
 > +#define __NR_accept4			(__NR_SYSCALL_BASE+366)
 >  
 >  /*
 >   * The following SWIs are ARM private.
 > diff -rupN linux-2.6.35/arch/arm/kernel/calls.S linux-2.6.35.arm-sys_accept4/arch/arm/kernel/calls.S
 > --- linux-2.6.35/arch/arm/kernel/calls.S	2010-05-17 19:51:29.000000000 +0200
 > +++ linux-2.6.35.arm-sys_accept4/arch/arm/kernel/calls.S	2010-08-03 14:34:35.000000000 +0200
 > @@ -375,6 +375,7 @@
 >  		CALL(sys_rt_tgsigqueueinfo)
 >  		CALL(sys_perf_event_open)
 >  /* 365 */	CALL(sys_recvmmsg)
 > +		CALL(sys_accept4)
 >  #ifndef syscalls_counted
 >  .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 >  #define syscalls_counted
 > 
 > _______________________________________________
 > linux-arm-kernel mailing list
 > linux-arm-kernel at lists.infradead.org
 > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
 > 

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

* [PATCH] wire up sys_accept4() on ARM
  2010-08-13 10:25 ` Mikael Pettersson
@ 2010-08-14 21:05   ` Russell King - ARM Linux
  0 siblings, 0 replies; 3+ messages in thread
From: Russell King - ARM Linux @ 2010-08-14 21:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 13, 2010 at 12:25:44PM +0200, Mikael Pettersson wrote:
> Mikael Pettersson writes:
>  > sys_accept4() was added in kernel 2.6.28, but ARM was not updated
>  > to include it.  The number and types of parameters is such that
>  > no ARM-specific processing is needed, so wiring up sys_accept4()
>  > just requires defining __NR_accept4 and adding a direct call in
>  > the syscall entry table.
>  > 
>  > Tested with an EABI 2.6.35 kernel and Ulrich Drepper's original
>  > accept4() test program, modified to define __NR_accept4 for ARM.
>  > 
>  > Using the updated unistd.h also eliminates a warning then building
>  > glibc (2.10.2 and newer) about accept4() being unimplemented.
>  > 
>  > Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
> 
> Ping.  Ok for patch system?

Yup.

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

end of thread, other threads:[~2010-08-14 21:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03 14:41 [PATCH] wire up sys_accept4() on ARM Mikael Pettersson
2010-08-13 10:25 ` Mikael Pettersson
2010-08-14 21:05   ` Russell King - ARM Linux

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