All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.
@ 2015-11-19  6:04 Rashmica Gupta
  2015-11-19  9:15 ` Denis Kirjanov
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Rashmica Gupta @ 2015-11-19  6:04 UTC (permalink / raw)
  To: linuxppc-dev

Most architectures use NR_syscalls as the #define for the number of syscalls.

We use __NR_syscalls, and then define NR_syscalls as __NR_syscalls.

__NR_syscalls is not used outside arch code, whereas NR_syscalls is. So as
NR_syscalls must be defined and __NR_syscalls does not, replace __NR_syscalls
with NR_syscalls.

Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>
---
 arch/powerpc/include/asm/unistd.h        | 3 +--
 arch/powerpc/include/asm/vdso_datapage.h | 2 +-
 arch/powerpc/kernel/systbl_chk.c         | 2 +-
 arch/powerpc/kernel/systbl_chk.sh        | 2 +-
 arch/powerpc/kernel/vdso.c               | 2 +-
 arch/powerpc/kernel/vdso32/datapage.S    | 2 +-
 arch/powerpc/kernel/vdso64/datapage.S    | 2 +-
 arch/powerpc/platforms/cell/spufs/run.c  | 2 +-
 8 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index 6d8f8023ac27..05bf34296144 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -12,10 +12,9 @@
 #include <uapi/asm/unistd.h>
 
 
-#define __NR_syscalls		378
+#define NR_syscalls		378
 
 #define __NR__exit __NR_exit
-#define NR_syscalls	__NR_syscalls
 
 #ifndef __ASSEMBLY__
 
diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h
index b73a8199f161..1afe90ade595 100644
--- a/arch/powerpc/include/asm/vdso_datapage.h
+++ b/arch/powerpc/include/asm/vdso_datapage.h
@@ -41,7 +41,7 @@
 #include <linux/unistd.h>
 #include <linux/time.h>
 
-#define SYSCALL_MAP_SIZE      ((__NR_syscalls + 31) / 32)
+#define SYSCALL_MAP_SIZE      ((NR_syscalls + 31) / 32)
 
 /*
  * So here is the ppc64 backward compatible version
diff --git a/arch/powerpc/kernel/systbl_chk.c b/arch/powerpc/kernel/systbl_chk.c
index 2384129f5893..55323a620cfe 100644
--- a/arch/powerpc/kernel/systbl_chk.c
+++ b/arch/powerpc/kernel/systbl_chk.c
@@ -57,4 +57,4 @@
 
 START_TABLE
 #include <asm/systbl.h>
-END_TABLE __NR_syscalls
+END_TABLE NR_syscalls
diff --git a/arch/powerpc/kernel/systbl_chk.sh b/arch/powerpc/kernel/systbl_chk.sh
index 19415e7674a5..31b6e7c358ca 100644
--- a/arch/powerpc/kernel/systbl_chk.sh
+++ b/arch/powerpc/kernel/systbl_chk.sh
@@ -16,7 +16,7 @@ awk	'BEGIN { num = -1; }	# Ignore the beginning of the file
 	/^START_TABLE/ { num = 0; next; }
 	/^END_TABLE/ {
 		if (num != $2) {
-			printf "__NR_syscalls (%s) is not one more than the last syscall (%s)\n",
+			printf "NR_syscalls (%s) is not one more than the last syscall (%s)\n",
 				$2, num - 1;
 			exit(1);
 		}
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index b457bfa28436..def1b8b5e6c1 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -671,7 +671,7 @@ static void __init vdso_setup_syscall_map(void)
 	extern unsigned long sys_ni_syscall;
 
 
-	for (i = 0; i < __NR_syscalls; i++) {
+	for (i = 0; i < NR_syscalls; i++) {
 #ifdef CONFIG_PPC64
 		if (sys_call_table[i*2] != sys_ni_syscall)
 			vdso_data->syscall_map_64[i >> 5] |=
diff --git a/arch/powerpc/kernel/vdso32/datapage.S b/arch/powerpc/kernel/vdso32/datapage.S
index 59cf5f452879..3745113fcc65 100644
--- a/arch/powerpc/kernel/vdso32/datapage.S
+++ b/arch/powerpc/kernel/vdso32/datapage.S
@@ -61,7 +61,7 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
 	addi	r3,r3,CFG_SYSCALL_MAP32
 	cmpli	cr0,r4,0
 	beqlr
-	li	r0,__NR_syscalls
+	li	r0,NR_syscalls
 	stw	r0,0(r4)
 	crclr	cr0*4+so
 	blr
diff --git a/arch/powerpc/kernel/vdso64/datapage.S b/arch/powerpc/kernel/vdso64/datapage.S
index 2f01c4a0d8a0..184a6ba7f283 100644
--- a/arch/powerpc/kernel/vdso64/datapage.S
+++ b/arch/powerpc/kernel/vdso64/datapage.S
@@ -62,7 +62,7 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
 	cmpli	cr0,r4,0
 	crclr	cr0*4+so
 	beqlr
-	li	r0,__NR_syscalls
+	li	r0,NR_syscalls
 	stw	r0,0(r4)
 	blr
   .cfi_endproc
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index 4ddf769a64e5..9f79004e6d6f 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -326,7 +326,7 @@ static int spu_process_callback(struct spu_context *ctx)
 	spu_ret = -ENOSYS;
 	npc += 4;
 
-	if (s.nr_ret < __NR_syscalls) {
+	if (s.nr_ret < NR_syscalls) {
 		spu_release(ctx);
 		/* do actual system call from here */
 		spu_ret = spu_sys_callback(&s);
-- 
2.5.0

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

* Re: [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.
  2015-11-19  6:04 [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls Rashmica Gupta
@ 2015-11-19  9:15 ` Denis Kirjanov
  2015-11-19  9:59   ` Anshuman Khandual
  2015-11-23  3:29   ` Michael Ellerman
  2015-11-23  6:23 ` Anshuman Khandual
  2015-11-26 12:15 ` Michael Ellerman
  2 siblings, 2 replies; 10+ messages in thread
From: Denis Kirjanov @ 2015-11-19  9:15 UTC (permalink / raw)
  To: Rashmica Gupta; +Cc: linuxppc-dev

On 11/19/15, Rashmica Gupta <rashmicy@gmail.com> wrote:
> Most architectures use NR_syscalls as the #define for the number of
> syscalls.
>
> We use __NR_syscalls, and then define NR_syscalls as __NR_syscalls.
>
> __NR_syscalls is not used outside arch code, whereas NR_syscalls is. So as
> NR_syscalls must be defined and __NR_syscalls does not, replace
> __NR_syscalls
> with NR_syscalls.
Hi,

But what's wrong with the current code? Why do we need such change?

Thank you.

>
> Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>
> ---
>  arch/powerpc/include/asm/unistd.h        | 3 +--
>  arch/powerpc/include/asm/vdso_datapage.h | 2 +-
>  arch/powerpc/kernel/systbl_chk.c         | 2 +-
>  arch/powerpc/kernel/systbl_chk.sh        | 2 +-
>  arch/powerpc/kernel/vdso.c               | 2 +-
>  arch/powerpc/kernel/vdso32/datapage.S    | 2 +-
>  arch/powerpc/kernel/vdso64/datapage.S    | 2 +-
>  arch/powerpc/platforms/cell/spufs/run.c  | 2 +-
>  8 files changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/unistd.h
> b/arch/powerpc/include/asm/unistd.h
> index 6d8f8023ac27..05bf34296144 100644
> --- a/arch/powerpc/include/asm/unistd.h
> +++ b/arch/powerpc/include/asm/unistd.h
> @@ -12,10 +12,9 @@
>  #include <uapi/asm/unistd.h>
>
>
> -#define __NR_syscalls		378
> +#define NR_syscalls		378
>
>  #define __NR__exit __NR_exit
> -#define NR_syscalls	__NR_syscalls
>
>  #ifndef __ASSEMBLY__
>
> diff --git a/arch/powerpc/include/asm/vdso_datapage.h
> b/arch/powerpc/include/asm/vdso_datapage.h
> index b73a8199f161..1afe90ade595 100644
> --- a/arch/powerpc/include/asm/vdso_datapage.h
> +++ b/arch/powerpc/include/asm/vdso_datapage.h
> @@ -41,7 +41,7 @@
>  #include <linux/unistd.h>
>  #include <linux/time.h>
>
> -#define SYSCALL_MAP_SIZE      ((__NR_syscalls + 31) / 32)
> +#define SYSCALL_MAP_SIZE      ((NR_syscalls + 31) / 32)
>
>  /*
>   * So here is the ppc64 backward compatible version
> diff --git a/arch/powerpc/kernel/systbl_chk.c
> b/arch/powerpc/kernel/systbl_chk.c
> index 2384129f5893..55323a620cfe 100644
> --- a/arch/powerpc/kernel/systbl_chk.c
> +++ b/arch/powerpc/kernel/systbl_chk.c
> @@ -57,4 +57,4 @@
>
>  START_TABLE
>  #include <asm/systbl.h>
> -END_TABLE __NR_syscalls
> +END_TABLE NR_syscalls
> diff --git a/arch/powerpc/kernel/systbl_chk.sh
> b/arch/powerpc/kernel/systbl_chk.sh
> index 19415e7674a5..31b6e7c358ca 100644
> --- a/arch/powerpc/kernel/systbl_chk.sh
> +++ b/arch/powerpc/kernel/systbl_chk.sh
> @@ -16,7 +16,7 @@ awk	'BEGIN { num = -1; }	# Ignore the beginning of the
> file
>  	/^START_TABLE/ { num = 0; next; }
>  	/^END_TABLE/ {
>  		if (num != $2) {
> -			printf "__NR_syscalls (%s) is not one more than the last syscall
> (%s)\n",
> +			printf "NR_syscalls (%s) is not one more than the last syscall (%s)\n",
>  				$2, num - 1;
>  			exit(1);
>  		}
> diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
> index b457bfa28436..def1b8b5e6c1 100644
> --- a/arch/powerpc/kernel/vdso.c
> +++ b/arch/powerpc/kernel/vdso.c
> @@ -671,7 +671,7 @@ static void __init vdso_setup_syscall_map(void)
>  	extern unsigned long sys_ni_syscall;
>
>
> -	for (i = 0; i < __NR_syscalls; i++) {
> +	for (i = 0; i < NR_syscalls; i++) {
>  #ifdef CONFIG_PPC64
>  		if (sys_call_table[i*2] != sys_ni_syscall)
>  			vdso_data->syscall_map_64[i >> 5] |=
> diff --git a/arch/powerpc/kernel/vdso32/datapage.S
> b/arch/powerpc/kernel/vdso32/datapage.S
> index 59cf5f452879..3745113fcc65 100644
> --- a/arch/powerpc/kernel/vdso32/datapage.S
> +++ b/arch/powerpc/kernel/vdso32/datapage.S
> @@ -61,7 +61,7 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
>  	addi	r3,r3,CFG_SYSCALL_MAP32
>  	cmpli	cr0,r4,0
>  	beqlr
> -	li	r0,__NR_syscalls
> +	li	r0,NR_syscalls
>  	stw	r0,0(r4)
>  	crclr	cr0*4+so
>  	blr
> diff --git a/arch/powerpc/kernel/vdso64/datapage.S
> b/arch/powerpc/kernel/vdso64/datapage.S
> index 2f01c4a0d8a0..184a6ba7f283 100644
> --- a/arch/powerpc/kernel/vdso64/datapage.S
> +++ b/arch/powerpc/kernel/vdso64/datapage.S
> @@ -62,7 +62,7 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
>  	cmpli	cr0,r4,0
>  	crclr	cr0*4+so
>  	beqlr
> -	li	r0,__NR_syscalls
> +	li	r0,NR_syscalls
>  	stw	r0,0(r4)
>  	blr
>    .cfi_endproc
> diff --git a/arch/powerpc/platforms/cell/spufs/run.c
> b/arch/powerpc/platforms/cell/spufs/run.c
> index 4ddf769a64e5..9f79004e6d6f 100644
> --- a/arch/powerpc/platforms/cell/spufs/run.c
> +++ b/arch/powerpc/platforms/cell/spufs/run.c
> @@ -326,7 +326,7 @@ static int spu_process_callback(struct spu_context *ctx)
>  	spu_ret = -ENOSYS;
>  	npc += 4;
>
> -	if (s.nr_ret < __NR_syscalls) {
> +	if (s.nr_ret < NR_syscalls) {
>  		spu_release(ctx);
>  		/* do actual system call from here */
>  		spu_ret = spu_sys_callback(&s);
> --
> 2.5.0
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

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

* Re: [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.
  2015-11-19  9:15 ` Denis Kirjanov
@ 2015-11-19  9:59   ` Anshuman Khandual
  2015-11-19 10:33     ` Benjamin Herrenschmidt
  2015-11-23  3:29   ` Michael Ellerman
  1 sibling, 1 reply; 10+ messages in thread
From: Anshuman Khandual @ 2015-11-19  9:59 UTC (permalink / raw)
  To: Denis Kirjanov, Rashmica Gupta; +Cc: linuxppc-dev

On 11/19/2015 02:45 PM, Denis Kirjanov wrote:
> On 11/19/15, Rashmica Gupta <rashmicy@gmail.com> wrote:
>> > Most architectures use NR_syscalls as the #define for the number of
>> > syscalls.
>> >
>> > We use __NR_syscalls, and then define NR_syscalls as __NR_syscalls.
>> >
>> > __NR_syscalls is not used outside arch code, whereas NR_syscalls is. So as
>> > NR_syscalls must be defined and __NR_syscalls does not, replace
>> > __NR_syscalls
>> > with NR_syscalls.
> Hi,
> 
> But what's wrong with the current code? Why do we need such change?

Yeah, just out of curiosity. Why we had both __NR_syscalls and
NR_syscalls to begin with ?

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

* Re: [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.
  2015-11-19  9:59   ` Anshuman Khandual
@ 2015-11-19 10:33     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2015-11-19 10:33 UTC (permalink / raw)
  To: Anshuman Khandual, Denis Kirjanov, Rashmica Gupta; +Cc: linuxppc-dev

On Thu, 2015-11-19 at 15:29 +0530, Anshuman Khandual wrote:
> On 11/19/2015 02:45 PM, Denis Kirjanov wrote:
> > On 11/19/15, Rashmica Gupta <rashmicy@gmail.com> wrote:
> > > > Most architectures use NR_syscalls as the #define for the
> > > > number of
> > > > syscalls.
> > > > 
> > > > We use __NR_syscalls, and then define NR_syscalls as
> > > > __NR_syscalls.
> > > > 
> > > > __NR_syscalls is not used outside arch code, whereas
> > > > NR_syscalls is. So as
> > > > NR_syscalls must be defined and __NR_syscalls does not, replace
> > > > __NR_syscalls
> > > > with NR_syscalls.
> > Hi,
> > 
> > But what's wrong with the current code? Why do we need such change?
> 
> Yeah, just out of curiosity. Why we had both __NR_syscalls and
> NR_syscalls to begin with ?

Evolutionary remains. This is a whorthwhile and fairly simple cleanup.

Cheers,
Ben.

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

* Re: [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.
  2015-11-19  9:15 ` Denis Kirjanov
  2015-11-19  9:59   ` Anshuman Khandual
@ 2015-11-23  3:29   ` Michael Ellerman
  2015-11-23  9:28     ` Denis Kirjanov
  1 sibling, 1 reply; 10+ messages in thread
From: Michael Ellerman @ 2015-11-23  3:29 UTC (permalink / raw)
  To: Denis Kirjanov, Rashmica Gupta; +Cc: linuxppc-dev

On Thu, 2015-11-19 at 12:15 +0300, Denis Kirjanov wrote:

> On 11/19/15, Rashmica Gupta <rashmicy@gmail.com> wrote:

> > Most architectures use NR_syscalls as the #define for the number of
> > syscalls.
> > 
> > We use __NR_syscalls, and then define NR_syscalls as __NR_syscalls.
> > 
> > __NR_syscalls is not used outside arch code, whereas NR_syscalls is. So as
> > NR_syscalls must be defined and __NR_syscalls does not, replace
> > __NR_syscalls with NR_syscalls.
>
> Hi,
> 
> But what's wrong with the current code? Why do we need such change?

The change log explains it fairly well I think. Which part is not clear?

cheers

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

* Re: [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.
  2015-11-19  6:04 [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls Rashmica Gupta
  2015-11-19  9:15 ` Denis Kirjanov
@ 2015-11-23  6:23 ` Anshuman Khandual
  2015-11-23 23:22   ` Michael Ellerman
  2015-11-26 12:15 ` Michael Ellerman
  2 siblings, 1 reply; 10+ messages in thread
From: Anshuman Khandual @ 2015-11-23  6:23 UTC (permalink / raw)
  To: Rashmica Gupta, linuxppc-dev

On 11/19/2015 11:34 AM, Rashmica Gupta wrote:
> Most architectures use NR_syscalls as the #define for the number of syscalls.
> 
> We use __NR_syscalls, and then define NR_syscalls as __NR_syscalls.
> 
> __NR_syscalls is not used outside arch code, whereas NR_syscalls is. So as
> NR_syscalls must be defined and __NR_syscalls does not, replace __NR_syscalls
> with NR_syscalls.
> 
> Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>
> ---
>  arch/powerpc/include/asm/unistd.h        | 3 +--
>  arch/powerpc/include/asm/vdso_datapage.h | 2 +-
>  arch/powerpc/kernel/systbl_chk.c         | 2 +-
>  arch/powerpc/kernel/systbl_chk.sh        | 2 +-
>  arch/powerpc/kernel/vdso.c               | 2 +-
>  arch/powerpc/kernel/vdso32/datapage.S    | 2 +-
>  arch/powerpc/kernel/vdso64/datapage.S    | 2 +-
>  arch/powerpc/platforms/cell/spufs/run.c  | 2 +-
>  8 files changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
> index 6d8f8023ac27..05bf34296144 100644
> --- a/arch/powerpc/include/asm/unistd.h
> +++ b/arch/powerpc/include/asm/unistd.h
> @@ -12,10 +12,9 @@
>  #include <uapi/asm/unistd.h>
>  
>  
> -#define __NR_syscalls		378
> +#define NR_syscalls		378

This does not apply any more because of Michael's recent mlock2() system
call enablement commit. Please do rebase and resend.

- Anshuman

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

* Re: [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.
  2015-11-23  3:29   ` Michael Ellerman
@ 2015-11-23  9:28     ` Denis Kirjanov
  2015-11-23 10:14       ` Michael Ellerman
  0 siblings, 1 reply; 10+ messages in thread
From: Denis Kirjanov @ 2015-11-23  9:28 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: Rashmica Gupta, linuxppc-dev

On 11/23/15, Michael Ellerman <mpe@ellerman.id.au> wrote:
> On Thu, 2015-11-19 at 12:15 +0300, Denis Kirjanov wrote:
>
>> On 11/19/15, Rashmica Gupta <rashmicy@gmail.com> wrote:
>
>> > Most architectures use NR_syscalls as the #define for the number of
>> > syscalls.
>> >
>> > We use __NR_syscalls, and then define NR_syscalls as __NR_syscalls.
>> >
>> > __NR_syscalls is not used outside arch code, whereas NR_syscalls is. So
>> > as
>> > NR_syscalls must be defined and __NR_syscalls does not, replace
>> > __NR_syscalls with NR_syscalls.
>>
>> Hi,
>>
>> But what's wrong with the current code? Why do we need such change?
>
> The change log explains it fairly well I think. Which part is not clear?

Ok, first I wasn't aware that NR_syscalls has external users such as
tracing. Agreed, it's better to have only one definition in this case.

>
> cheers
>
>

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

* Re: [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.
  2015-11-23  9:28     ` Denis Kirjanov
@ 2015-11-23 10:14       ` Michael Ellerman
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2015-11-23 10:14 UTC (permalink / raw)
  To: Denis Kirjanov; +Cc: Rashmica Gupta, linuxppc-dev

On Mon, 2015-11-23 at 12:28 +0300, Denis Kirjanov wrote:
> On 11/23/15, Michael Ellerman <mpe@ellerman.id.au> wrote:
> > On Thu, 2015-11-19 at 12:15 +0300, Denis Kirjanov wrote:
> > > On 11/19/15, Rashmica Gupta <rashmicy@gmail.com> wrote:
> > > > Most architectures use NR_syscalls as the #define for the number of
> > > > syscalls.
> > > > 
> > > > We use __NR_syscalls, and then define NR_syscalls as __NR_syscalls.
> > > > 
> > > > __NR_syscalls is not used outside arch code, whereas NR_syscalls is. So
> > > > as
> > > > NR_syscalls must be defined and __NR_syscalls does not, replace
> > > > __NR_syscalls with NR_syscalls.
> > > 
> > > Hi,
> > > 
> > > But what's wrong with the current code? Why do we need such change?
> > 
> > The change log explains it fairly well I think. Which part is not clear?
> 
> Ok, first I wasn't aware that NR_syscalls has external users such as
> tracing. Agreed, it's better to have only one definition in this case.

Right, apart from tracing it would just be an arch internal detail. But since
we must #define NR_syscalls for tracing it's cleaner to just have that.

cheers

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

* Re: [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.
  2015-11-23  6:23 ` Anshuman Khandual
@ 2015-11-23 23:22   ` Michael Ellerman
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2015-11-23 23:22 UTC (permalink / raw)
  To: Anshuman Khandual, Rashmica Gupta, linuxppc-dev

On Mon, 2015-11-23 at 11:53 +0530, Anshuman Khandual wrote:

> On 11/19/2015 11:34 AM, Rashmica Gupta wrote:

> > Most architectures use NR_syscalls as the #define for the number of syscalls.
> > 
> > We use __NR_syscalls, and then define NR_syscalls as __NR_syscalls.
> > 
> > __NR_syscalls is not used outside arch code, whereas NR_syscalls is. So as
> > NR_syscalls must be defined and __NR_syscalls does not, replace __NR_syscalls
> > with NR_syscalls.
> > 
> > Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>
> > 
> > diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
> > index 6d8f8023ac27..05bf34296144 100644
> > --- a/arch/powerpc/include/asm/unistd.h
> > +++ b/arch/powerpc/include/asm/unistd.h
> > @@ -12,10 +12,9 @@
> >  #include <uapi/asm/unistd.h>
> >  
> >  
> > -#define __NR_syscalls		378
> > +#define NR_syscalls		378
> 
> This does not apply any more because of Michael's recent mlock2() system
> call enablement commit. Please do rebase and resend.

That's fine, I can fix up trivial conflicts like that myself.

cheers

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

* Re: powerpc: Standardise on NR_syscalls rather than __NR_syscalls.
  2015-11-19  6:04 [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls Rashmica Gupta
  2015-11-19  9:15 ` Denis Kirjanov
  2015-11-23  6:23 ` Anshuman Khandual
@ 2015-11-26 12:15 ` Michael Ellerman
  2 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2015-11-26 12:15 UTC (permalink / raw)
  To: Rashmica Gupta, linuxppc-dev

On Thu, 2015-19-11 at 06:04:53 UTC, Rashmica Gupta wrote:
> Most architectures use NR_syscalls as the #define for the number of syscalls.
> 
> We use __NR_syscalls, and then define NR_syscalls as __NR_syscalls.
> 
> __NR_syscalls is not used outside arch code, whereas NR_syscalls is. So as
> NR_syscalls must be defined and __NR_syscalls does not, replace __NR_syscalls
> with NR_syscalls.
> 
> Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/f43194e45852b0455d2a3e37

cheers

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

end of thread, other threads:[~2015-11-26 12:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-19  6:04 [PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls Rashmica Gupta
2015-11-19  9:15 ` Denis Kirjanov
2015-11-19  9:59   ` Anshuman Khandual
2015-11-19 10:33     ` Benjamin Herrenschmidt
2015-11-23  3:29   ` Michael Ellerman
2015-11-23  9:28     ` Denis Kirjanov
2015-11-23 10:14       ` Michael Ellerman
2015-11-23  6:23 ` Anshuman Khandual
2015-11-23 23:22   ` Michael Ellerman
2015-11-26 12:15 ` Michael Ellerman

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.