diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-06 18:55:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-06 18:55:10 -0400 |
commit | ed5062ddaa71e9f8b2b3aacc264428ce6da93d9e (patch) | |
tree | 9db3b16d8dd412e2d688f3b5d1c252d2e6b4084d | |
parent | 125b79d74a63552be757bb49a425b965782e4952 (diff) | |
parent | f3dfd599af993385b40fc7a1c947afc12729bc4d (diff) |
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
-rw-r--r-- | arch/arm64/include/asm/hwcap.h | 4 | ||||
-rw-r--r-- | arch/arm64/include/asm/stat.h | 4 | ||||
-rw-r--r-- | arch/arm64/include/asm/unistd.h | 8 | ||||
-rw-r--r-- | arch/arm64/include/asm/unistd32.h | 4 | ||||
-rw-r--r-- | arch/c6x/Makefile | 2 | ||||
-rw-r--r-- | arch/c6x/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/c6x/include/asm/signal.h | 17 | ||||
-rw-r--r-- | arch/c6x/include/asm/unistd.h | 4 | ||||
-rw-r--r-- | arch/hexagon/include/asm/unistd.h | 5 | ||||
-rw-r--r-- | arch/openrisc/include/asm/unistd.h | 5 | ||||
-rw-r--r-- | arch/score/include/asm/unistd.h | 5 | ||||
-rw-r--r-- | arch/tile/include/asm/unistd.h | 5 | ||||
-rw-r--r-- | arch/unicore32/include/asm/unistd.h | 4 | ||||
-rw-r--r-- | include/asm-generic/unistd.h | 4 | ||||
-rw-r--r-- | include/linux/Kbuild | 9 |
15 files changed, 15 insertions, 66 deletions
diff --git a/arch/arm64/include/asm/hwcap.h b/arch/arm64/include/asm/hwcap.h index f8190ba45a3e..db05f9766112 100644 --- a/arch/arm64/include/asm/hwcap.h +++ b/arch/arm64/include/asm/hwcap.h | |||
@@ -35,7 +35,8 @@ | |||
35 | #define COMPAT_HWCAP_IDIVT (1 << 18) | 35 | #define COMPAT_HWCAP_IDIVT (1 << 18) |
36 | #define COMPAT_HWCAP_IDIV (COMPAT_HWCAP_IDIVA|COMPAT_HWCAP_IDIVT) | 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 | * This yields a mask that user programs can use to figure out what | 41 | * This yields a mask that user programs can use to figure out what |
41 | * instruction set this cpu supports. | 42 | * instruction set this cpu supports. |
@@ -49,5 +50,6 @@ | |||
49 | 50 | ||
50 | extern unsigned int elf_hwcap; | 51 | extern unsigned int elf_hwcap; |
51 | #endif | 52 | #endif |
53 | #endif | ||
52 | 54 | ||
53 | #endif | 55 | #endif |
diff --git a/arch/arm64/include/asm/stat.h b/arch/arm64/include/asm/stat.h index d87225cbead8..a9f580c28f7b 100644 --- a/arch/arm64/include/asm/stat.h +++ b/arch/arm64/include/asm/stat.h | |||
@@ -18,7 +18,8 @@ | |||
18 | 18 | ||
19 | #include <asm-generic/stat.h> | 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 | #include <asm/compat.h> | 24 | #include <asm/compat.h> |
24 | 25 | ||
@@ -58,5 +59,6 @@ struct stat64 { | |||
58 | }; | 59 | }; |
59 | 60 | ||
60 | #endif | 61 | #endif |
62 | #endif | ||
61 | 63 | ||
62 | #endif | 64 | #endif |
diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index fe18a683274f..8f03dee066ed 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h | |||
@@ -13,15 +13,13 @@ | |||
13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 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 | #ifndef __SYSCALL_COMPAT | 17 | #ifndef __SYSCALL_COMPAT |
20 | #include <asm-generic/unistd.h> | 18 | #include <asm-generic/unistd.h> |
21 | #endif | 19 | #endif |
22 | 20 | ||
23 | #if defined(__KERNEL__) && defined(CONFIG_COMPAT) | 21 | #ifdef __KERNEL__ |
22 | #ifdef CONFIG_COMPAT | ||
24 | #include <asm/unistd32.h> | 23 | #include <asm/unistd32.h> |
25 | #endif | 24 | #endif |
26 | 25 | #endif | |
27 | #endif /* __ASM_UNISTD_H */ | ||
diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index a50405f5ee42..3ba1f1a90629 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h | |||
@@ -16,8 +16,6 @@ | |||
16 | * You should have received a copy of the GNU General Public License | 16 | * You should have received a copy of the GNU General Public License |
17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 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 | #ifndef __SYSCALL | 20 | #ifndef __SYSCALL |
23 | #define __SYSCALL(x, y) | 21 | #define __SYSCALL(x, y) |
@@ -754,5 +752,3 @@ __SYSCALL(__NR_syncfs, sys_syncfs) | |||
754 | #define __ARCH_WANT_SYS_SIGPENDING | 752 | #define __ARCH_WANT_SYS_SIGPENDING |
755 | #define __ARCH_WANT_SYS_SIGPROCMASK | 753 | #define __ARCH_WANT_SYS_SIGPROCMASK |
756 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | 754 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND |
757 | |||
758 | #endif /* __ASM_UNISTD32_H */ | ||
diff --git a/arch/c6x/Makefile b/arch/c6x/Makefile index 1d08dd070277..a9eb9597e03c 100644 --- a/arch/c6x/Makefile +++ b/arch/c6x/Makefile | |||
@@ -6,6 +6,8 @@ | |||
6 | # for more details. | 6 | # for more details. |
7 | # | 7 | # |
8 | 8 | ||
9 | KBUILD_DEFCONFIG := dsk6455_defconfig | ||
10 | |||
9 | cflags-y += -mno-dsbt -msdata=none | 11 | cflags-y += -mno-dsbt -msdata=none |
10 | 12 | ||
11 | cflags-$(CONFIG_C6X_BIG_KERNEL) += -mlong-calls | 13 | cflags-$(CONFIG_C6X_BIG_KERNEL) += -mlong-calls |
diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index f08e89183cda..277f1a4ecb09 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild | |||
@@ -40,6 +40,7 @@ generic-y += sembuf.h | |||
40 | generic-y += shmbuf.h | 40 | generic-y += shmbuf.h |
41 | generic-y += shmparam.h | 41 | generic-y += shmparam.h |
42 | generic-y += siginfo.h | 42 | generic-y += siginfo.h |
43 | generic-y += signal.h | ||
43 | generic-y += socket.h | 44 | generic-y += socket.h |
44 | generic-y += sockios.h | 45 | generic-y += sockios.h |
45 | generic-y += stat.h | 46 | generic-y += stat.h |
diff --git a/arch/c6x/include/asm/signal.h b/arch/c6x/include/asm/signal.h deleted file mode 100644 index f1cd870596a3..000000000000 --- a/arch/c6x/include/asm/signal.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
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 */ | ||
diff --git a/arch/c6x/include/asm/unistd.h b/arch/c6x/include/asm/unistd.h index 6d54ea4262eb..ed2259043eec 100644 --- a/arch/c6x/include/asm/unistd.h +++ b/arch/c6x/include/asm/unistd.h | |||
@@ -13,8 +13,6 @@ | |||
13 | * NON INFRINGEMENT. See the GNU General Public License for | 13 | * NON INFRINGEMENT. See the GNU General Public License for |
14 | * more details. | 14 | * more details. |
15 | */ | 15 | */ |
16 | #if !defined(_ASM_C6X_UNISTD_H) || defined(__SYSCALL) | ||
17 | #define _ASM_C6X_UNISTD_H | ||
18 | 16 | ||
19 | /* Use the standard ABI for syscalls. */ | 17 | /* Use the standard ABI for syscalls. */ |
20 | #include <asm-generic/unistd.h> | 18 | #include <asm-generic/unistd.h> |
@@ -22,5 +20,3 @@ | |||
22 | /* C6X-specific syscalls. */ | 20 | /* C6X-specific syscalls. */ |
23 | #define __NR_cache_sync (__NR_arch_specific_syscall + 0) | 21 | #define __NR_cache_sync (__NR_arch_specific_syscall + 0) |
24 | __SYSCALL(__NR_cache_sync, sys_cache_sync) | 22 | __SYSCALL(__NR_cache_sync, sys_cache_sync) |
25 | |||
26 | #endif /* _ASM_C6X_UNISTD_H */ | ||
diff --git a/arch/hexagon/include/asm/unistd.h b/arch/hexagon/include/asm/unistd.h index 4d0ecde3665f..c0d5565030ae 100644 --- a/arch/hexagon/include/asm/unistd.h +++ b/arch/hexagon/include/asm/unistd.h | |||
@@ -18,9 +18,6 @@ | |||
18 | * 02110-1301, USA. | 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 | * The kernel pulls this unistd.h in three different ways: | 22 | * The kernel pulls this unistd.h in three different ways: |
26 | * 1. the "normal" way which gets all the __NR defines | 23 | * 1. the "normal" way which gets all the __NR defines |
@@ -32,5 +29,3 @@ | |||
32 | #define sys_mmap2 sys_mmap_pgoff | 29 | #define sys_mmap2 sys_mmap_pgoff |
33 | 30 | ||
34 | #include <asm-generic/unistd.h> | 31 | #include <asm-generic/unistd.h> |
35 | |||
36 | #endif | ||
diff --git a/arch/openrisc/include/asm/unistd.h b/arch/openrisc/include/asm/unistd.h index 89af3ab5c2e9..437bdbb61b14 100644 --- a/arch/openrisc/include/asm/unistd.h +++ b/arch/openrisc/include/asm/unistd.h | |||
@@ -16,9 +16,6 @@ | |||
16 | * (at your option) any later version. | 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 | #define __ARCH_HAVE_MMU | 19 | #define __ARCH_HAVE_MMU |
23 | 20 | ||
24 | #define sys_mmap2 sys_mmap_pgoff | 21 | #define sys_mmap2 sys_mmap_pgoff |
@@ -27,5 +24,3 @@ | |||
27 | 24 | ||
28 | #define __NR_or1k_atomic __NR_arch_specific_syscall | 25 | #define __NR_or1k_atomic __NR_arch_specific_syscall |
29 | __SYSCALL(__NR_or1k_atomic, sys_or1k_atomic) | 26 | __SYSCALL(__NR_or1k_atomic, sys_or1k_atomic) |
30 | |||
31 | #endif /* __ASM_OPENRISC_UNISTD_H */ | ||
diff --git a/arch/score/include/asm/unistd.h b/arch/score/include/asm/unistd.h index 4aa957364d4d..a862384e9c16 100644 --- a/arch/score/include/asm/unistd.h +++ b/arch/score/include/asm/unistd.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #if !defined(_ASM_SCORE_UNISTD_H) || defined(__SYSCALL) | ||
2 | #define _ASM_SCORE_UNISTD_H | ||
3 | |||
4 | #define __ARCH_HAVE_MMU | 1 | #define __ARCH_HAVE_MMU |
5 | 2 | ||
6 | #define __ARCH_WANT_SYSCALL_NO_AT | 3 | #define __ARCH_WANT_SYSCALL_NO_AT |
@@ -9,5 +6,3 @@ | |||
9 | #define __ARCH_WANT_SYSCALL_DEPRECATED | 6 | #define __ARCH_WANT_SYSCALL_DEPRECATED |
10 | 7 | ||
11 | #include <asm-generic/unistd.h> | 8 | #include <asm-generic/unistd.h> |
12 | |||
13 | #endif /* _ASM_SCORE_UNISTD_H */ | ||
diff --git a/arch/tile/include/asm/unistd.h b/arch/tile/include/asm/unistd.h index a017246ca0ce..0e1f3e66e492 100644 --- a/arch/tile/include/asm/unistd.h +++ b/arch/tile/include/asm/unistd.h | |||
@@ -12,9 +12,6 @@ | |||
12 | * more details. | 12 | * more details. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #if !defined(_ASM_TILE_UNISTD_H) || defined(__SYSCALL) | ||
16 | #define _ASM_TILE_UNISTD_H | ||
17 | |||
18 | #if !defined(__LP64__) || defined(__SYSCALL_COMPAT) | 15 | #if !defined(__LP64__) || defined(__SYSCALL_COMPAT) |
19 | /* Use the flavor of this syscall that matches the 32-bit API better. */ | 16 | /* Use the flavor of this syscall that matches the 32-bit API better. */ |
20 | #define __ARCH_WANT_SYNC_FILE_RANGE2 | 17 | #define __ARCH_WANT_SYNC_FILE_RANGE2 |
@@ -43,5 +40,3 @@ __SYSCALL(__NR_cmpxchg_badaddr, sys_cmpxchg_badaddr) | |||
43 | #endif | 40 | #endif |
44 | #define __ARCH_WANT_SYS_NEWFSTATAT | 41 | #define __ARCH_WANT_SYS_NEWFSTATAT |
45 | #endif | 42 | #endif |
46 | |||
47 | #endif /* _ASM_TILE_UNISTD_H */ | ||
diff --git a/arch/unicore32/include/asm/unistd.h b/arch/unicore32/include/asm/unistd.h index 9b2428019961..2abcf61c615d 100644 --- a/arch/unicore32/include/asm/unistd.h +++ b/arch/unicore32/include/asm/unistd.h | |||
@@ -9,10 +9,6 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 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 | /* Use the standard ABI for syscalls. */ | 13 | /* Use the standard ABI for syscalls. */ |
16 | #include <asm-generic/unistd.h> | 14 | #include <asm-generic/unistd.h> |
17 | |||
18 | #endif /* __UNICORE_UNISTD_H__ */ | ||
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index 3748ec92dcbc..cf22fae8cae1 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #if !defined(_ASM_GENERIC_UNISTD_H) || defined(__SYSCALL) | ||
2 | #define _ASM_GENERIC_UNISTD_H | ||
3 | |||
4 | #include <asm/bitsperlong.h> | 1 | #include <asm/bitsperlong.h> |
5 | 2 | ||
6 | /* | 3 | /* |
@@ -930,4 +927,3 @@ __SYSCALL(__NR_fork, sys_ni_syscall) | |||
930 | #endif | 927 | #endif |
931 | 928 | ||
932 | #endif /* __KERNEL__ */ | 929 | #endif /* __KERNEL__ */ |
933 | #endif /* _ASM_GENERIC_UNISTD_H */ | ||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index e149e8be9065..aab5c85879b2 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -21,18 +21,15 @@ header-y += usb/ | |||
21 | header-y += wimax/ | 21 | header-y += wimax/ |
22 | 22 | ||
23 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ | 23 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ |
24 | $(srctree)/include/asm-$(SRCARCH)/a.out.h \ | 24 | $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),) |
25 | $(INSTALL_HDR_PATH)/include/asm-*/a.out.h),) | ||
26 | header-y += a.out.h | 25 | header-y += a.out.h |
27 | endif | 26 | endif |
28 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ | 27 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ |
29 | $(srctree)/include/asm-$(SRCARCH)/kvm.h \ | 28 | $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),) |
30 | $(INSTALL_HDR_PATH)/include/asm-*/kvm.h),) | ||
31 | header-y += kvm.h | 29 | header-y += kvm.h |
32 | endif | 30 | endif |
33 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ | 31 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ |
34 | $(srctree)/include/asm-$(SRCARCH)/kvm_para.h \ | 32 | $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),) |
35 | $(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),) | ||
36 | header-y += kvm_para.h | 33 | header-y += kvm_para.h |
37 | endif | 34 | endif |
38 | 35 | ||