Re: [RFC PATCH for 4.15 10/14] cpu_opv: Wire up powerpc system call

2017-11-06 Thread Nicholas Piggin
On Tue, 7 Nov 2017 00:47:17 + (UTC)
Mathieu Desnoyers  wrote:

> - On Nov 6, 2017, at 7:37 PM, Nicholas Piggin npig...@gmail.com wrote:
> 
> > On Mon,  6 Nov 2017 15:56:40 -0500
> > Mathieu Desnoyers  wrote:
> >   
> >> diff --git a/arch/powerpc/include/uapi/asm/unistd.h
> >> b/arch/powerpc/include/uapi/asm/unistd.h
> >> index b1980fcd56d5..972a7d68c143 100644
> >> --- a/arch/powerpc/include/uapi/asm/unistd.h
> >> +++ b/arch/powerpc/include/uapi/asm/unistd.h
> >> @@ -396,5 +396,6 @@
> >>  #define __NR_kexec_file_load  382
> >>  #define __NR_statx383
> >>  #define __NR_rseq 384
> >> +#define __NR_cpu_opv  385  
> > 
> > Sorry for bike shedding, but could we invest a few more keystrokes to
> > make these names a bit more readable?  
> 
> Whenever I try to make variables or function names more explicit, I can
> literally feel my consciousness (taking the form of an angry Peter Zijlstra)
> breathing down my neck asking me to make them shorter. So I guess this is
> where it becomes a question of taste.

Specialist syscall is a bit different than a common function or variable
though.

> 
> I think the "rseq" syscall name is short, to the point, and should be mostly
> fine.

I'm not sure if it's really "to the point". I think kexec_file_load
is better than kfload, for example :)

> For "cpu_opv", it was just a short name that fit the bill until a
> better idea would come.
> 
> I'm open to suggestions. Any color preference ? ;-)

What can you do within 16 characters?


Re: [RFC PATCH for 4.15 10/14] cpu_opv: Wire up powerpc system call

2017-11-06 Thread Mathieu Desnoyers
- On Nov 6, 2017, at 7:37 PM, Nicholas Piggin npig...@gmail.com wrote:

> On Mon,  6 Nov 2017 15:56:40 -0500
> Mathieu Desnoyers  wrote:
> 
>> diff --git a/arch/powerpc/include/uapi/asm/unistd.h
>> b/arch/powerpc/include/uapi/asm/unistd.h
>> index b1980fcd56d5..972a7d68c143 100644
>> --- a/arch/powerpc/include/uapi/asm/unistd.h
>> +++ b/arch/powerpc/include/uapi/asm/unistd.h
>> @@ -396,5 +396,6 @@
>>  #define __NR_kexec_file_load382
>>  #define __NR_statx  383
>>  #define __NR_rseq   384
>> +#define __NR_cpu_opv385
> 
> Sorry for bike shedding, but could we invest a few more keystrokes to
> make these names a bit more readable?

Whenever I try to make variables or function names more explicit, I can
literally feel my consciousness (taking the form of an angry Peter Zijlstra)
breathing down my neck asking me to make them shorter. So I guess this is
where it becomes a question of taste.

I think the "rseq" syscall name is short, to the point, and should be mostly
fine.

For "cpu_opv", it was just a short name that fit the bill until a
better idea would come.

I'm open to suggestions. Any color preference ? ;-)

Thanks,

Mathieu


> 
> Thanks,
> Nick

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


Re: [RFC PATCH for 4.15 10/14] cpu_opv: Wire up powerpc system call

2017-11-06 Thread Nicholas Piggin
On Mon,  6 Nov 2017 15:56:40 -0500
Mathieu Desnoyers  wrote:

> diff --git a/arch/powerpc/include/uapi/asm/unistd.h 
> b/arch/powerpc/include/uapi/asm/unistd.h
> index b1980fcd56d5..972a7d68c143 100644
> --- a/arch/powerpc/include/uapi/asm/unistd.h
> +++ b/arch/powerpc/include/uapi/asm/unistd.h
> @@ -396,5 +396,6 @@
>  #define __NR_kexec_file_load 382
>  #define __NR_statx   383
>  #define __NR_rseq384
> +#define __NR_cpu_opv 385

Sorry for bike shedding, but could we invest a few more keystrokes to
make these names a bit more readable?

Thanks,
Nick


[RFC PATCH for 4.15 10/14] cpu_opv: Wire up powerpc system call

2017-11-06 Thread Mathieu Desnoyers
Signed-off-by: Mathieu Desnoyers 
CC: Benjamin Herrenschmidt 
CC: Paul Mackerras 
CC: Michael Ellerman 
CC: Boqun Feng 
CC: Peter Zijlstra 
CC: "Paul E. McKenney" 
CC: linuxppc-...@lists.ozlabs.org
---
 arch/powerpc/include/asm/systbl.h  | 1 +
 arch/powerpc/include/asm/unistd.h  | 2 +-
 arch/powerpc/include/uapi/asm/unistd.h | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/systbl.h 
b/arch/powerpc/include/asm/systbl.h
index 964321a5799c..f9cdb896fbaa 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -390,3 +390,4 @@ COMPAT_SYS_SPU(pwritev2)
 SYSCALL(kexec_file_load)
 SYSCALL(statx)
 SYSCALL(rseq)
+SYSCALL(cpu_opv)
diff --git a/arch/powerpc/include/asm/unistd.h 
b/arch/powerpc/include/asm/unistd.h
index e76bd5601ea4..48f80f452e31 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -12,7 +12,7 @@
 #include 
 
 
-#define NR_syscalls385
+#define NR_syscalls386
 
 #define __NR__exit __NR_exit
 
diff --git a/arch/powerpc/include/uapi/asm/unistd.h 
b/arch/powerpc/include/uapi/asm/unistd.h
index b1980fcd56d5..972a7d68c143 100644
--- a/arch/powerpc/include/uapi/asm/unistd.h
+++ b/arch/powerpc/include/uapi/asm/unistd.h
@@ -396,5 +396,6 @@
 #define __NR_kexec_file_load   382
 #define __NR_statx 383
 #define __NR_rseq  384
+#define __NR_cpu_opv   385
 
 #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */
-- 
2.11.0