diff options
Diffstat (limited to 'arch/x86')
29 files changed, 70 insertions, 54 deletions
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index f7535bedc33f..ce03476d8c8f 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -37,7 +37,7 @@ setup-y += video-bios.o | |||
37 | targets += $(setup-y) | 37 | targets += $(setup-y) |
38 | hostprogs-y := mkcpustr tools/build | 38 | hostprogs-y := mkcpustr tools/build |
39 | 39 | ||
40 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include $(LINUXINCLUDE) \ | 40 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include $(USERINCLUDE) \ |
41 | -D__EXPORTED_HEADERS__ | 41 | -D__EXPORTED_HEADERS__ |
42 | 42 | ||
43 | $(obj)/cpu.o: $(obj)/cpustr.h | 43 | $(obj)/cpu.o: $(obj)/cpustr.h |
@@ -52,7 +52,7 @@ $(obj)/cpustr.h: $(obj)/mkcpustr FORCE | |||
52 | 52 | ||
53 | # How to compile the 16-bit code. Note we always compile for -march=i386, | 53 | # How to compile the 16-bit code. Note we always compile for -march=i386, |
54 | # that way we can complain to the user if the CPU is insufficient. | 54 | # that way we can complain to the user if the CPU is insufficient. |
55 | KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ | 55 | KBUILD_CFLAGS := $(USERINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ |
56 | -DDISABLE_BRANCH_PROFILING \ | 56 | -DDISABLE_BRANCH_PROFILING \ |
57 | -Wall -Wstrict-prototypes \ | 57 | -Wall -Wstrict-prototypes \ |
58 | -march=i386 -mregparm=3 \ | 58 | -march=i386 -mregparm=3 \ |
diff --git a/arch/x86/boot/mkcpustr.c b/arch/x86/boot/mkcpustr.c index 919257f526f2..4579eff0ef4d 100644 --- a/arch/x86/boot/mkcpustr.c +++ b/arch/x86/boot/mkcpustr.c | |||
@@ -15,6 +15,8 @@ | |||
15 | 15 | ||
16 | #include <stdio.h> | 16 | #include <stdio.h> |
17 | 17 | ||
18 | #include "../include/asm/required-features.h" | ||
19 | #include "../include/asm/cpufeature.h" | ||
18 | #include "../kernel/cpu/capflags.c" | 20 | #include "../kernel/cpu/capflags.c" |
19 | 21 | ||
20 | int main(void) | 22 | int main(void) |
diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild index f9c0d3ba9e84..1595d6813432 100644 --- a/arch/x86/include/asm/Kbuild +++ b/arch/x86/include/asm/Kbuild | |||
@@ -22,7 +22,3 @@ header-y += sigcontext32.h | |||
22 | header-y += ucontext.h | 22 | header-y += ucontext.h |
23 | header-y += vm86.h | 23 | header-y += vm86.h |
24 | header-y += vsyscall.h | 24 | header-y += vsyscall.h |
25 | |||
26 | genhdr-y += unistd_32.h | ||
27 | genhdr-y += unistd_64.h | ||
28 | genhdr-y += unistd_x32.h | ||
diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h index 58cb6d4085f7..250b8774c158 100644 --- a/arch/x86/include/asm/atomic.h +++ b/arch/x86/include/asm/atomic.h | |||
@@ -309,9 +309,9 @@ static inline void atomic_or_long(unsigned long *v1, unsigned long v2) | |||
309 | #define smp_mb__after_atomic_inc() barrier() | 309 | #define smp_mb__after_atomic_inc() barrier() |
310 | 310 | ||
311 | #ifdef CONFIG_X86_32 | 311 | #ifdef CONFIG_X86_32 |
312 | # include "atomic64_32.h" | 312 | # include <asm/atomic64_32.h> |
313 | #else | 313 | #else |
314 | # include "atomic64_64.h" | 314 | # include <asm/atomic64_64.h> |
315 | #endif | 315 | #endif |
316 | 316 | ||
317 | #endif /* _ASM_X86_ATOMIC_H */ | 317 | #endif /* _ASM_X86_ATOMIC_H */ |
diff --git a/arch/x86/include/asm/calling.h b/arch/x86/include/asm/calling.h index 7f8422a28a46..0fa675033912 100644 --- a/arch/x86/include/asm/calling.h +++ b/arch/x86/include/asm/calling.h | |||
@@ -46,7 +46,7 @@ For 32-bit we have the following conventions - kernel is built with | |||
46 | 46 | ||
47 | */ | 47 | */ |
48 | 48 | ||
49 | #include "dwarf2.h" | 49 | #include <asm/dwarf2.h> |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * 64-bit system call stack frame layout defines and helpers, | 52 | * 64-bit system call stack frame layout defines and helpers, |
diff --git a/arch/x86/include/asm/checksum.h b/arch/x86/include/asm/checksum.h index 848850fd7d62..5f5bb0f97361 100644 --- a/arch/x86/include/asm/checksum.h +++ b/arch/x86/include/asm/checksum.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifdef CONFIG_X86_32 | 1 | #ifdef CONFIG_X86_32 |
2 | # include "checksum_32.h" | 2 | # include <asm/checksum_32.h> |
3 | #else | 3 | #else |
4 | # include "checksum_64.h" | 4 | # include <asm/checksum_64.h> |
5 | #endif | 5 | #endif |
diff --git a/arch/x86/include/asm/cmpxchg.h b/arch/x86/include/asm/cmpxchg.h index 99480e55973d..8d871eaddb66 100644 --- a/arch/x86/include/asm/cmpxchg.h +++ b/arch/x86/include/asm/cmpxchg.h | |||
@@ -138,9 +138,9 @@ extern void __add_wrong_size(void) | |||
138 | __raw_cmpxchg((ptr), (old), (new), (size), "") | 138 | __raw_cmpxchg((ptr), (old), (new), (size), "") |
139 | 139 | ||
140 | #ifdef CONFIG_X86_32 | 140 | #ifdef CONFIG_X86_32 |
141 | # include "cmpxchg_32.h" | 141 | # include <asm/cmpxchg_32.h> |
142 | #else | 142 | #else |
143 | # include "cmpxchg_64.h" | 143 | # include <asm/cmpxchg_64.h> |
144 | #endif | 144 | #endif |
145 | 145 | ||
146 | #ifdef __HAVE_ARCH_CMPXCHG | 146 | #ifdef __HAVE_ARCH_CMPXCHG |
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index 16cae425d1f8..8c297aa53eef 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
@@ -4,7 +4,9 @@ | |||
4 | #ifndef _ASM_X86_CPUFEATURE_H | 4 | #ifndef _ASM_X86_CPUFEATURE_H |
5 | #define _ASM_X86_CPUFEATURE_H | 5 | #define _ASM_X86_CPUFEATURE_H |
6 | 6 | ||
7 | #ifndef _ASM_X86_REQUIRED_FEATURES_H | ||
7 | #include <asm/required-features.h> | 8 | #include <asm/required-features.h> |
9 | #endif | ||
8 | 10 | ||
9 | #define NCAPINTS 10 /* N 32-bit words worth of info */ | 11 | #define NCAPINTS 10 /* N 32-bit words worth of info */ |
10 | 12 | ||
diff --git a/arch/x86/include/asm/mmzone.h b/arch/x86/include/asm/mmzone.h index 64217ea16a36..d497bc425cae 100644 --- a/arch/x86/include/asm/mmzone.h +++ b/arch/x86/include/asm/mmzone.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifdef CONFIG_X86_32 | 1 | #ifdef CONFIG_X86_32 |
2 | # include "mmzone_32.h" | 2 | # include <asm/mmzone_32.h> |
3 | #else | 3 | #else |
4 | # include "mmzone_64.h" | 4 | # include <asm/mmzone_64.h> |
5 | #endif | 5 | #endif |
diff --git a/arch/x86/include/asm/mutex.h b/arch/x86/include/asm/mutex.h index a731b9c573a6..7d3a48275394 100644 --- a/arch/x86/include/asm/mutex.h +++ b/arch/x86/include/asm/mutex.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifdef CONFIG_X86_32 | 1 | #ifdef CONFIG_X86_32 |
2 | # include "mutex_32.h" | 2 | # include <asm/mutex_32.h> |
3 | #else | 3 | #else |
4 | # include "mutex_64.h" | 4 | # include <asm/mutex_64.h> |
5 | #endif | 5 | #endif |
diff --git a/arch/x86/include/asm/numa.h b/arch/x86/include/asm/numa.h index bfacd2ccf651..49119fcea2dc 100644 --- a/arch/x86/include/asm/numa.h +++ b/arch/x86/include/asm/numa.h | |||
@@ -53,9 +53,9 @@ static inline int numa_cpu_node(int cpu) | |||
53 | #endif /* CONFIG_NUMA */ | 53 | #endif /* CONFIG_NUMA */ |
54 | 54 | ||
55 | #ifdef CONFIG_X86_32 | 55 | #ifdef CONFIG_X86_32 |
56 | # include "numa_32.h" | 56 | # include <asm/numa_32.h> |
57 | #else | 57 | #else |
58 | # include "numa_64.h" | 58 | # include <asm/numa_64.h> |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | #ifdef CONFIG_NUMA | 61 | #ifdef CONFIG_NUMA |
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index df75d07571ce..6e41b9343928 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h | |||
@@ -141,7 +141,7 @@ void default_restore_msi_irqs(struct pci_dev *dev, int irq); | |||
141 | #endif /* __KERNEL__ */ | 141 | #endif /* __KERNEL__ */ |
142 | 142 | ||
143 | #ifdef CONFIG_X86_64 | 143 | #ifdef CONFIG_X86_64 |
144 | #include "pci_64.h" | 144 | #include <asm/pci_64.h> |
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | /* implement the pci_ DMA API in terms of the generic device dma_ one */ | 147 | /* implement the pci_ DMA API in terms of the generic device dma_ one */ |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 49afb3f41eb6..fc9948465293 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -384,9 +384,9 @@ pte_t *populate_extra_pte(unsigned long vaddr); | |||
384 | #endif /* __ASSEMBLY__ */ | 384 | #endif /* __ASSEMBLY__ */ |
385 | 385 | ||
386 | #ifdef CONFIG_X86_32 | 386 | #ifdef CONFIG_X86_32 |
387 | # include "pgtable_32.h" | 387 | # include <asm/pgtable_32.h> |
388 | #else | 388 | #else |
389 | # include "pgtable_64.h" | 389 | # include <asm/pgtable_64.h> |
390 | #endif | 390 | #endif |
391 | 391 | ||
392 | #ifndef __ASSEMBLY__ | 392 | #ifndef __ASSEMBLY__ |
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h index db8fec6d2953..ec8a1fc9505d 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h | |||
@@ -174,9 +174,9 @@ | |||
174 | #endif | 174 | #endif |
175 | 175 | ||
176 | #ifdef CONFIG_X86_32 | 176 | #ifdef CONFIG_X86_32 |
177 | # include "pgtable_32_types.h" | 177 | # include <asm/pgtable_32_types.h> |
178 | #else | 178 | #else |
179 | # include "pgtable_64_types.h" | 179 | # include <asm/pgtable_64_types.h> |
180 | #endif | 180 | #endif |
181 | 181 | ||
182 | #ifndef __ASSEMBLY__ | 182 | #ifndef __ASSEMBLY__ |
diff --git a/arch/x86/include/asm/posix_types.h b/arch/x86/include/asm/posix_types.h index 7ef7c3020e5c..bad3665c25fc 100644 --- a/arch/x86/include/asm/posix_types.h +++ b/arch/x86/include/asm/posix_types.h | |||
@@ -1,15 +1,15 @@ | |||
1 | #ifdef __KERNEL__ | 1 | #ifdef __KERNEL__ |
2 | # ifdef CONFIG_X86_32 | 2 | # ifdef CONFIG_X86_32 |
3 | # include "posix_types_32.h" | 3 | # include <asm/posix_types_32.h> |
4 | # else | 4 | # else |
5 | # include "posix_types_64.h" | 5 | # include <asm/posix_types_64.h> |
6 | # endif | 6 | # endif |
7 | #else | 7 | #else |
8 | # ifdef __i386__ | 8 | # ifdef __i386__ |
9 | # include "posix_types_32.h" | 9 | # include <asm/posix_types_32.h> |
10 | # elif defined(__ILP32__) | 10 | # elif defined(__ILP32__) |
11 | # include "posix_types_x32.h" | 11 | # include <asm/posix_types_x32.h> |
12 | # else | 12 | # else |
13 | # include "posix_types_64.h" | 13 | # include <asm/posix_types_64.h> |
14 | # endif | 14 | # endif |
15 | #endif | 15 | #endif |
diff --git a/arch/x86/include/asm/seccomp.h b/arch/x86/include/asm/seccomp.h index c62e58a5a90d..0f3d7f099224 100644 --- a/arch/x86/include/asm/seccomp.h +++ b/arch/x86/include/asm/seccomp.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifdef CONFIG_X86_32 | 1 | #ifdef CONFIG_X86_32 |
2 | # include "seccomp_32.h" | 2 | # include <asm/seccomp_32.h> |
3 | #else | 3 | #else |
4 | # include "seccomp_64.h" | 4 | # include <asm/seccomp_64.h> |
5 | #endif | 5 | #endif |
diff --git a/arch/x86/include/asm/string.h b/arch/x86/include/asm/string.h index 6dfd6d9373a0..09224d7a5862 100644 --- a/arch/x86/include/asm/string.h +++ b/arch/x86/include/asm/string.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifdef CONFIG_X86_32 | 1 | #ifdef CONFIG_X86_32 |
2 | # include "string_32.h" | 2 | # include <asm/string_32.h> |
3 | #else | 3 | #else |
4 | # include "string_64.h" | 4 | # include <asm/string_64.h> |
5 | #endif | 5 | #endif |
diff --git a/arch/x86/include/asm/suspend.h b/arch/x86/include/asm/suspend.h index 9bd521fe4570..2fab6c2c3575 100644 --- a/arch/x86/include/asm/suspend.h +++ b/arch/x86/include/asm/suspend.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifdef CONFIG_X86_32 | 1 | #ifdef CONFIG_X86_32 |
2 | # include "suspend_32.h" | 2 | # include <asm/suspend_32.h> |
3 | #else | 3 | #else |
4 | # include "suspend_64.h" | 4 | # include <asm/suspend_64.h> |
5 | #endif | 5 | #endif |
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h index a91acfbb1a98..7ccf8d131535 100644 --- a/arch/x86/include/asm/uaccess.h +++ b/arch/x86/include/asm/uaccess.h | |||
@@ -589,9 +589,9 @@ extern struct movsl_mask { | |||
589 | #define ARCH_HAS_NOCACHE_UACCESS 1 | 589 | #define ARCH_HAS_NOCACHE_UACCESS 1 |
590 | 590 | ||
591 | #ifdef CONFIG_X86_32 | 591 | #ifdef CONFIG_X86_32 |
592 | # include "uaccess_32.h" | 592 | # include <asm/uaccess_32.h> |
593 | #else | 593 | #else |
594 | # include "uaccess_64.h" | 594 | # include <asm/uaccess_64.h> |
595 | #endif | 595 | #endif |
596 | 596 | ||
597 | #endif /* _ASM_X86_UACCESS_H */ | 597 | #endif /* _ASM_X86_UACCESS_H */ |
diff --git a/arch/x86/include/asm/user.h b/arch/x86/include/asm/user.h index 24532c7da3d6..ccab4af1646d 100644 --- a/arch/x86/include/asm/user.h +++ b/arch/x86/include/asm/user.h | |||
@@ -2,9 +2,9 @@ | |||
2 | #define _ASM_X86_USER_H | 2 | #define _ASM_X86_USER_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_32 | 4 | #ifdef CONFIG_X86_32 |
5 | # include "user_32.h" | 5 | # include <asm/user_32.h> |
6 | #else | 6 | #else |
7 | # include "user_64.h" | 7 | # include <asm/user_64.h> |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #include <asm/types.h> | 10 | #include <asm/types.h> |
diff --git a/arch/x86/include/asm/xen/interface.h b/arch/x86/include/asm/xen/interface.h index 555f94d3637b..1707cfa928fb 100644 --- a/arch/x86/include/asm/xen/interface.h +++ b/arch/x86/include/asm/xen/interface.h | |||
@@ -121,9 +121,9 @@ struct arch_shared_info { | |||
121 | #endif /* !__ASSEMBLY__ */ | 121 | #endif /* !__ASSEMBLY__ */ |
122 | 122 | ||
123 | #ifdef CONFIG_X86_32 | 123 | #ifdef CONFIG_X86_32 |
124 | #include "interface_32.h" | 124 | #include <asm/xen/interface_32.h> |
125 | #else | 125 | #else |
126 | #include "interface_64.h" | 126 | #include <asm/xen/interface_64.h> |
127 | #endif | 127 | #endif |
128 | 128 | ||
129 | #include <asm/pvclock-abi.h> | 129 | #include <asm/pvclock-abi.h> |
diff --git a/arch/x86/include/asm/xor.h b/arch/x86/include/asm/xor.h index 7fcf6f3dbcc3..f8fde90bc45e 100644 --- a/arch/x86/include/asm/xor.h +++ b/arch/x86/include/asm/xor.h | |||
@@ -3,8 +3,8 @@ | |||
3 | # include <asm-generic/xor.h> | 3 | # include <asm-generic/xor.h> |
4 | #else | 4 | #else |
5 | #ifdef CONFIG_X86_32 | 5 | #ifdef CONFIG_X86_32 |
6 | # include "xor_32.h" | 6 | # include <asm/xor_32.h> |
7 | #else | 7 | #else |
8 | # include "xor_64.h" | 8 | # include <asm/xor_64.h> |
9 | #endif | 9 | #endif |
10 | #endif | 10 | #endif |
diff --git a/arch/x86/include/asm/xor_32.h b/arch/x86/include/asm/xor_32.h index aabd5850bdb9..f79cb7ec0e06 100644 --- a/arch/x86/include/asm/xor_32.h +++ b/arch/x86/include/asm/xor_32.h | |||
@@ -822,7 +822,7 @@ static struct xor_block_template xor_block_pIII_sse = { | |||
822 | }; | 822 | }; |
823 | 823 | ||
824 | /* Also try the AVX routines */ | 824 | /* Also try the AVX routines */ |
825 | #include "xor_avx.h" | 825 | #include <asm/xor_avx.h> |
826 | 826 | ||
827 | /* Also try the generic routines. */ | 827 | /* Also try the generic routines. */ |
828 | #include <asm-generic/xor.h> | 828 | #include <asm-generic/xor.h> |
diff --git a/arch/x86/include/asm/xor_64.h b/arch/x86/include/asm/xor_64.h index 5fc06d0b7eb5..87ac522c4af5 100644 --- a/arch/x86/include/asm/xor_64.h +++ b/arch/x86/include/asm/xor_64.h | |||
@@ -306,7 +306,7 @@ static struct xor_block_template xor_block_sse = { | |||
306 | 306 | ||
307 | 307 | ||
308 | /* Also try the AVX routines */ | 308 | /* Also try the AVX routines */ |
309 | #include "xor_avx.h" | 309 | #include <asm/xor_avx.h> |
310 | 310 | ||
311 | #undef XOR_TRY_TEMPLATES | 311 | #undef XOR_TRY_TEMPLATES |
312 | #define XOR_TRY_TEMPLATES \ | 312 | #define XOR_TRY_TEMPLATES \ |
diff --git a/arch/x86/include/uapi/asm/Kbuild b/arch/x86/include/uapi/asm/Kbuild new file mode 100644 index 000000000000..83b6e9a0dce4 --- /dev/null +++ b/arch/x86/include/uapi/asm/Kbuild | |||
@@ -0,0 +1,6 @@ | |||
1 | # UAPI Header export list | ||
2 | include include/uapi/asm-generic/Kbuild.asm | ||
3 | |||
4 | genhdr-y += unistd_32.h | ||
5 | genhdr-y += unistd_64.h | ||
6 | genhdr-y += unistd_x32.h | ||
diff --git a/arch/x86/kernel/cpu/mkcapflags.pl b/arch/x86/kernel/cpu/mkcapflags.pl index c7b3fe2d72e0..091972ef49de 100644 --- a/arch/x86/kernel/cpu/mkcapflags.pl +++ b/arch/x86/kernel/cpu/mkcapflags.pl | |||
@@ -8,7 +8,10 @@ | |||
8 | open(IN, "< $in\0") or die "$0: cannot open: $in: $!\n"; | 8 | open(IN, "< $in\0") or die "$0: cannot open: $in: $!\n"; |
9 | open(OUT, "> $out\0") or die "$0: cannot create: $out: $!\n"; | 9 | open(OUT, "> $out\0") or die "$0: cannot create: $out: $!\n"; |
10 | 10 | ||
11 | print OUT "#include <asm/cpufeature.h>\n\n"; | 11 | print OUT "#ifndef _ASM_X86_CPUFEATURE_H\n"; |
12 | print OUT "#include <asm/cpufeature.h>\n"; | ||
13 | print OUT "#endif\n"; | ||
14 | print OUT "\n"; | ||
12 | print OUT "const char * const x86_cap_flags[NCAPINTS*32] = {\n"; | 15 | print OUT "const char * const x86_cap_flags[NCAPINTS*32] = {\n"; |
13 | 16 | ||
14 | %features = (); | 17 | %features = (); |
diff --git a/arch/x86/lib/insn.c b/arch/x86/lib/insn.c index b1e6c4b2e8eb..54fcffed28ed 100644 --- a/arch/x86/lib/insn.c +++ b/arch/x86/lib/insn.c | |||
@@ -18,7 +18,11 @@ | |||
18 | * Copyright (C) IBM Corporation, 2002, 2004, 2009 | 18 | * Copyright (C) IBM Corporation, 2002, 2004, 2009 |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifdef __KERNEL__ | ||
21 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #else | ||
24 | #include <string.h> | ||
25 | #endif | ||
22 | #include <asm/inat.h> | 26 | #include <asm/inat.h> |
23 | #include <asm/insn.h> | 27 | #include <asm/insn.h> |
24 | 28 | ||
diff --git a/arch/x86/syscalls/Makefile b/arch/x86/syscalls/Makefile index 3236aebc828d..f325af26107c 100644 --- a/arch/x86/syscalls/Makefile +++ b/arch/x86/syscalls/Makefile | |||
@@ -1,7 +1,9 @@ | |||
1 | out := $(obj)/../include/generated/asm | 1 | out := $(obj)/../include/generated/asm |
2 | uapi := $(obj)/../include/generated/uapi/asm | ||
2 | 3 | ||
3 | # Create output directory if not already present | 4 | # Create output directory if not already present |
4 | _dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)') | 5 | _dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)') \ |
6 | $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') | ||
5 | 7 | ||
6 | syscall32 := $(srctree)/$(src)/syscall_32.tbl | 8 | syscall32 := $(srctree)/$(src)/syscall_32.tbl |
7 | syscall64 := $(srctree)/$(src)/syscall_64.tbl | 9 | syscall64 := $(srctree)/$(src)/syscall_64.tbl |
@@ -18,7 +20,7 @@ quiet_cmd_systbl = SYSTBL $@ | |||
18 | cmd_systbl = $(CONFIG_SHELL) '$(systbl)' $< $@ | 20 | cmd_systbl = $(CONFIG_SHELL) '$(systbl)' $< $@ |
19 | 21 | ||
20 | syshdr_abi_unistd_32 := i386 | 22 | syshdr_abi_unistd_32 := i386 |
21 | $(out)/unistd_32.h: $(syscall32) $(syshdr) | 23 | $(uapi)/unistd_32.h: $(syscall32) $(syshdr) |
22 | $(call if_changed,syshdr) | 24 | $(call if_changed,syshdr) |
23 | 25 | ||
24 | syshdr_abi_unistd_32_ia32 := i386 | 26 | syshdr_abi_unistd_32_ia32 := i386 |
@@ -28,11 +30,11 @@ $(out)/unistd_32_ia32.h: $(syscall32) $(syshdr) | |||
28 | 30 | ||
29 | syshdr_abi_unistd_x32 := common,x32 | 31 | syshdr_abi_unistd_x32 := common,x32 |
30 | syshdr_offset_unistd_x32 := __X32_SYSCALL_BIT | 32 | syshdr_offset_unistd_x32 := __X32_SYSCALL_BIT |
31 | $(out)/unistd_x32.h: $(syscall64) $(syshdr) | 33 | $(uapi)/unistd_x32.h: $(syscall64) $(syshdr) |
32 | $(call if_changed,syshdr) | 34 | $(call if_changed,syshdr) |
33 | 35 | ||
34 | syshdr_abi_unistd_64 := common,64 | 36 | syshdr_abi_unistd_64 := common,64 |
35 | $(out)/unistd_64.h: $(syscall64) $(syshdr) | 37 | $(uapi)/unistd_64.h: $(syscall64) $(syshdr) |
36 | $(call if_changed,syshdr) | 38 | $(call if_changed,syshdr) |
37 | 39 | ||
38 | syshdr_abi_unistd_64_x32 := x32 | 40 | syshdr_abi_unistd_64_x32 := x32 |
@@ -45,11 +47,12 @@ $(out)/syscalls_32.h: $(syscall32) $(systbl) | |||
45 | $(out)/syscalls_64.h: $(syscall64) $(systbl) | 47 | $(out)/syscalls_64.h: $(syscall64) $(systbl) |
46 | $(call if_changed,systbl) | 48 | $(call if_changed,systbl) |
47 | 49 | ||
48 | syshdr-y += unistd_32.h unistd_64.h unistd_x32.h | 50 | uapisyshdr-y += unistd_32.h unistd_64.h unistd_x32.h |
49 | syshdr-y += syscalls_32.h | 51 | syshdr-y += syscalls_32.h |
50 | syshdr-$(CONFIG_X86_64) += unistd_32_ia32.h unistd_64_x32.h | 52 | syshdr-$(CONFIG_X86_64) += unistd_32_ia32.h unistd_64_x32.h |
51 | syshdr-$(CONFIG_X86_64) += syscalls_64.h | 53 | syshdr-$(CONFIG_X86_64) += syscalls_64.h |
52 | 54 | ||
53 | targets += $(syshdr-y) | 55 | targets += $(uapisyshdr-y) $(syshdr-y) |
54 | 56 | ||
55 | all: $(addprefix $(out)/,$(targets)) | 57 | all: $(addprefix $(uapi)/,$(uapisyshdr-y)) |
58 | all: $(addprefix $(out)/,$(syshdr-y)) | ||
diff --git a/arch/x86/tools/Makefile b/arch/x86/tools/Makefile index 733057b435b0..bae601f900ef 100644 --- a/arch/x86/tools/Makefile +++ b/arch/x86/tools/Makefile | |||
@@ -28,7 +28,7 @@ posttest: $(obj)/test_get_len vmlinux $(obj)/insn_sanity | |||
28 | hostprogs-y += test_get_len insn_sanity | 28 | hostprogs-y += test_get_len insn_sanity |
29 | 29 | ||
30 | # -I needed for generated C source and C source which in the kernel tree. | 30 | # -I needed for generated C source and C source which in the kernel tree. |
31 | HOSTCFLAGS_test_get_len.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/ | 31 | HOSTCFLAGS_test_get_len.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/uapi/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/uapi/ |
32 | 32 | ||
33 | HOSTCFLAGS_insn_sanity.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/ | 33 | HOSTCFLAGS_insn_sanity.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/ |
34 | 34 | ||