Re: [PATCH] bug.h: Work around GCC PR82365 in BUG()

2018-04-11 Thread James Hogan
On Wed, Apr 11, 2018 at 12:08:51PM +0200, Arnd Bergmann wrote:
> On Wed, Apr 11, 2018 at 11:54 AM, James Hogan <jho...@kernel.org> wrote:
> > On Wed, Apr 11, 2018 at 09:30:56AM +0200, Arnd Bergmann wrote:
> >> On Wed, Apr 11, 2018 at 12:48 AM, James Hogan <jho...@kernel.org> wrote:
> >> > Before I forward port those patches to add .insn for MIPS, is that sort
> >> > of approach (an arch specific asm/compiler-gcc.h to allow MIPS to
> >> > override barrier_before_unreachable()) an acceptable fix?
> >>
> >> That sounds fine to me. However, I would suggest making that
> >> asm/compiler.h instead of asm/compiler-gcc.h, so we can also
> >> use the same file to include workarounds for clang if needed.
> >
> > Yes, though there are a few asm/compiler.h's already, and the alpha one
> > includes linux/compiler.h before undefining inline, so seems to have its
> > own specific purpose...
> 
> Interesting. For the other ones, including asm/compiler.h from 
> linux/compiler.h
> seems appropriate though, so the question would be what to do with the
> alpha case. I think we can simply remove that header file and replace
> it with this patch:
> 
> diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
> index b2022885ced8..5502404f54cd 100644
> --- a/arch/alpha/Kconfig
> +++ b/arch/alpha/Kconfig
> @@ -81,6 +81,9 @@ config PGTABLE_LEVELS
> int
> default 3
> 
> +config OPTIMIZE_INLINING
> +   def_bool y
> +
>  source "init/Kconfig"
>  source "kernel/Kconfig.freezer"
> 
> which should have the same effect.

Hmm yes, and I suppose alpha would need ARCH_SUPPORTS_OPTIMIZED_INLINING
too. I'll give it a try.

Cheers
James


signature.asc
Description: Digital signature
___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH] bug.h: Work around GCC PR82365 in BUG()

2018-04-11 Thread James Hogan
On Wed, Apr 11, 2018 at 09:30:56AM +0200, Arnd Bergmann wrote:
> On Wed, Apr 11, 2018 at 12:48 AM, James Hogan <jho...@kernel.org> wrote:
> > Before I forward port those patches to add .insn for MIPS, is that sort
> > of approach (an arch specific asm/compiler-gcc.h to allow MIPS to
> > override barrier_before_unreachable()) an acceptable fix?
> 
> That sounds fine to me. However, I would suggest making that
> asm/compiler.h instead of asm/compiler-gcc.h, so we can also
> use the same file to include workarounds for clang if needed.

Yes, though there are a few asm/compiler.h's already, and the alpha one
includes linux/compiler.h before undefining inline, so seems to have its
own specific purpose...

Cheers
James


signature.asc
Description: Digital signature
___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH] bug.h: Work around GCC PR82365 in BUG()

2018-04-10 Thread James Hogan
Hi Arnd,

On Tue, Dec 19, 2017 at 12:39:33PM +0100, Arnd Bergmann wrote:
> diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
> index 5d595cfdb2c4..66cfdad68f7e 100644
> --- a/include/linux/compiler-gcc.h
> +++ b/include/linux/compiler-gcc.h
> @@ -205,6 +205,15 @@
>  #endif
>  
>  /*
> + * calling noreturn functions, __builtin_unreachable() and __builtin_trap()
> + * confuse the stack allocation in gcc, leading to overly large stack
> + * frames, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365
> + *
> + * Adding an empty inline assembly before it works around the problem
> + */
> +#define barrier_before_unreachable() asm volatile("")
> +
> +/*
>   * Mark a position in code as unreachable.  This can be used to
>   * suppress control flow warnings after asm blocks that transfer
>   * control elsewhere.
> @@ -214,7 +223,11 @@
>   * unreleased.  Really, we need to have autoconf for the kernel.
>   */
>  #define unreachable() \
> - do { annotate_unreachable(); __builtin_unreachable(); } while (0)
> + do {\
> + annotate_unreachable(); \
> + barrier_before_unreachable();   \
> + __builtin_unreachable();\
> + } while (0)

Unfortunately this breaks microMIPS builds (e.g. MIPS
micro32r2_defconfig and micro32r2el_defconfig) on gcc 7.2, due to the
lack of .insn in the asm volatile. Because of the
__builtin_unreachable() there is no code following it. Without the empty
asm the compiler will apparently put the .insn there automatically, but
with the empty asm it doesn't. Therefore the assembler won't treat an
immediately preceeding label as pointing at 16-bit microMIPS
instructions which need the ISA bit set, i.e. bit 0 of the address.
This causes assembler errors since the branch target is treated as a
different ISA mode:

arch/mips/mm/dma-default.s:3265: Error: branch to a symbol in another ISA mode
arch/mips/mm/dma-default.s:5027: Error: branch to a symbol in another ISA mode

Due to a compiler bug on gcc 4.9.2 -> somewhere before 7.2, Paul
submitted these patches a while back:
https://patchwork.linux-mips.org/patch/13360/
https://patchwork.linux-mips.org/patch/13361/

Your patch (suitably fixed for microMIPS) would I imagine fix that issue
too (it certainly fixes the resulting link error on microMIPS builds
with an old toolchain).

Before I forward port those patches to add .insn for MIPS, is that sort
of approach (an arch specific asm/compiler-gcc.h to allow MIPS to
override barrier_before_unreachable()) an acceptable fix?

Thanks
James


signature.asc
Description: Digital signature
___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH] pci: Add and use PCI_GENERIC_SETUP Kconfig entry

2017-06-23 Thread James Hogan
On Fri, Jun 23, 2017 at 02:45:38PM -0700, Palmer Dabbelt wrote:
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 4c1a35f15838..86872246951c 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -96,6 +96,7 @@ config ARM
>   select PERF_USE_VMALLOC
>   select RTC_LIB
>   select SYS_SUPPORTS_APM_EMULATION
> + select PCI_GENERIC_SETUP
>   # Above selects are sorted alphabetically; please add new ones
>   # according to that.  Thanks.

This comment seems to suggest PCI_GENERIC_SETUP should be added a few
lines up to preserve the alphabetical sorting.

> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index b2024db225a9..6c684d8c8816 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -115,6 +115,7 @@ config ARM64
>   select SPARSE_IRQ
>   select SYSCTL_EXCEPTION_TRACE
>   select THREAD_INFO_IN_TASK
> + select PCI_GENERIC_SETUP

Here too.

> diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
> index 4583c0320059..6679af85a882 100644
> --- a/arch/tile/Kconfig
> +++ b/arch/tile/Kconfig
> @@ -33,6 +33,7 @@ config TILE
>   select USER_STACKTRACE_SUPPORT
>   select USE_PMC if PERF_EVENTS
>   select VIRT_TO_BUS
> + select PCI_GENERIC_SETUP

and here

Otherwise
Reviewed-by: James Hogan <james.ho...@imgtec.com>

Cheers
James


signature.asc
Description: Digital signature
___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH 03/20] asm-generic: Drop getrlimit and setrlimit syscalls from default list

2017-06-19 Thread James Hogan
On Mon, Jun 19, 2017 at 11:58:41PM +0200, Arnd Bergmann wrote:
> On Mon, Jun 19, 2017 at 11:42 PM, James Hogan <james.ho...@imgtec.com> wrote:
> > On Mon, Jun 19, 2017 at 06:49:46PM +0300, Yury Norov wrote:
> > Subject: [PATCH] Deprecate stat syscalls superseded by statx
> >
> > Various stat system calls can now be implemented as userland wrappers
> > around the new statx system call, so allow them to be removed from the
> > kernel by default for new architectures / ABIs.
> >
> > This involves adding __ARCH_WANT_SYSCALL_UNXSTAT to each existing
> > architecture, which enables the relevant stat system calls in the
> > generic system call list (if used). It also conditionally defines the
> > syscalls in fs/stat.c and struct stat / struct stat64 in
> > asm-generic/stat.h.
> >
> > Signed-off-by: James Hogan <james.ho...@imgtec.com>
> > Cc: David Howells <dhowe...@redhat.com>
> > Cc: Alexander Viro <v...@zeniv.linux.org.uk>
> > Cc: Arnd Bergmann <a...@arndb.de>
> > Cc: linux-fsde...@vger.kernel.org
> > Cc: linux-a...@vger.kernel.org
> > Cc: linux-...@vger.kernel.org
> > Cc: linux-ker...@vger.kernel.org
> 
> Good idea:
> 
> Acked-by:  Arnd Bergmann <a...@arndb.de>

Thanks,

> 
> > +/* statx deprecates the un-extended stat syscalls which use struct 
> > stat[64] */
> > +#ifdef __ARCH_WANT_SYSCALL_UNXSTAT
> 
> I'm glad you explain what 'UNXSTAT' means here, since I would not
> have otherwise guessed it, but I also can't think of anything more
> intuitive.

Yeh, I renamed that several times while playing around with this :-).

The stat syscalls remind me a bit of the Vicar of Dibley episode where
the new road named "New Road" necessitates the renaming of the existing
"New Road" to "Quite Old Road" and "Quite Old Road" to "Really Quite Old
Road" and "Old Road" to "Very Old Road"!

Cheers
James


signature.asc
Description: Digital signature
___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH 03/20] asm-generic: Drop getrlimit and setrlimit syscalls from default list

2017-06-19 Thread James Hogan
Hi Yury,

On Mon, Jun 19, 2017 at 06:49:46PM +0300, Yury Norov wrote:
> The newer prlimit64 syscall provides all the functionality provided by
> the getrlimit and setrlimit syscalls and adds the pid of target process,
> so future architectures won't need to include getrlimit and setrlimit.
> 
> Therefore drop getrlimit and setrlimit syscalls from the generic syscall
> list unless __ARCH_WANT_SET_GET_RLIMIT is defined by the architecture's
> unistd.h prior to including asm-generic/unistd.h, and adjust all architectures
> using the generic syscall list to define it so that no in-tree architectures
> are affected.

I have a similar experimental patch lying around for the stat system
calls which are superseded by statx (see below). If it looks acceptable
maybe you'd like to incorporate it (or something similar) into your
series.

Cheers
James

---
From: James Hogan <james.ho...@imgtec.com>
Date: Fri, 2 Jun 2017 13:07:27 +0100
Subject: [PATCH] Deprecate stat syscalls superseded by statx

Various stat system calls can now be implemented as userland wrappers
around the new statx system call, so allow them to be removed from the
kernel by default for new architectures / ABIs.

This involves adding __ARCH_WANT_SYSCALL_UNXSTAT to each existing
architecture, which enables the relevant stat system calls in the
generic system call list (if used). It also conditionally defines the
syscalls in fs/stat.c and struct stat / struct stat64 in
asm-generic/stat.h.

Signed-off-by: James Hogan <james.ho...@imgtec.com>
Cc: David Howells <dhowe...@redhat.com>
Cc: Alexander Viro <v...@zeniv.linux.org.uk>
Cc: Arnd Bergmann <a...@arndb.de>
Cc: linux-fsde...@vger.kernel.org
Cc: linux-a...@vger.kernel.org
Cc: linux-...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
---
 arch/alpha/include/asm/unistd.h  | 1 +
 arch/arc/include/uapi/asm/unistd.h   | 1 +
 arch/arm/include/asm/unistd.h| 1 +
 arch/arm64/include/uapi/asm/unistd.h | 1 +
 arch/blackfin/include/asm/unistd.h   | 1 +
 arch/c6x/include/uapi/asm/unistd.h   | 1 +
 arch/cris/include/asm/unistd.h   | 1 +
 arch/frv/include/asm/unistd.h| 1 +
 arch/h8300/include/uapi/asm/unistd.h | 1 +
 arch/hexagon/include/uapi/asm/unistd.h   | 1 +
 arch/ia64/include/asm/unistd.h   | 2 ++
 arch/m32r/include/asm/unistd.h   | 1 +
 arch/m68k/include/asm/unistd.h   | 1 +
 arch/metag/include/uapi/asm/unistd.h | 1 +
 arch/microblaze/include/asm/unistd.h | 1 +
 arch/mips/include/asm/unistd.h   | 1 +
 arch/mn10300/include/asm/unistd.h| 1 +
 arch/nios2/include/uapi/asm/unistd.h | 1 +
 arch/openrisc/include/uapi/asm/unistd.h  | 1 +
 arch/parisc/include/asm/unistd.h | 1 +
 arch/powerpc/include/asm/unistd.h| 1 +
 arch/s390/include/asm/unistd.h   | 1 +
 arch/score/include/uapi/asm/unistd.h | 1 +
 arch/sh/include/asm/unistd.h | 1 +
 arch/sparc/include/asm/unistd.h  | 1 +
 arch/tile/include/uapi/asm/unistd.h  | 1 +
 arch/unicore32/include/uapi/asm/unistd.h | 1 +
 arch/x86/include/asm/unistd.h| 2 ++
 arch/xtensa/include/asm/unistd.h | 1 +
 fs/stat.c| 4 
 include/asm-generic/unistd.h | 2 ++
 include/uapi/asm-generic/stat.h  | 7 +++
 include/uapi/asm-generic/unistd.h| 6 ++
 scripts/checksyscalls.sh | 9 +
 34 files changed, 59 insertions(+)

diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h
index a56e608db2f9..5ad9d35b1bfb 100644
--- a/arch/alpha/include/asm/unistd.h
+++ b/arch/alpha/include/asm/unistd.h
@@ -7,6 +7,7 @@
 
 #define __ARCH_WANT_OLD_READDIR
 #define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SYSCALL_UNXSTAT
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_FADVISE64
 #define __ARCH_WANT_SYS_GETPGRP
diff --git a/arch/arc/include/uapi/asm/unistd.h 
b/arch/arc/include/uapi/asm/unistd.h
index ac6496527ad6..e68bdb8c6f58 100644
--- a/arch/arc/include/uapi/asm/unistd.h
+++ b/arch/arc/include/uapi/asm/unistd.h
@@ -17,6 +17,7 @@
 
 #define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_SET_GET_RLIMIT
+#define __ARCH_WANT_SYSCALL_UNXSTAT
 #define __ARCH_WANT_SYS_EXECVE
 #define __ARCH_WANT_SYS_CLONE
 #define __ARCH_WANT_SYS_VFORK
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 076090d2dbf5..68bc0b5e58a4 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -17,6 +17,7 @@
 #include 
 
 #define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SYSCALL_UNXSTAT
 #define __ARCH_WANT_SYS_GETHOSTNAME
 #define __ARCH_WANT_SYS_PAUSE
 #define __ARCH_WANT_SYS_GETPGRP
diff --git a/arch/arm64/include/uapi/asm/unistd.h 
b/arch/arm64/include/uapi/asm/unistd.h
index 48355a683e25..d066041b53e7 100644
--- a/arch/arm64/include/uapi/asm/unistd.h
+++ b/arch/arm64/include/uapi/asm/unistd.h
@@ -16,5 +16,6 @@
 
 #define

Re: [PATCH 03/20] asm-generic: Drop getrlimit and setrlimit syscalls from default list

2017-06-05 Thread James Hogan
Hi Yury,

On Sun, Jun 04, 2017 at 02:59:52PM +0300, Yury Norov wrote:
> The newer prlimit64 syscall provides all the functionality provided by
> the getrlimit and setrlimit syscalls and adds the pid of target process,
> so future architectures won't need to include getrlimit and setrlimit.
> 
> Therefore drop getrlimit and setrlimit syscalls from the generic syscall
> list unless __ARCH_WANT_SET_GET_RLIMIT is defined by the architecture's
> unistd.h prior to including asm-generic/unistd.h, and adjust all architectures
> using the generic syscall list to define it so that no in-tree architectures
> are affected.
> 
> Cc: Arnd Bergmann <a...@arndb.de>
> Cc: James Hogan <james.ho...@imgtec.com>
> Cc: linux-a...@vger.kernel.org
> Cc: linux-snps-arc@lists.infradead.org
> Cc: Catalin Marinas <catalin.mari...@arm.com>
> Cc: Will Deacon <will.dea...@arm.com>
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: Mark Salter <msal...@redhat.com>
> Cc: Aurelien Jacquiot <a-jacqu...@ti.com>
> Cc: linux-c6x-...@linux-c6x.org
> Cc: Richard Kuo <r...@codeaurora.org>
> Cc: linux-hexa...@vger.kernel.org
> Cc: linux-me...@vger.kernel.org
> Cc: Jonas Bonn <jo...@southpole.se>
> Cc: li...@lists.openrisc.net
> Cc: Chen Liqin <liqin.li...@gmail.com>
> Cc: Lennox Wu <lennox...@gmail.com>
> Cc: Chris Metcalf <cmetc...@mellanox.com>
> Cc: Guan Xuetao <g...@mprc.pku.edu.cn>
> Cc: Ley Foon Tan <lf...@altera.com>
> Cc: nios2-...@lists.rocketboards.org
> Cc: Yoshinori Sato <ys...@users.sourceforge.jp>
> Cc: uclinux-h8-de...@lists.sourceforge.jp
> Signed-off-by: Yury Norov <yno...@caviumnetworks.com>
> Acked-by: Arnd Bergmann <a...@arndb.de>
> Acked-by: Mark Salter <msal...@redhat.com> [c6x]
> Acked-by: James Hogan <james.ho...@imgtec.com> [metag]
> Acked-by: Ley Foon Tan <lf...@altera.com> [nios2]
> Acked-by: Stafford Horne <sho...@gmail.com> [openrisc]
> Acked-by: Will Deacon <will.dea...@arm.com> [arm64]
> Acked-by: Vineet Gupta <vgu...@synopsys.com> #arch/arc bits
> ---
>  arch/arc/include/uapi/asm/unistd.h   | 1 +
>  arch/arm64/include/uapi/asm/unistd.h | 1 +
>  arch/c6x/include/uapi/asm/unistd.h   | 1 +
>  arch/h8300/include/uapi/asm/unistd.h | 1 +
>  arch/hexagon/include/uapi/asm/unistd.h   | 1 +
>  arch/metag/include/uapi/asm/unistd.h | 1 +
>  arch/nios2/include/uapi/asm/unistd.h | 1 +
>  arch/openrisc/include/uapi/asm/unistd.h  | 1 +
>  arch/score/include/uapi/asm/unistd.h | 1 +
>  arch/tile/include/uapi/asm/unistd.h  | 1 +
>  arch/unicore32/include/uapi/asm/unistd.h | 1 +
>  include/uapi/asm-generic/unistd.h| 5 +

Don't forget to add __IGNORE_getrlimit and __IGNORE_setrlimit to
scripts/checksyscalls.sh, or you'll get warnings about missing syscalls.

Cheers
James


signature.asc
Description: Digital signature
___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH] asm-generic: Drop getrlimit and setrlimit syscalls from default list

2016-10-24 Thread James Hogan
On Sat, Oct 22, 2016 at 03:14:04PM +0300, Yury Norov wrote:
> The newer prlimit64 syscall provides all the functionality provided by
> the getrlimit and setrlimit syscalls and adds the pid of target process,
> so future architectures won't need to include getrlimit and setrlimit.
> 
> Therefore drop getrlimit and setrlimit syscalls from the generic syscall
> list unless __ARCH_WANT_SET_GET_RLIMIT is defined by the architecture's
> unistd.h prior to including asm-generic/unistd.h, and adjust all
> architectures using the generic syscall list to define it so that no
> in-tree architectures are affected.
> 
> Cc: Vineet Gupta <vgu...@synopsys.com>
> Cc: Catalin Marinas <catalin.mari...@arm.com>
> Cc: Will Deacon <will.dea...@arm.com>
> Cc: Mark Salter <msal...@redhat.com>
> Cc: Aurelien Jacquiot <a-jacqu...@ti.com>
> Cc: Yoshinori Sato <ys...@users.sourceforge.jp>
> Cc: Richard Kuo <r...@codeaurora.org>
> Cc: James Hogan <james.ho...@imgtec.com>
> Cc: Ley Foon Tan <lf...@altera.com>
> Cc: Jonas Bonn <jo...@southpole.se>
> Cc: Chen Liqin <liqin.li...@gmail.com>
> Cc: Lennox Wu <lennox...@gmail.com>
> Cc: Chris Metcalf <cmetc...@mellanox.com>
> Cc: Guan Xuetao <g...@mprc.pku.edu.cn>
> Cc: Arnd Bergmann <a...@arndb.de>
> Cc: Andrew Pinski <andrew.pin...@cavium.com>
> Cc: linux-snps-arc@lists.infradead.org
> Cc: linux-ker...@vger.kernel.org
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: linux-c6x-...@linux-c6x.org
> Cc: uclinux-h8-de...@lists.sourceforge.jp
> Cc: linux-hexa...@vger.kernel.org
> Cc: linux-me...@vger.kernel.org
> Cc: nios2-...@lists.rocketboards.org
> Cc: linux-a...@vger.kernel.or
> Signed-off-by: Yury Norov <yno...@caviumnetworks.com>
> 
> ---
>  arch/arc/include/uapi/asm/unistd.h   | 1 +
>  arch/arm64/include/uapi/asm/unistd.h | 1 +
>  arch/c6x/include/uapi/asm/unistd.h   | 1 +
>  arch/h8300/include/uapi/asm/unistd.h | 1 +
>  arch/hexagon/include/uapi/asm/unistd.h   | 1 +
>  arch/metag/include/uapi/asm/unistd.h | 1 +

Acked-by: James Hogan <james.ho...@imgtec.com> [metag]

Cheers
James

>  arch/nios2/include/uapi/asm/unistd.h | 1 +
>  arch/openrisc/include/uapi/asm/unistd.h  | 1 +
>  arch/score/include/uapi/asm/unistd.h | 1 +
>  arch/tile/include/uapi/asm/unistd.h  | 1 +
>  arch/unicore32/include/uapi/asm/unistd.h | 1 +
>  include/uapi/asm-generic/unistd.h| 5 +
>  12 files changed, 16 insertions(+)
> 
> diff --git a/arch/arc/include/uapi/asm/unistd.h 
> b/arch/arc/include/uapi/asm/unistd.h
> index 41fa2ec..928546d 100644
> --- a/arch/arc/include/uapi/asm/unistd.h
> +++ b/arch/arc/include/uapi/asm/unistd.h
> @@ -16,6 +16,7 @@
>  #define _UAPI_ASM_ARC_UNISTD_H
>  
>  #define __ARCH_WANT_RENAMEAT
> +#define __ARCH_WANT_SET_GET_RLIMIT
>  #define __ARCH_WANT_SYS_EXECVE
>  #define __ARCH_WANT_SYS_CLONE
>  #define __ARCH_WANT_SYS_VFORK
> diff --git a/arch/arm64/include/uapi/asm/unistd.h 
> b/arch/arm64/include/uapi/asm/unistd.h
> index 043d17a..48355a6 100644
> --- a/arch/arm64/include/uapi/asm/unistd.h
> +++ b/arch/arm64/include/uapi/asm/unistd.h
> @@ -15,5 +15,6 @@
>   */
>  
>  #define __ARCH_WANT_RENAMEAT
> +#define __ARCH_WANT_SET_GET_RLIMIT
>  
>  #include 
> diff --git a/arch/c6x/include/uapi/asm/unistd.h 
> b/arch/c6x/include/uapi/asm/unistd.h
> index 12d73d9..f676231 100644
> --- a/arch/c6x/include/uapi/asm/unistd.h
> +++ b/arch/c6x/include/uapi/asm/unistd.h
> @@ -15,6 +15,7 @@
>   */
>  
>  #define __ARCH_WANT_RENAMEAT
> +#define __ARCH_WANT_SET_GET_RLIMIT
>  #define __ARCH_WANT_SYS_CLONE
>  
>  /* Use the standard ABI for syscalls. */
> diff --git a/arch/h8300/include/uapi/asm/unistd.h 
> b/arch/h8300/include/uapi/asm/unistd.h
> index 7dd20ef..2f98394 100644
> --- a/arch/h8300/include/uapi/asm/unistd.h
> +++ b/arch/h8300/include/uapi/asm/unistd.h
> @@ -1,5 +1,6 @@
>  #define __ARCH_NOMMU
>  
>  #define __ARCH_WANT_RENAMEAT
> +#define __ARCH_WANT_SET_GET_RLIMIT
>  
>  #include 
> diff --git a/arch/hexagon/include/uapi/asm/unistd.h 
> b/arch/hexagon/include/uapi/asm/unistd.h
> index 2151760..52d585c 100644
> --- a/arch/hexagon/include/uapi/asm/unistd.h
> +++ b/arch/hexagon/include/uapi/asm/unistd.h
> @@ -28,6 +28,7 @@
>  
>  #define sys_mmap2 sys_mmap_pgoff
>  #define __ARCH_WANT_RENAMEAT
> +#define __ARCH_WANT_SET_GET_RLIMIT
>  #define __ARCH_WANT_SYS_EXECVE
>  #define __ARCH_WANT_SYS_CLONE
>  #define __ARCH_WANT_SYS_VFORK
> diff --git a/arch/metag/include/uapi/asm/unistd.h 
> b/arch/metag/include/uapi/asm/unistd.h
> index 459b6ec..16b5cb3 100644
> --- a/arch/metag/include/uapi/asm/unistd