Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'uapi-prep' of git://git.infradead.org/users/dhowells/linux-headers

Pull UAPI disintegration fixes from David Howells:
"There are three main parts:

(1) I found I needed some more fixups in the wake of testing Arm64
(some asm/unistd.h files had weird guards that caused problems -
mostly in arches for which I don't have a compiler) and some
__KERNEL__ splitting needed to take place in Arm64.

(2) I found that c6x was missing some __KERNEL__ guards in its
asm/signal.h. Mark Salter pointed me at a tree with a patch to
remove that file entirely and use the asm-generic variant instead.

(3) Lastly, m68k turned out to have a header installation problem due
to it lacking a kvm_para.h file.

The conditional installation bits for linux/kvm_para.h, linux/kvm.h
and linux/a.out.h weren't very well specified - and didn't work if
an arch didn't have the asm/ version of that file, but there *was*
an asm-generic/ version.

It seems the "ifneq $((wildcard ...),)" for each of those three
headers in include/kernel/Kbuild is invoked twice during header
installation, and the second time it matches on the just installed
asm-generic/kvm_para.h file and thus incorrectly installs
linux/kvm_para.h as well.

Most arches actually have an asm/kvm_para.h, so this wasn't
detectable in those."

* 'uapi-prep' of git://git.infradead.org/users/dhowells/linux-headers:
UAPI: Fix conditional header installation handling (notably kvm_para.h on m68k)
c6x: remove c6x signal.h
UAPI: Split compound conditionals containing __KERNEL__ in Arm64
UAPI: Fix the guards on various asm/unistd.h files
c6x: make dsk6455 the default config

+15 -66
+3 -1
arch/arm64/include/asm/hwcap.h
··· 35 35 #define COMPAT_HWCAP_IDIVT (1 << 18) 36 36 #define COMPAT_HWCAP_IDIV (COMPAT_HWCAP_IDIVA|COMPAT_HWCAP_IDIVT) 37 37 38 - #if defined(__KERNEL__) && !defined(__ASSEMBLY__) 38 + #ifdef __KERNEL__ 39 + #ifndef __ASSEMBLY__ 39 40 /* 40 41 * This yields a mask that user programs can use to figure out what 41 42 * instruction set this cpu supports. ··· 49 48 COMPAT_HWCAP_NEON|COMPAT_HWCAP_IDIV) 50 49 51 50 extern unsigned int elf_hwcap; 51 + #endif 52 52 #endif 53 53 54 54 #endif
+3 -1
arch/arm64/include/asm/stat.h
··· 18 18 19 19 #include <asm-generic/stat.h> 20 20 21 - #if defined(__KERNEL__) && defined(CONFIG_COMPAT) 21 + #ifdef __KERNEL__ 22 + #ifdef CONFIG_COMPAT 22 23 23 24 #include <asm/compat.h> 24 25 ··· 58 57 compat_u64 st_ino; 59 58 }; 60 59 60 + #endif 61 61 #endif 62 62 63 63 #endif
+3 -5
arch/arm64/include/asm/unistd.h
··· 13 13 * You should have received a copy of the GNU General Public License 14 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 15 */ 16 - #if !defined(__ASM_UNISTD_H) || defined(__SYSCALL) 17 - #define __ASM_UNISTD_H 18 16 19 17 #ifndef __SYSCALL_COMPAT 20 18 #include <asm-generic/unistd.h> 21 19 #endif 22 20 23 - #if defined(__KERNEL__) && defined(CONFIG_COMPAT) 21 + #ifdef __KERNEL__ 22 + #ifdef CONFIG_COMPAT 24 23 #include <asm/unistd32.h> 25 24 #endif 26 - 27 - #endif /* __ASM_UNISTD_H */ 25 + #endif
-4
arch/arm64/include/asm/unistd32.h
··· 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 18 */ 19 - #if !defined(__ASM_UNISTD32_H) || defined(__SYSCALL) 20 - #define __ASM_UNISTD32_H 21 19 22 20 #ifndef __SYSCALL 23 21 #define __SYSCALL(x, y) ··· 752 754 #define __ARCH_WANT_SYS_SIGPENDING 753 755 #define __ARCH_WANT_SYS_SIGPROCMASK 754 756 #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND 755 - 756 - #endif /* __ASM_UNISTD32_H */
+2
arch/c6x/Makefile
··· 6 6 # for more details. 7 7 # 8 8 9 + KBUILD_DEFCONFIG := dsk6455_defconfig 10 + 9 11 cflags-y += -mno-dsbt -msdata=none 10 12 11 13 cflags-$(CONFIG_C6X_BIG_KERNEL) += -mlong-calls
+1
arch/c6x/include/asm/Kbuild
··· 40 40 generic-y += shmbuf.h 41 41 generic-y += shmparam.h 42 42 generic-y += siginfo.h 43 + generic-y += signal.h 43 44 generic-y += socket.h 44 45 generic-y += sockios.h 45 46 generic-y += stat.h
-17
arch/c6x/include/asm/signal.h
··· 1 - #ifndef _ASM_C6X_SIGNAL_H 2 - #define _ASM_C6X_SIGNAL_H 3 - 4 - #include <asm-generic/signal.h> 5 - 6 - #ifndef __ASSEMBLY__ 7 - #include <linux/linkage.h> 8 - 9 - struct pt_regs; 10 - 11 - extern asmlinkage int do_rt_sigreturn(struct pt_regs *regs); 12 - extern asmlinkage void do_notify_resume(struct pt_regs *regs, 13 - u32 thread_info_flags, 14 - int syscall); 15 - #endif 16 - 17 - #endif /* _ASM_C6X_SIGNAL_H */
-4
arch/c6x/include/asm/unistd.h
··· 13 13 * NON INFRINGEMENT. See the GNU General Public License for 14 14 * more details. 15 15 */ 16 - #if !defined(_ASM_C6X_UNISTD_H) || defined(__SYSCALL) 17 - #define _ASM_C6X_UNISTD_H 18 16 19 17 /* Use the standard ABI for syscalls. */ 20 18 #include <asm-generic/unistd.h> ··· 20 22 /* C6X-specific syscalls. */ 21 23 #define __NR_cache_sync (__NR_arch_specific_syscall + 0) 22 24 __SYSCALL(__NR_cache_sync, sys_cache_sync) 23 - 24 - #endif /* _ASM_C6X_UNISTD_H */
-5
arch/hexagon/include/asm/unistd.h
··· 18 18 * 02110-1301, USA. 19 19 */ 20 20 21 - #if !defined(_ASM_HEXAGON_UNISTD_H) || defined(__SYSCALL) 22 - #define _ASM_HEXAGON_UNISTD_H 23 - 24 21 /* 25 22 * The kernel pulls this unistd.h in three different ways: 26 23 * 1. the "normal" way which gets all the __NR defines ··· 29 32 #define sys_mmap2 sys_mmap_pgoff 30 33 31 34 #include <asm-generic/unistd.h> 32 - 33 - #endif
-5
arch/openrisc/include/asm/unistd.h
··· 16 16 * (at your option) any later version. 17 17 */ 18 18 19 - #if !defined(__ASM_OPENRISC_UNISTD_H) || defined(__SYSCALL) 20 - #define __ASM_OPENRISC_UNISTD_H 21 - 22 19 #define __ARCH_HAVE_MMU 23 20 24 21 #define sys_mmap2 sys_mmap_pgoff ··· 24 27 25 28 #define __NR_or1k_atomic __NR_arch_specific_syscall 26 29 __SYSCALL(__NR_or1k_atomic, sys_or1k_atomic) 27 - 28 - #endif /* __ASM_OPENRISC_UNISTD_H */
-5
arch/score/include/asm/unistd.h
··· 1 - #if !defined(_ASM_SCORE_UNISTD_H) || defined(__SYSCALL) 2 - #define _ASM_SCORE_UNISTD_H 3 - 4 1 #define __ARCH_HAVE_MMU 5 2 6 3 #define __ARCH_WANT_SYSCALL_NO_AT ··· 6 9 #define __ARCH_WANT_SYSCALL_DEPRECATED 7 10 8 11 #include <asm-generic/unistd.h> 9 - 10 - #endif /* _ASM_SCORE_UNISTD_H */
-5
arch/tile/include/asm/unistd.h
··· 12 12 * more details. 13 13 */ 14 14 15 - #if !defined(_ASM_TILE_UNISTD_H) || defined(__SYSCALL) 16 - #define _ASM_TILE_UNISTD_H 17 - 18 15 #if !defined(__LP64__) || defined(__SYSCALL_COMPAT) 19 16 /* Use the flavor of this syscall that matches the 32-bit API better. */ 20 17 #define __ARCH_WANT_SYNC_FILE_RANGE2 ··· 40 43 #endif 41 44 #define __ARCH_WANT_SYS_NEWFSTATAT 42 45 #endif 43 - 44 - #endif /* _ASM_TILE_UNISTD_H */
-4
arch/unicore32/include/asm/unistd.h
··· 9 9 * it under the terms of the GNU General Public License version 2 as 10 10 * published by the Free Software Foundation. 11 11 */ 12 - #if !defined(__UNICORE_UNISTD_H__) || defined(__SYSCALL) 13 - #define __UNICORE_UNISTD_H__ 14 12 15 13 /* Use the standard ABI for syscalls. */ 16 14 #include <asm-generic/unistd.h> 17 - 18 - #endif /* __UNICORE_UNISTD_H__ */
-4
include/asm-generic/unistd.h
··· 1 - #if !defined(_ASM_GENERIC_UNISTD_H) || defined(__SYSCALL) 2 - #define _ASM_GENERIC_UNISTD_H 3 - 4 1 #include <asm/bitsperlong.h> 5 2 6 3 /* ··· 927 930 #endif 928 931 929 932 #endif /* __KERNEL__ */ 930 - #endif /* _ASM_GENERIC_UNISTD_H */
+3 -6
include/linux/Kbuild
··· 21 21 header-y += wimax/ 22 22 23 23 ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ 24 - $(srctree)/include/asm-$(SRCARCH)/a.out.h \ 25 - $(INSTALL_HDR_PATH)/include/asm-*/a.out.h),) 24 + $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),) 26 25 header-y += a.out.h 27 26 endif 28 27 ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ 29 - $(srctree)/include/asm-$(SRCARCH)/kvm.h \ 30 - $(INSTALL_HDR_PATH)/include/asm-*/kvm.h),) 28 + $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),) 31 29 header-y += kvm.h 32 30 endif 33 31 ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ 34 - $(srctree)/include/asm-$(SRCARCH)/kvm_para.h \ 35 - $(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),) 32 + $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),) 36 33 header-y += kvm_para.h 37 34 endif 38 35