Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-12 Thread Deepa Dinamani
I posted the updated series. I fixed up the order of include files
where I could find some order.
There have been other commits that used scripts to do such
replacements and have already stomped on the order.
For example:

commit 7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba
Author: Linus Torvalds 
Replace  with  globally

-Deepa


On Tue, Mar 6, 2018 at 2:58 PM, Deepa Dinamani  wrote:
> On Tue, Mar 6, 2018 at 4:48 AM, Christian Borntraeger
>  wrote:
>>
>>
>> On 03/06/2018 01:46 PM, Arnd Bergmann wrote:
>>> On Mon, Mar 5, 2018 at 10:30 AM, Christian Borntraeger
>>>  wrote:
 On 01/16/2018 03:18 AM, Deepa Dinamani wrote:
> All the current architecture specific defines for these
> are the same. Refactor these common defines to a common
> header file.
>
> The new common linux/compat_time.h is also useful as it
> will eventually be used to hold all the defines that
> are needed for compat time types that support non y2038
> safe types. New architectures need not have to define these
> new types as they will only use new y2038 safe syscalls.
> This file can be deleted after y2038 when we stop supporting
> non y2038 safe syscalls.

 You are now include a  from several asm files
 (
  arch/arm64/include/asm/stat.h
  arch/s390/include/asm/elf.h
  arch/x86/include/asm/ftrace.h
  arch/x86/include/asm/sys_ia32.h
 )
 It works, and it is done in many places, but it looks somewhat weird.
 Would it make sense to have an asm-generic/compate-time.h instead? Asking 
 for
 opinions here.
>>>
>>> I don't think we have such a rule. If a header file is common to all
>>> architectures (i.e. no architecture uses a different implementation),
>>> it should be in include/linux rather than include/asm-generic, regardless
>>> of whether it can be used by assembler files or not.
>>>
> --- a/drivers/s390/net/qeth_core_main.c
> +++ b/drivers/s390/net/qeth_core_main.c
> @@ -32,7 +32,7 @@
>  #include 
>  #include 
>  #include 
> -#include 
> +#include 
>  #include 
>  #include 
>  #include 

 Can you move that into the other includes (where all the other  
 includes are.
>>>
>>> Good catch, this is definitely a rule we have ;-)
>>
>> FWIW, this was also broken for
>> arch/x86/include/asm/sys_ia32.h
>
> The reason that this was done this way is because of the sed script
> mentioned in the commit text.
> I was trying to make minimal change apart from the script so that we
> don't have other changes like moving the lines to keep the patch
> simpler.
> I will fix this by hand since this is preferred.
> I will post an update.
>
> -Deepa


Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-06 Thread Deepa Dinamani
On Tue, Mar 6, 2018 at 4:48 AM, Christian Borntraeger
 wrote:
>
>
> On 03/06/2018 01:46 PM, Arnd Bergmann wrote:
>> On Mon, Mar 5, 2018 at 10:30 AM, Christian Borntraeger
>>  wrote:
>>> On 01/16/2018 03:18 AM, Deepa Dinamani wrote:
 All the current architecture specific defines for these
 are the same. Refactor these common defines to a common
 header file.

 The new common linux/compat_time.h is also useful as it
 will eventually be used to hold all the defines that
 are needed for compat time types that support non y2038
 safe types. New architectures need not have to define these
 new types as they will only use new y2038 safe syscalls.
 This file can be deleted after y2038 when we stop supporting
 non y2038 safe syscalls.
>>>
>>> You are now include a  from several asm files
>>> (
>>>  arch/arm64/include/asm/stat.h
>>>  arch/s390/include/asm/elf.h
>>>  arch/x86/include/asm/ftrace.h
>>>  arch/x86/include/asm/sys_ia32.h
>>> )
>>> It works, and it is done in many places, but it looks somewhat weird.
>>> Would it make sense to have an asm-generic/compate-time.h instead? Asking 
>>> for
>>> opinions here.
>>
>> I don't think we have such a rule. If a header file is common to all
>> architectures (i.e. no architecture uses a different implementation),
>> it should be in include/linux rather than include/asm-generic, regardless
>> of whether it can be used by assembler files or not.
>>
 --- a/drivers/s390/net/qeth_core_main.c
 +++ b/drivers/s390/net/qeth_core_main.c
 @@ -32,7 +32,7 @@
  #include 
  #include 
  #include 
 -#include 
 +#include 
  #include 
  #include 
  #include 
>>>
>>> Can you move that into the other includes (where all the other  
>>> includes are.
>>
>> Good catch, this is definitely a rule we have ;-)
>
> FWIW, this was also broken for
> arch/x86/include/asm/sys_ia32.h

The reason that this was done this way is because of the sed script
mentioned in the commit text.
I was trying to make minimal change apart from the script so that we
don't have other changes like moving the lines to keep the patch
simpler.
I will fix this by hand since this is preferred.
I will post an update.

-Deepa


Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-06 Thread Christian Borntraeger


On 03/06/2018 01:46 PM, Arnd Bergmann wrote:
> On Mon, Mar 5, 2018 at 10:30 AM, Christian Borntraeger
>  wrote:
>> On 01/16/2018 03:18 AM, Deepa Dinamani wrote:
>>> All the current architecture specific defines for these
>>> are the same. Refactor these common defines to a common
>>> header file.
>>>
>>> The new common linux/compat_time.h is also useful as it
>>> will eventually be used to hold all the defines that
>>> are needed for compat time types that support non y2038
>>> safe types. New architectures need not have to define these
>>> new types as they will only use new y2038 safe syscalls.
>>> This file can be deleted after y2038 when we stop supporting
>>> non y2038 safe syscalls.
>>
>> You are now include a  from several asm files
>> (
>>  arch/arm64/include/asm/stat.h
>>  arch/s390/include/asm/elf.h
>>  arch/x86/include/asm/ftrace.h
>>  arch/x86/include/asm/sys_ia32.h
>> )
>> It works, and it is done in many places, but it looks somewhat weird.
>> Would it make sense to have an asm-generic/compate-time.h instead? Asking for
>> opinions here.
> 
> I don't think we have such a rule. If a header file is common to all
> architectures (i.e. no architecture uses a different implementation),
> it should be in include/linux rather than include/asm-generic, regardless
> of whether it can be used by assembler files or not.
> 
>>> --- a/drivers/s390/net/qeth_core_main.c
>>> +++ b/drivers/s390/net/qeth_core_main.c
>>> @@ -32,7 +32,7 @@
>>>  #include 
>>>  #include 
>>>  #include 
>>> -#include 
>>> +#include 
>>>  #include 
>>>  #include 
>>>  #include 
>>
>> Can you move that into the other includes (where all the other  
>> includes are.
> 
> Good catch, this is definitely a rule we have ;-)

FWIW, this was also broken for 
arch/x86/include/asm/sys_ia32.h



Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-06 Thread Arnd Bergmann
On Mon, Mar 5, 2018 at 10:30 AM, Christian Borntraeger
 wrote:
> On 01/16/2018 03:18 AM, Deepa Dinamani wrote:
>> All the current architecture specific defines for these
>> are the same. Refactor these common defines to a common
>> header file.
>>
>> The new common linux/compat_time.h is also useful as it
>> will eventually be used to hold all the defines that
>> are needed for compat time types that support non y2038
>> safe types. New architectures need not have to define these
>> new types as they will only use new y2038 safe syscalls.
>> This file can be deleted after y2038 when we stop supporting
>> non y2038 safe syscalls.
>
> You are now include a  from several asm files
> (
>  arch/arm64/include/asm/stat.h
>  arch/s390/include/asm/elf.h
>  arch/x86/include/asm/ftrace.h
>  arch/x86/include/asm/sys_ia32.h
> )
> It works, and it is done in many places, but it looks somewhat weird.
> Would it make sense to have an asm-generic/compate-time.h instead? Asking for
> opinions here.

I don't think we have such a rule. If a header file is common to all
architectures (i.e. no architecture uses a different implementation),
it should be in include/linux rather than include/asm-generic, regardless
of whether it can be used by assembler files or not.

>> --- a/drivers/s390/net/qeth_core_main.c
>> +++ b/drivers/s390/net/qeth_core_main.c
>> @@ -32,7 +32,7 @@
>>  #include 
>>  #include 
>>  #include 
>> -#include 
>> +#include 
>>  #include 
>>  #include 
>>  #include 
>
> Can you move that into the other includes (where all the other  
> includes are.

Good catch, this is definitely a rule we have ;-)

   Arnd


Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-05 Thread Christian Borntraeger
On 01/16/2018 03:18 AM, Deepa Dinamani wrote:
> All the current architecture specific defines for these
> are the same. Refactor these common defines to a common
> header file.
> 
> The new common linux/compat_time.h is also useful as it
> will eventually be used to hold all the defines that
> are needed for compat time types that support non y2038
> safe types. New architectures need not have to define these
> new types as they will only use new y2038 safe syscalls.
> This file can be deleted after y2038 when we stop supporting
> non y2038 safe syscalls.

You are now include a  from several asm files
(
 arch/arm64/include/asm/stat.h   
 arch/s390/include/asm/elf.h 
 arch/x86/include/asm/ftrace.h   
 arch/x86/include/asm/sys_ia32.h 
)
It works, and it is done in many places, but it looks somewhat weird.
Would it make sense to have an asm-generic/compate-time.h instead? Asking for
opinions here.

> 
> The patch also requires an operation similar to:
> 
> git grep "asm/compat\.h" | cut -d ":" -f 1 |  xargs -n 1 sed -i -e 
> "s%asm/compat.h%linux/compat.h%g"

some comments from the s390 perspective:

> --- a/arch/s390/hypfs/hypfs_sprp.c
> +++ b/arch/s390/hypfs/hypfs_sprp.c
ok.
[...]
> --- a/arch/s390/include/asm/elf.h
> +++ b/arch/s390/include/asm/elf.h
> @@ -126,7 +126,7 @@
>   */
> 
>  #include 
> -#include 
> +#include 
>  #include 
>  #include 

see above.
[...]
> --- a/arch/s390/kvm/priv.c
> +++ b/arch/s390/kvm/priv.c
ok
> --- a/arch/s390/pci/pci_clp.c
> +++ b/arch/s390/pci/pci_clp.c
ok
> --- a/drivers/s390/block/dasd_ioctl.c
> +++ b/drivers/s390/block/dasd_ioctl.c
ok 
> --- a/drivers/s390/char/fs3270.c
> +++ b/drivers/s390/char/fs3270.c
ok
> --- a/drivers/s390/char/sclp_ctl.c
> +++ b/drivers/s390/char/sclp_ctl.c
ok
> --- a/drivers/s390/char/vmcp.c
> +++ b/drivers/s390/char/vmcp.c
ok
> --- a/drivers/s390/cio/chsc_sch.c
> +++ b/drivers/s390/cio/chsc_sch.c
ok

> --- a/drivers/s390/net/qeth_core_main.c
> +++ b/drivers/s390/net/qeth_core_main.c
> @@ -32,7 +32,7 @@
>  #include 
>  #include 
>  #include 
> -#include 
> +#include 
>  #include 
>  #include 
>  #include 

Can you move that into the other includes (where all the other  
includes are.



Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-04 Thread Helge Deller
On 16.01.2018 03:18, Deepa Dinamani wrote:
> All the current architecture specific defines for these
> are the same. Refactor these common defines to a common
> header file.
> 
> The new common linux/compat_time.h is also useful as it
> will eventually be used to hold all the defines that
> are needed for compat time types that support non y2038
> safe types. New architectures need not have to define these
> new types as they will only use new y2038 safe syscalls.
> This file can be deleted after y2038 when we stop supporting
> non y2038 safe syscalls.

For parisc:

Acked-by: Helge Deller  # parisc


Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-02 Thread James Hogan
On Mon, Jan 15, 2018 at 06:18:10PM -0800, Deepa Dinamani wrote:
> All the current architecture specific defines for these
> are the same. Refactor these common defines to a common
> header file.
> 
> The new common linux/compat_time.h is also useful as it
> will eventually be used to hold all the defines that
> are needed for compat time types that support non y2038
> safe types. New architectures need not have to define these
> new types as they will only use new y2038 safe syscalls.
> This file can be deleted after y2038 when we stop supporting
> non y2038 safe syscalls.

...

>  arch/mips/include/asm/compat.h| 11 ---
>  arch/mips/kernel/signal32.c   |  2 +-

For MIPS:
Acked-by: James Hogan 

Cheers
James


signature.asc
Description: Digital signature


Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-01-16 Thread Steven Rostedt
On Mon, 15 Jan 2018 18:18:10 -0800
Deepa Dinamani  wrote:

> diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h
> index 09ad88572746..db25aa15b705 100644
> --- a/arch/x86/include/asm/ftrace.h
> +++ b/arch/x86/include/asm/ftrace.h

Acked-by: Steven Rostedt (VMware) 

-- Steve

> @@ -49,7 +49,7 @@ int ftrace_int3_handler(struct pt_regs *regs);
>  #if !defined(__ASSEMBLY__) && !defined(COMPILE_OFFSETS)
>  
>  #if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_IA32_EMULATION)
> -#include 
> +#include 
>  
>  /*
>   * Because ia32 syscalls do not map to x86_64 syscall numbers


Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-01-16 Thread Catalin Marinas
On Mon, Jan 15, 2018 at 06:18:10PM -0800, Deepa Dinamani wrote:
> All the current architecture specific defines for these
> are the same. Refactor these common defines to a common
> header file.
> 
> The new common linux/compat_time.h is also useful as it
> will eventually be used to hold all the defines that
> are needed for compat time types that support non y2038
> safe types. New architectures need not have to define these
> new types as they will only use new y2038 safe syscalls.
> This file can be deleted after y2038 when we stop supporting
> non y2038 safe syscalls.

For arm64:

Acked-by: Catalin Marinas