]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
asm-generic: Drop renameat syscall from default list
authorJames Hogan <james.hogan@imgtec.com>
Fri, 29 Apr 2016 21:29:26 +0000 (22:29 +0100)
committerArnd Bergmann <arnd@arndb.de>
Wed, 4 May 2016 22:42:21 +0000 (00:42 +0200)
The newer renameat2 syscall provides all the functionality provided by
the renameat syscall and adds flags, so future architectures won't need
to include renameat.

Therefore drop the renameat syscall from the generic syscall list unless
__ARCH_WANT_RENAMEAT 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.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Cc: linux-arch@vger.kernel.org
Cc: linux-snps-arc@lists.infradead.org
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: linux-c6x-dev@linux-c6x.org
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: linux-hexagon@vger.kernel.org
Cc: linux-metag@vger.kernel.org
Cc: Jonas Bonn <jonas@southpole.se>
Cc: linux@lists.openrisc.net
Cc: Chen Liqin <liqin.linux@gmail.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: nios2-dev@lists.rocketboards.org
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: uclinux-h8-devel@lists.sourceforge.jp
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 files changed:
arch/arc/include/uapi/asm/unistd.h
arch/arm64/include/uapi/asm/unistd.h
arch/c6x/include/uapi/asm/unistd.h
arch/h8300/include/uapi/asm/unistd.h
arch/hexagon/include/uapi/asm/unistd.h
arch/metag/include/uapi/asm/unistd.h
arch/nios2/include/uapi/asm/unistd.h
arch/openrisc/include/uapi/asm/unistd.h
arch/score/include/uapi/asm/unistd.h
arch/tile/include/uapi/asm/unistd.h
arch/unicore32/include/uapi/asm/unistd.h
include/uapi/asm-generic/unistd.h

index 39e58d1cdf90b7d8f84d108d8024d8974c3b800c..41fa2ec9e02c7721717e5c513bc9703ebed5bed4 100644 (file)
@@ -15,6 +15,7 @@
 #if !defined(_UAPI_ASM_ARC_UNISTD_H) || defined(__SYSCALL)
 #define _UAPI_ASM_ARC_UNISTD_H
 
+#define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_SYS_EXECVE
 #define __ARCH_WANT_SYS_CLONE
 #define __ARCH_WANT_SYS_VFORK
index 1caadc24e3fe99c1ed3169cfbb238ab279ad0ff4..043d17a21342e8168ca2e71933b72316cfd6eb5f 100644 (file)
@@ -13,4 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+
+#define __ARCH_WANT_RENAMEAT
+
 #include <asm-generic/unistd.h>
index e7d09a614d1028b4e0673f73f05d3fa0388e23f5..12d73d9d81f55ceba344eb91ca95130a308a35f9 100644 (file)
@@ -14,6 +14,7 @@
  *   more details.
  */
 
+#define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_SYS_CLONE
 
 /* Use the standard ABI for syscalls. */
index 7a2eb698def355b6c418782ae47e3653289394a8..7dd20ef7625adeeba03fba80cde6aaa70d91e3c2 100644 (file)
@@ -1,3 +1,5 @@
 #define __ARCH_NOMMU
 
+#define __ARCH_WANT_RENAMEAT
+
 #include <asm-generic/unistd.h>
index ffee405d68034a004168e0763e26fd146273d14f..21517600432b42e529ea9a1bc2fb68771e97b16a 100644 (file)
@@ -27,6 +27,7 @@
  */
 
 #define sys_mmap2 sys_mmap_pgoff
+#define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_SYS_EXECVE
 #define __ARCH_WANT_SYS_CLONE
 #define __ARCH_WANT_SYS_VFORK
index b80b8e899d22dfd202bbf8b9403a48b342d3462e..459b6ec1584862e20212a34c56b7ed7ce57082d3 100644 (file)
@@ -7,6 +7,8 @@
  * (at your option) any later version.
  */
 
+#define __ARCH_WANT_RENAMEAT
+
 /* Use the standard ABI for syscalls. */
 #include <asm-generic/unistd.h>
 
index c4bf7951046153b3a39f5c11a21dadfe3de0f74a..51a32c71ce2bd0a5950701f402a1b963d54169df 100644 (file)
@@ -17,6 +17,8 @@
 
  #define sys_mmap2 sys_mmap_pgoff
 
+#define __ARCH_WANT_RENAMEAT
+
 /* Use the standard ABI for syscalls */
 #include <asm-generic/unistd.h>
 
index ce40b71df0069d8516a94141556cb37ab32819ee..471905bd77452b06ad8bca2143038ef31da41f81 100644 (file)
@@ -20,6 +20,7 @@
 
 #define sys_mmap2 sys_mmap_pgoff
 
+#define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_SYS_FORK
 #define __ARCH_WANT_SYS_CLONE
 
index 9cb4260a5f3e3ea232fd1a328bac9f7e5ed854b3..d4008c339e8936da10255a677aa6bb1986760786 100644 (file)
@@ -1,5 +1,6 @@
 #define __ARCH_HAVE_MMU
 
+#define __ARCH_WANT_RENAMEAT
 #define __ARCH_WANT_SYSCALL_NO_AT
 #define __ARCH_WANT_SYSCALL_NO_FLAGS
 #define __ARCH_WANT_SYSCALL_OFF_T
index 3866397aaf5ae7c2a939911ed84a5130c50c9962..24e9187e85a86cd17911e64f76922e1034013919 100644 (file)
@@ -12,6 +12,7 @@
  *   more details.
  */
 
+#define __ARCH_WANT_RENAMEAT
 #if !defined(__LP64__) || defined(__SYSCALL_COMPAT)
 /* Use the flavor of this syscall that matches the 32-bit API better. */
 #define __ARCH_WANT_SYNC_FILE_RANGE2
index d4cc4559d8485f23838417c6f51208b4925082d3..1f63c476528e6ce58b590b16346a3d9961968f87 100644 (file)
@@ -10,6 +10,8 @@
  * published by the Free Software Foundation.
  */
 
+#define __ARCH_WANT_RENAMEAT
+
 /* Use the standard ABI for syscalls. */
 #include <asm-generic/unistd.h>
 #define __ARCH_WANT_SYS_CLONE
index c51afb71bfabc658b16be2773ad5a0e78ca1d09b..a26415b5151ce1866e805129de53331c76724813 100644 (file)
@@ -127,8 +127,11 @@ __SYSCALL(__NR_unlinkat, sys_unlinkat)
 __SYSCALL(__NR_symlinkat, sys_symlinkat)
 #define __NR_linkat 37
 __SYSCALL(__NR_linkat, sys_linkat)
+#ifdef __ARCH_WANT_RENAMEAT
+/* renameat is superseded with flags by renameat2 */
 #define __NR_renameat 38
 __SYSCALL(__NR_renameat, sys_renameat)
+#endif /* __ARCH_WANT_RENAMEAT */
 
 /* fs/namespace.c */
 #define __NR_umount2 39