• D
    syscalls/core: Introduce CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y · 1bd21c6c
    Dominik Brodowski 提交于
    It may be useful for an architecture to override the definitions of the
    SYSCALL_DEFINE0() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h>,
    in particular to use a different calling convention for syscalls.
    
    This patch provides a mechanism to do so: It introduces
    CONFIG_ARCH_HAS_SYSCALL_WRAPPER. If it is enabled, <asm/sycall_wrapper.h>
    is included in <linux/syscalls.h> and may be used to define the macros
    mentioned above. Moreover, as the syscall calling convention may be
    different if CONFIG_ARCH_HAS_SYSCALL_WRAPPER is set, the syscall function
    prototypes in <linux/syscalls.h> are #ifndef'd out in that case.
    Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
    Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/20180405095307.3730-3-linux@dominikbrodowski.netSigned-off-by: NIngo Molnar <mingo@kernel.org>
    1bd21c6c
syscalls.h 48.3 KB