aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-um/alternative-asm.h (renamed from include/asm-um/alternative-asm.i)2
-rw-r--r--include/asm-um/frame.h (renamed from include/asm-um/frame.i)2
-rw-r--r--include/asm-x86/Kbuild36
-rw-r--r--include/asm-x86/agp.h43
-rw-r--r--include/asm-x86/agp_32.h36
-rw-r--r--include/asm-x86/agp_64.h34
-rw-r--r--include/asm-x86/alternative-asm.h22
-rw-r--r--include/asm-x86/alternative-asm.i5
-rw-r--r--include/asm-x86/alternative-asm_32.i12
-rw-r--r--include/asm-x86/alternative-asm_64.i12
-rw-r--r--include/asm-x86/atomic_64.h2
-rw-r--r--include/asm-x86/auxvec.h23
-rw-r--r--include/asm-x86/auxvec_32.h11
-rw-r--r--include/asm-x86/auxvec_64.h6
-rw-r--r--include/asm-x86/bitops_64.h2
-rw-r--r--include/asm-x86/bug.h41
-rw-r--r--include/asm-x86/bug_32.h37
-rw-r--r--include/asm-x86/bug_64.h34
-rw-r--r--include/asm-x86/bugs.h11
-rw-r--r--include/asm-x86/bugs_32.h12
-rw-r--r--include/asm-x86/bugs_64.h6
-rw-r--r--include/asm-x86/cache.h23
-rw-r--r--include/asm-x86/cache_32.h14
-rw-r--r--include/asm-x86/cache_64.h26
-rw-r--r--include/asm-x86/cacheflush.h43
-rw-r--r--include/asm-x86/cacheflush_32.h39
-rw-r--r--include/asm-x86/cacheflush_64.h35
-rw-r--r--include/asm-x86/cpu.h3
-rw-r--r--include/asm-x86/cputime.h6
-rw-r--r--include/asm-x86/cputime_32.h6
-rw-r--r--include/asm-x86/cputime_64.h6
-rw-r--r--include/asm-x86/debugreg.h79
-rw-r--r--include/asm-x86/debugreg_32.h64
-rw-r--r--include/asm-x86/debugreg_64.h65
-rw-r--r--include/asm-x86/delay.h36
-rw-r--r--include/asm-x86/delay_32.h31
-rw-r--r--include/asm-x86/delay_64.h30
-rw-r--r--include/asm-x86/device.h13
-rw-r--r--include/asm-x86/device_32.h15
-rw-r--r--include/asm-x86/device_64.h15
-rw-r--r--include/asm-x86/dmi.h36
-rw-r--r--include/asm-x86/dmi_32.h11
-rw-r--r--include/asm-x86/dmi_64.h24
-rw-r--r--include/asm-x86/edac.h21
-rw-r--r--include/asm-x86/edac_32.h18
-rw-r--r--include/asm-x86/edac_64.h18
-rw-r--r--include/asm-x86/errno.h14
-rw-r--r--include/asm-x86/errno_32.h6
-rw-r--r--include/asm-x86/errno_64.h6
-rw-r--r--include/asm-x86/fb.h20
-rw-r--r--include/asm-x86/fb_32.h17
-rw-r--r--include/asm-x86/fb_64.h19
-rw-r--r--include/asm-x86/floppy.h281
-rw-r--r--include/asm-x86/floppy_32.h280
-rw-r--r--include/asm-x86/floppy_64.h279
-rw-r--r--include/asm-x86/frame.h (renamed from include/asm-x86/frame.i)4
-rw-r--r--include/asm-x86/hardirq_32.h6
-rw-r--r--include/asm-x86/hw_irq_64.h35
-rw-r--r--include/asm-x86/intel_arch_perfmon.h36
-rw-r--r--include/asm-x86/intel_arch_perfmon_32.h31
-rw-r--r--include/asm-x86/intel_arch_perfmon_64.h31
-rw-r--r--include/asm-x86/io_32.h17
-rw-r--r--include/asm-x86/ioctls.h98
-rw-r--r--include/asm-x86/ioctls_32.h87
-rw-r--r--include/asm-x86/ioctls_64.h86
-rw-r--r--include/asm-x86/ipcbuf.h42
-rw-r--r--include/asm-x86/ipcbuf_32.h29
-rw-r--r--include/asm-x86/ipcbuf_64.h29
-rw-r--r--include/asm-x86/kdebug.h36
-rw-r--r--include/asm-x86/kdebug_32.h27
-rw-r--r--include/asm-x86/kdebug_64.h32
-rw-r--r--include/asm-x86/kmap_types.h30
-rw-r--r--include/asm-x86/kmap_types_32.h30
-rw-r--r--include/asm-x86/kmap_types_64.h19
-rw-r--r--include/asm-x86/ldt.h51
-rw-r--r--include/asm-x86/ldt_32.h32
-rw-r--r--include/asm-x86/ldt_64.h36
-rw-r--r--include/asm-x86/mach-default/mach_apicdef.h8
-rw-r--r--include/asm-x86/mach-visws/cobalt.h8
-rw-r--r--include/asm-x86/mach-visws/lithium.h8
-rw-r--r--include/asm-x86/mce.h128
-rw-r--r--include/asm-x86/mce_32.h11
-rw-r--r--include/asm-x86/mce_64.h115
-rw-r--r--include/asm-x86/mman.h32
-rw-r--r--include/asm-x86/mman_32.h17
-rw-r--r--include/asm-x86/mman_64.h19
-rw-r--r--include/asm-x86/mmu_32.h4
-rw-r--r--include/asm-x86/mmu_64.h4
-rw-r--r--include/asm-x86/namei.h16
-rw-r--r--include/asm-x86/namei_32.h17
-rw-r--r--include/asm-x86/namei_64.h11
-rw-r--r--include/asm-x86/numa_64.h3
-rw-r--r--include/asm-x86/param.h31
-rw-r--r--include/asm-x86/param_32.h22
-rw-r--r--include/asm-x86/param_64.h22
-rw-r--r--include/asm-x86/parport.h15
-rw-r--r--include/asm-x86/parport_32.h18
-rw-r--r--include/asm-x86/parport_64.h18
-rw-r--r--include/asm-x86/pda.h6
-rw-r--r--include/asm-x86/processor_32.h31
-rw-r--r--include/asm-x86/processor_64.h27
-rw-r--r--include/asm-x86/ptrace-abi.h90
-rw-r--r--include/asm-x86/ptrace-abi_32.h39
-rw-r--r--include/asm-x86/ptrace-abi_64.h51
-rw-r--r--include/asm-x86/resource.h14
-rw-r--r--include/asm-x86/resource_32.h6
-rw-r--r--include/asm-x86/resource_64.h6
-rw-r--r--include/asm-x86/rtc.h6
-rw-r--r--include/asm-x86/rtc_32.h10
-rw-r--r--include/asm-x86/rtc_64.h10
-rw-r--r--include/asm-x86/rwlock.h14
-rw-r--r--include/asm-x86/rwlock_32.h25
-rw-r--r--include/asm-x86/rwlock_64.h26
-rw-r--r--include/asm-x86/sections.h6
-rw-r--r--include/asm-x86/sections_32.h7
-rw-r--r--include/asm-x86/sections_64.h7
-rw-r--r--include/asm-x86/sembuf.h37
-rw-r--r--include/asm-x86/sembuf_32.h25
-rw-r--r--include/asm-x86/sembuf_64.h25
-rw-r--r--include/asm-x86/serial.h30
-rw-r--r--include/asm-x86/serial_32.h29
-rw-r--r--include/asm-x86/serial_64.h29
-rw-r--r--include/asm-x86/shmparam.h19
-rw-r--r--include/asm-x86/shmparam_32.h6
-rw-r--r--include/asm-x86/shmparam_64.h6
-rw-r--r--include/asm-x86/siginfo.h21
-rw-r--r--include/asm-x86/siginfo_32.h6
-rw-r--r--include/asm-x86/siginfo_64.h8
-rw-r--r--include/asm-x86/smp_32.h9
-rw-r--r--include/asm-x86/smp_64.h1
-rw-r--r--include/asm-x86/sockios.h26
-rw-r--r--include/asm-x86/sockios_32.h13
-rw-r--r--include/asm-x86/sockios_64.h13
-rw-r--r--include/asm-x86/stacktrace.h2
-rw-r--r--include/asm-x86/string_32.h3
-rw-r--r--include/asm-x86/system_32.h6
-rw-r--r--include/asm-x86/system_64.h16
-rw-r--r--include/asm-x86/termbits.h211
-rw-r--r--include/asm-x86/termbits_32.h198
-rw-r--r--include/asm-x86/termbits_64.h198
-rw-r--r--include/asm-x86/termios.h108
-rw-r--r--include/asm-x86/termios_32.h90
-rw-r--r--include/asm-x86/termios_64.h90
-rw-r--r--include/asm-x86/tlb.h14
-rw-r--r--include/asm-x86/tlb_32.h20
-rw-r--r--include/asm-x86/tlb_64.h13
-rw-r--r--include/asm-x86/types.h77
-rw-r--r--include/asm-x86/types_32.h64
-rw-r--r--include/asm-x86/types_64.h55
-rw-r--r--include/asm-x86/ucontext.h25
-rw-r--r--include/asm-x86/ucontext_32.h12
-rw-r--r--include/asm-x86/ucontext_64.h12
-rw-r--r--include/asm-x86/unaligned.h42
-rw-r--r--include/asm-x86/unaligned_32.h37
-rw-r--r--include/asm-x86/unaligned_64.h37
-rw-r--r--include/asm-x86/unistd_64.h619
-rw-r--r--include/asm-x86/unwind.h18
-rw-r--r--include/asm-x86/unwind_32.h13
-rw-r--r--include/asm-x86/unwind_64.h12
159 files changed, 2101 insertions, 3914 deletions
diff --git a/include/asm-um/alternative-asm.i b/include/asm-um/alternative-asm.h
index cae9faca132f..9aa9fa2402a4 100644
--- a/include/asm-um/alternative-asm.i
+++ b/include/asm-um/alternative-asm.h
@@ -1,6 +1,6 @@
1#ifndef __UM_ALTERNATIVE_ASM_I 1#ifndef __UM_ALTERNATIVE_ASM_I
2#define __UM_ALTERNATIVE_ASM_I 2#define __UM_ALTERNATIVE_ASM_I
3 3
4#include "asm/arch/alternative-asm.i" 4#include "asm/arch/alternative-asm.h"
5 5
6#endif 6#endif
diff --git a/include/asm-um/frame.i b/include/asm-um/frame.h
index 09d5dca5d928..8a8c1cb415b4 100644
--- a/include/asm-um/frame.i
+++ b/include/asm-um/frame.h
@@ -1,6 +1,6 @@
1#ifndef __UM_FRAME_I 1#ifndef __UM_FRAME_I
2#define __UM_FRAME_I 2#define __UM_FRAME_I
3 3
4#include "asm/arch/frame.i" 4#include "asm/arch/frame.h"
5 5
6#endif 6#endif
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild
index 80744dbcfafd..559830ece755 100644
--- a/include/asm-x86/Kbuild
+++ b/include/asm-x86/Kbuild
@@ -1,40 +1,22 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += boot.h 3header-y += boot.h
4header-y += debugreg_32.h
5header-y += debugreg_64.h
6header-y += debugreg.h 4header-y += debugreg.h
7header-y += ldt_32.h
8header-y += ldt_64.h
9header-y += ldt.h 5header-y += ldt.h
10header-y += msr-index.h 6header-y += msr-index.h
11header-y += prctl.h 7header-y += prctl.h
12header-y += ptrace-abi_32.h
13header-y += ptrace-abi_64.h
14header-y += ptrace-abi.h 8header-y += ptrace-abi.h
15header-y += sigcontext32.h 9header-y += sigcontext32.h
16header-y += ucontext_32.h
17header-y += ucontext_64.h
18header-y += ucontext.h 10header-y += ucontext.h
19header-y += vsyscall32.h 11header-y += vsyscall32.h
20 12
21unifdef-y += a.out_32.h 13unifdef-y += a.out_32.h
22unifdef-y += a.out_64.h 14unifdef-y += a.out_64.h
23unifdef-y += auxvec_32.h
24unifdef-y += auxvec_64.h
25unifdef-y += byteorder_32.h 15unifdef-y += byteorder_32.h
26unifdef-y += byteorder_64.h 16unifdef-y += byteorder_64.h
27unifdef-y += elf_32.h 17unifdef-y += elf_32.h
28unifdef-y += elf_64.h 18unifdef-y += elf_64.h
29unifdef-y += errno_32.h
30unifdef-y += errno_64.h
31unifdef-y += ioctls_32.h
32unifdef-y += ioctls_64.h
33unifdef-y += ipcbuf_32.h
34unifdef-y += ipcbuf_64.h
35unifdef-y += mce.h 19unifdef-y += mce.h
36unifdef-y += mman_32.h
37unifdef-y += mman_64.h
38unifdef-y += msgbuf_32.h 20unifdef-y += msgbuf_32.h
39unifdef-y += msgbuf_64.h 21unifdef-y += msgbuf_64.h
40unifdef-y += msr_32.h 22unifdef-y += msr_32.h
@@ -45,40 +27,22 @@ unifdef-y += mtrr_64.h
45unifdef-y += mtrr.h 27unifdef-y += mtrr.h
46unifdef-y += page_32.h 28unifdef-y += page_32.h
47unifdef-y += page_64.h 29unifdef-y += page_64.h
48unifdef-y += param_32.h
49unifdef-y += param_64.h
50unifdef-y += posix_types_32.h 30unifdef-y += posix_types_32.h
51unifdef-y += posix_types_64.h 31unifdef-y += posix_types_64.h
52unifdef-y += ptrace_32.h 32unifdef-y += ptrace_32.h
53unifdef-y += ptrace_64.h 33unifdef-y += ptrace_64.h
54unifdef-y += resource_32.h
55unifdef-y += resource_64.h
56unifdef-y += sembuf_32.h
57unifdef-y += sembuf_64.h
58unifdef-y += setup_32.h 34unifdef-y += setup_32.h
59unifdef-y += setup_64.h 35unifdef-y += setup_64.h
60unifdef-y += shmbuf_32.h 36unifdef-y += shmbuf_32.h
61unifdef-y += shmbuf_64.h 37unifdef-y += shmbuf_64.h
62unifdef-y += shmparam_32.h
63unifdef-y += shmparam_64.h
64unifdef-y += sigcontext_32.h 38unifdef-y += sigcontext_32.h
65unifdef-y += sigcontext_64.h 39unifdef-y += sigcontext_64.h
66unifdef-y += siginfo_32.h
67unifdef-y += siginfo_64.h
68unifdef-y += signal_32.h 40unifdef-y += signal_32.h
69unifdef-y += signal_64.h 41unifdef-y += signal_64.h
70unifdef-y += sockios_32.h
71unifdef-y += sockios_64.h
72unifdef-y += stat_32.h 42unifdef-y += stat_32.h
73unifdef-y += stat_64.h 43unifdef-y += stat_64.h
74unifdef-y += statfs_32.h 44unifdef-y += statfs_32.h
75unifdef-y += statfs_64.h 45unifdef-y += statfs_64.h
76unifdef-y += termbits_32.h
77unifdef-y += termbits_64.h
78unifdef-y += termios_32.h
79unifdef-y += termios_64.h
80unifdef-y += types_32.h
81unifdef-y += types_64.h
82unifdef-y += unistd_32.h 46unifdef-y += unistd_32.h
83unifdef-y += unistd_64.h 47unifdef-y += unistd_64.h
84unifdef-y += user_32.h 48unifdef-y += user_32.h
diff --git a/include/asm-x86/agp.h b/include/asm-x86/agp.h
index 9348f1e4f6f1..62df2a9e7130 100644
--- a/include/asm-x86/agp.h
+++ b/include/asm-x86/agp.h
@@ -1,5 +1,40 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_AGP_H
2# include "agp_32.h" 2#define _ASM_X86_AGP_H
3#else 3
4# include "agp_64.h" 4#include <asm/pgtable.h>
5#include <asm/cacheflush.h>
6
7/*
8 * Functions to keep the agpgart mappings coherent with the MMU. The
9 * GART gives the CPU a physical alias of pages in memory. The alias
10 * region is mapped uncacheable. Make sure there are no conflicting
11 * mappings with different cachability attributes for the same
12 * page. This avoids data corruption on some CPUs.
13 */
14
15/*
16 * Caller's responsibility to call global_flush_tlb() for performance
17 * reasons
18 */
19#define map_page_into_agp(page) change_page_attr(page, 1, PAGE_KERNEL_NOCACHE)
20#define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL)
21#define flush_agp_mappings() global_flush_tlb()
22
23/*
24 * Could use CLFLUSH here if the cpu supports it. But then it would
25 * need to be called for each cacheline of the whole page so it may
26 * not be worth it. Would need a page for it.
27 */
28#define flush_agp_cache() wbinvd()
29
30/* Convert a physical address to an address suitable for the GART. */
31#define phys_to_gart(x) (x)
32#define gart_to_phys(x) (x)
33
34/* GATT allocation. Returns/accepts GATT kernel virtual address. */
35#define alloc_gatt_pages(order) \
36 ((char *)__get_free_pages(GFP_KERNEL, (order)))
37#define free_gatt_pages(table, order) \
38 free_pages((unsigned long)(table), (order))
39
5#endif 40#endif
diff --git a/include/asm-x86/agp_32.h b/include/asm-x86/agp_32.h
deleted file mode 100644
index 6af173dbf123..000000000000
--- a/include/asm-x86/agp_32.h
+++ /dev/null
@@ -1,36 +0,0 @@
1#ifndef AGP_H
2#define AGP_H 1
3
4#include <asm/pgtable.h>
5#include <asm/cacheflush.h>
6
7/*
8 * Functions to keep the agpgart mappings coherent with the MMU.
9 * The GART gives the CPU a physical alias of pages in memory. The alias region is
10 * mapped uncacheable. Make sure there are no conflicting mappings
11 * with different cachability attributes for the same page. This avoids
12 * data corruption on some CPUs.
13 */
14
15/* Caller's responsibility to call global_flush_tlb() for
16 * performance reasons */
17#define map_page_into_agp(page) change_page_attr(page, 1, PAGE_KERNEL_NOCACHE)
18#define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL)
19#define flush_agp_mappings() global_flush_tlb()
20
21/* Could use CLFLUSH here if the cpu supports it. But then it would
22 need to be called for each cacheline of the whole page so it may not be
23 worth it. Would need a page for it. */
24#define flush_agp_cache() wbinvd()
25
26/* Convert a physical address to an address suitable for the GART. */
27#define phys_to_gart(x) (x)
28#define gart_to_phys(x) (x)
29
30/* GATT allocation. Returns/accepts GATT kernel virtual address. */
31#define alloc_gatt_pages(order) \
32 ((char *)__get_free_pages(GFP_KERNEL, (order)))
33#define free_gatt_pages(table, order) \
34 free_pages((unsigned long)(table), (order))
35
36#endif
diff --git a/include/asm-x86/agp_64.h b/include/asm-x86/agp_64.h
deleted file mode 100644
index de338666f3f9..000000000000
--- a/include/asm-x86/agp_64.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef AGP_H
2#define AGP_H 1
3
4#include <asm/cacheflush.h>
5
6/*
7 * Functions to keep the agpgart mappings coherent.
8 * The GART gives the CPU a physical alias of memory. The alias is
9 * mapped uncacheable. Make sure there are no conflicting mappings
10 * with different cachability attributes for the same page.
11 */
12
13/* Caller's responsibility to call global_flush_tlb() for
14 * performance reasons */
15#define map_page_into_agp(page) change_page_attr(page, 1, PAGE_KERNEL_NOCACHE)
16#define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL)
17#define flush_agp_mappings() global_flush_tlb()
18
19/* Could use CLFLUSH here if the cpu supports it. But then it would
20 need to be called for each cacheline of the whole page so it may not be
21 worth it. Would need a page for it. */
22#define flush_agp_cache() asm volatile("wbinvd":::"memory")
23
24/* Convert a physical address to an address suitable for the GART. */
25#define phys_to_gart(x) (x)
26#define gart_to_phys(x) (x)
27
28/* GATT allocation. Returns/accepts GATT kernel virtual address. */
29#define alloc_gatt_pages(order) \
30 ((char *)__get_free_pages(GFP_KERNEL, (order)))
31#define free_gatt_pages(table, order) \
32 free_pages((unsigned long)(table), (order))
33
34#endif
diff --git a/include/asm-x86/alternative-asm.h b/include/asm-x86/alternative-asm.h
new file mode 100644
index 000000000000..e2077d343c33
--- /dev/null
+++ b/include/asm-x86/alternative-asm.h
@@ -0,0 +1,22 @@
1#ifdef __ASSEMBLY__
2
3#ifdef CONFIG_X86_32
4# define X86_ALIGN .long
5#else
6# define X86_ALIGN .quad
7#endif
8
9#ifdef CONFIG_SMP
10 .macro LOCK_PREFIX
111: lock
12 .section .smp_locks,"a"
13 .align 4
14 X86_ALIGN 1b
15 .previous
16 .endm
17#else
18 .macro LOCK_PREFIX
19 .endm
20#endif
21
22#endif /* __ASSEMBLY__ */
diff --git a/include/asm-x86/alternative-asm.i b/include/asm-x86/alternative-asm.i
deleted file mode 100644
index 4f360cd3c888..000000000000
--- a/include/asm-x86/alternative-asm.i
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "alternative-asm_32.i"
3#else
4# include "alternative-asm_64.i"
5#endif
diff --git a/include/asm-x86/alternative-asm_32.i b/include/asm-x86/alternative-asm_32.i
deleted file mode 100644
index f0510209ccbe..000000000000
--- a/include/asm-x86/alternative-asm_32.i
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifdef CONFIG_SMP
2 .macro LOCK_PREFIX
31: lock
4 .section .smp_locks,"a"
5 .align 4
6 .long 1b
7 .previous
8 .endm
9#else
10 .macro LOCK_PREFIX
11 .endm
12#endif
diff --git a/include/asm-x86/alternative-asm_64.i b/include/asm-x86/alternative-asm_64.i
deleted file mode 100644
index 0b3f1a2bb2cb..000000000000
--- a/include/asm-x86/alternative-asm_64.i
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifdef CONFIG_SMP
2 .macro LOCK_PREFIX
31: lock
4 .section .smp_locks,"a"
5 .align 8
6 .quad 1b
7 .previous
8 .endm
9#else
10 .macro LOCK_PREFIX
11 .endm
12#endif
diff --git a/include/asm-x86/atomic_64.h b/include/asm-x86/atomic_64.h
index f2e64634fa48..2d20a7a19f62 100644
--- a/include/asm-x86/atomic_64.h
+++ b/include/asm-x86/atomic_64.h
@@ -206,7 +206,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)
206 206
207/* An 64bit atomic type */ 207/* An 64bit atomic type */
208 208
209typedef struct { volatile long counter; } atomic64_t; 209typedef struct { long counter; } atomic64_t;
210 210
211#define ATOMIC64_INIT(i) { (i) } 211#define ATOMIC64_INIT(i) { (i) }
212 212
diff --git a/include/asm-x86/auxvec.h b/include/asm-x86/auxvec.h
index 7ff866f829ca..87f5e6d5a020 100644
--- a/include/asm-x86/auxvec.h
+++ b/include/asm-x86/auxvec.h
@@ -1,13 +1,12 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_AUXVEC_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_AUXVEC_H
3# include "auxvec_32.h" 3/*
4# else 4 * Architecture-neutral AT_ values in 0-17, leave some room
5# include "auxvec_64.h" 5 * for more of them, start the x86-specific ones at 32.
6# endif 6 */
7#else 7#ifdef __i386__
8# ifdef __i386__ 8#define AT_SYSINFO 32
9# include "auxvec_32.h" 9#endif
10# else 10#define AT_SYSINFO_EHDR 33
11# include "auxvec_64.h" 11
12# endif
13#endif 12#endif
diff --git a/include/asm-x86/auxvec_32.h b/include/asm-x86/auxvec_32.h
deleted file mode 100644
index 395e13016bfb..000000000000
--- a/include/asm-x86/auxvec_32.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef __ASMi386_AUXVEC_H
2#define __ASMi386_AUXVEC_H
3
4/*
5 * Architecture-neutral AT_ values in 0-17, leave some room
6 * for more of them, start the x86-specific ones at 32.
7 */
8#define AT_SYSINFO 32
9#define AT_SYSINFO_EHDR 33
10
11#endif
diff --git a/include/asm-x86/auxvec_64.h b/include/asm-x86/auxvec_64.h
deleted file mode 100644
index 1d5ab0d03950..000000000000
--- a/include/asm-x86/auxvec_64.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_X86_64_AUXVEC_H
2#define __ASM_X86_64_AUXVEC_H
3
4#define AT_SYSINFO_EHDR 33
5
6#endif
diff --git a/include/asm-x86/bitops_64.h b/include/asm-x86/bitops_64.h
index d4dbbe5f7bd9..1d7d9b4bcacb 100644
--- a/include/asm-x86/bitops_64.h
+++ b/include/asm-x86/bitops_64.h
@@ -260,7 +260,7 @@ extern long find_first_bit(const unsigned long * addr, unsigned long size);
260extern long find_next_bit(const unsigned long * addr, long size, long offset); 260extern long find_next_bit(const unsigned long * addr, long size, long offset);
261 261
262/* return index of first bet set in val or max when no bit is set */ 262/* return index of first bet set in val or max when no bit is set */
263static inline unsigned long __scanbit(unsigned long val, unsigned long max) 263static inline long __scanbit(unsigned long val, unsigned long max)
264{ 264{
265 asm("bsfq %1,%0 ; cmovz %2,%0" : "=&r" (val) : "r" (val), "r" (max)); 265 asm("bsfq %1,%0 ; cmovz %2,%0" : "=&r" (val) : "r" (val), "r" (max));
266 return val; 266 return val;
diff --git a/include/asm-x86/bug.h b/include/asm-x86/bug.h
index c655d7f3a5e0..fd8bdc639c48 100644
--- a/include/asm-x86/bug.h
+++ b/include/asm-x86/bug.h
@@ -1,5 +1,42 @@
1#ifndef _ASM_X86_BUG_H
2#define _ASM_X86_BUG_H
3
4#ifdef CONFIG_BUG
5#define HAVE_ARCH_BUG
6
7#ifdef CONFIG_DEBUG_BUGVERBOSE
8
1#ifdef CONFIG_X86_32 9#ifdef CONFIG_X86_32
2# include "bug_32.h" 10# define __BUG_C0 "2:\t.long 1b, %c0\n"
3#else 11#else
4# include "bug_64.h" 12# define __BUG_C0 "2:\t.quad 1b, %c0\n"
13#endif
14
15#define BUG() \
16 do { \
17 asm volatile("1:\tud2\n" \
18 ".pushsection __bug_table,\"a\"\n" \
19 __BUG_C0 \
20 "\t.word %c1, 0\n" \
21 "\t.org 2b+%c2\n" \
22 ".popsection" \
23 : : "i" (__FILE__), "i" (__LINE__), \
24 "i" (sizeof(struct bug_entry))); \
25 for(;;) ; \
26 } while(0)
27
28#else
29#define BUG() \
30 do { \
31 asm volatile("ud2"); \
32 for(;;) ; \
33 } while(0)
34#endif
35
36void out_of_line_bug(void);
37#else /* CONFIG_BUG */
38static inline void out_of_line_bug(void) { }
39#endif /* !CONFIG_BUG */
40
41#include <asm-generic/bug.h>
5#endif 42#endif
diff --git a/include/asm-x86/bug_32.h b/include/asm-x86/bug_32.h
deleted file mode 100644
index b0fd78ca2619..000000000000
--- a/include/asm-x86/bug_32.h
+++ /dev/null
@@ -1,37 +0,0 @@
1#ifndef _I386_BUG_H
2#define _I386_BUG_H
3
4
5/*
6 * Tell the user there is some problem.
7 * The offending file and line are encoded encoded in the __bug_table section.
8 */
9
10#ifdef CONFIG_BUG
11#define HAVE_ARCH_BUG
12
13#ifdef CONFIG_DEBUG_BUGVERBOSE
14#define BUG() \
15 do { \
16 asm volatile("1:\tud2\n" \
17 ".pushsection __bug_table,\"a\"\n" \
18 "2:\t.long 1b, %c0\n" \
19 "\t.word %c1, 0\n" \
20 "\t.org 2b+%c2\n" \
21 ".popsection" \
22 : : "i" (__FILE__), "i" (__LINE__), \
23 "i" (sizeof(struct bug_entry))); \
24 for(;;) ; \
25 } while(0)
26
27#else
28#define BUG() \
29 do { \
30 asm volatile("ud2"); \
31 for(;;) ; \
32 } while(0)
33#endif
34#endif
35
36#include <asm-generic/bug.h>
37#endif
diff --git a/include/asm-x86/bug_64.h b/include/asm-x86/bug_64.h
deleted file mode 100644
index 682606414913..000000000000
--- a/include/asm-x86/bug_64.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef __ASM_X8664_BUG_H
2#define __ASM_X8664_BUG_H 1
3
4#ifdef CONFIG_BUG
5#define HAVE_ARCH_BUG
6
7#ifdef CONFIG_DEBUG_BUGVERBOSE
8#define BUG() \
9 do { \
10 asm volatile("1:\tud2\n" \
11 ".pushsection __bug_table,\"a\"\n" \
12 "2:\t.quad 1b, %c0\n" \
13 "\t.word %c1, 0\n" \
14 "\t.org 2b+%c2\n" \
15 ".popsection" \
16 : : "i" (__FILE__), "i" (__LINE__), \
17 "i" (sizeof(struct bug_entry))); \
18 for(;;) ; \
19 } while(0)
20#else
21#define BUG() \
22 do { \
23 asm volatile("ud2"); \
24 for(;;) ; \
25 } while(0)
26#endif
27
28void out_of_line_bug(void);
29#else
30static inline void out_of_line_bug(void) { }
31#endif
32
33#include <asm-generic/bug.h>
34#endif
diff --git a/include/asm-x86/bugs.h b/include/asm-x86/bugs.h
index ddf42d36dd50..aac8317420af 100644
--- a/include/asm-x86/bugs.h
+++ b/include/asm-x86/bugs.h
@@ -1,5 +1,6 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_BUGS_H
2# include "bugs_32.h" 2#define _ASM_X86_BUGS_H
3#else 3
4# include "bugs_64.h" 4void check_bugs(void);
5#endif 5
6#endif /* _ASM_X86_BUGS_H */
diff --git a/include/asm-x86/bugs_32.h b/include/asm-x86/bugs_32.h
deleted file mode 100644
index d28979ff73be..000000000000
--- a/include/asm-x86/bugs_32.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/*
2 * This is included by init/main.c to check for architecture-dependent bugs.
3 *
4 * Needs:
5 * void check_bugs(void);
6 */
7#ifndef _ASM_I386_BUG_H
8#define _ASM_I386_BUG_H
9
10void check_bugs(void);
11
12#endif /* _ASM_I386_BUG_H */
diff --git a/include/asm-x86/bugs_64.h b/include/asm-x86/bugs_64.h
deleted file mode 100644
index b33dc04d8f42..000000000000
--- a/include/asm-x86/bugs_64.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_X86_64_BUGS_H
2#define _ASM_X86_64_BUGS_H
3
4void check_bugs(void);
5
6#endif /* _ASM_X86_64_BUGS_H */
diff --git a/include/asm-x86/cache.h b/include/asm-x86/cache.h
index c36d190ac9d8..1e0bac86f38f 100644
--- a/include/asm-x86/cache.h
+++ b/include/asm-x86/cache.h
@@ -1,5 +1,20 @@
1#ifdef CONFIG_X86_32 1#ifndef _ARCH_X86_CACHE_H
2# include "cache_32.h" 2#define _ARCH_X86_CACHE_H
3#else 3
4# include "cache_64.h" 4/* L1 cache line size */
5#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
6#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
7
8#define __read_mostly __attribute__((__section__(".data.read_mostly")))
9
10#ifdef CONFIG_X86_VSMP
11/* vSMP Internode cacheline shift */
12#define INTERNODE_CACHE_SHIFT (12)
13#ifdef CONFIG_SMP
14#define __cacheline_aligned_in_smp \
15 __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \
16 __attribute__((__section__(".data.page_aligned")))
17#endif
18#endif
19
5#endif 20#endif
diff --git a/include/asm-x86/cache_32.h b/include/asm-x86/cache_32.h
deleted file mode 100644
index 57c62f414158..000000000000
--- a/include/asm-x86/cache_32.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * include/asm-i386/cache.h
3 */
4#ifndef __ARCH_I386_CACHE_H
5#define __ARCH_I386_CACHE_H
6
7
8/* L1 cache line size */
9#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
10#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
11
12#define __read_mostly __attribute__((__section__(".data.read_mostly")))
13
14#endif
diff --git a/include/asm-x86/cache_64.h b/include/asm-x86/cache_64.h
deleted file mode 100644
index 052df758ae61..000000000000
--- a/include/asm-x86/cache_64.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * include/asm-x86_64/cache.h
3 */
4#ifndef __ARCH_X8664_CACHE_H
5#define __ARCH_X8664_CACHE_H
6
7
8/* L1 cache line size */
9#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
10#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
11
12#ifdef CONFIG_X86_VSMP
13
14/* vSMP Internode cacheline shift */
15#define INTERNODE_CACHE_SHIFT (12)
16#ifdef CONFIG_SMP
17#define __cacheline_aligned_in_smp \
18 __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \
19 __attribute__((__section__(".data.page_aligned")))
20#endif
21
22#endif
23
24#define __read_mostly __attribute__((__section__(".data.read_mostly")))
25
26#endif
diff --git a/include/asm-x86/cacheflush.h b/include/asm-x86/cacheflush.h
index e2df3b55034a..b3d43de44c59 100644
--- a/include/asm-x86/cacheflush.h
+++ b/include/asm-x86/cacheflush.h
@@ -1,5 +1,40 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_CACHEFLUSH_H
2# include "cacheflush_32.h" 2#define _ASM_X86_CACHEFLUSH_H
3#else 3
4# include "cacheflush_64.h" 4/* Keep includes the same across arches. */
5#include <linux/mm.h>
6
7/* Caches aren't brain-dead on the intel. */
8#define flush_cache_all() do { } while (0)
9#define flush_cache_mm(mm) do { } while (0)
10#define flush_cache_dup_mm(mm) do { } while (0)
11#define flush_cache_range(vma, start, end) do { } while (0)
12#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
13#define flush_dcache_page(page) do { } while (0)
14#define flush_dcache_mmap_lock(mapping) do { } while (0)
15#define flush_dcache_mmap_unlock(mapping) do { } while (0)
16#define flush_icache_range(start, end) do { } while (0)
17#define flush_icache_page(vma,pg) do { } while (0)
18#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
19#define flush_cache_vmap(start, end) do { } while (0)
20#define flush_cache_vunmap(start, end) do { } while (0)
21
22#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
23 memcpy(dst, src, len)
24#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
25 memcpy(dst, src, len)
26
27void global_flush_tlb(void);
28int change_page_attr(struct page *page, int numpages, pgprot_t prot);
29int change_page_attr_addr(unsigned long addr, int numpages, pgprot_t prot);
30
31#ifdef CONFIG_DEBUG_PAGEALLOC
32/* internal debugging function */
33void kernel_map_pages(struct page *page, int numpages, int enable);
34#endif
35
36#ifdef CONFIG_DEBUG_RODATA
37void mark_rodata_ro(void);
38#endif
39
5#endif 40#endif
diff --git a/include/asm-x86/cacheflush_32.h b/include/asm-x86/cacheflush_32.h
deleted file mode 100644
index 74e03c8f2e51..000000000000
--- a/include/asm-x86/cacheflush_32.h
+++ /dev/null
@@ -1,39 +0,0 @@
1#ifndef _I386_CACHEFLUSH_H
2#define _I386_CACHEFLUSH_H
3
4/* Keep includes the same across arches. */
5#include <linux/mm.h>
6
7/* Caches aren't brain-dead on the intel. */
8#define flush_cache_all() do { } while (0)
9#define flush_cache_mm(mm) do { } while (0)
10#define flush_cache_dup_mm(mm) do { } while (0)
11#define flush_cache_range(vma, start, end) do { } while (0)
12#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
13#define flush_dcache_page(page) do { } while (0)
14#define flush_dcache_mmap_lock(mapping) do { } while (0)
15#define flush_dcache_mmap_unlock(mapping) do { } while (0)
16#define flush_icache_range(start, end) do { } while (0)
17#define flush_icache_page(vma,pg) do { } while (0)
18#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
19#define flush_cache_vmap(start, end) do { } while (0)
20#define flush_cache_vunmap(start, end) do { } while (0)
21
22#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
23 memcpy(dst, src, len)
24#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
25 memcpy(dst, src, len)
26
27void global_flush_tlb(void);
28int change_page_attr(struct page *page, int numpages, pgprot_t prot);
29
30#ifdef CONFIG_DEBUG_PAGEALLOC
31/* internal debugging function */
32void kernel_map_pages(struct page *page, int numpages, int enable);
33#endif
34
35#ifdef CONFIG_DEBUG_RODATA
36void mark_rodata_ro(void);
37#endif
38
39#endif /* _I386_CACHEFLUSH_H */
diff --git a/include/asm-x86/cacheflush_64.h b/include/asm-x86/cacheflush_64.h
deleted file mode 100644
index ab1cb5c7dc92..000000000000
--- a/include/asm-x86/cacheflush_64.h
+++ /dev/null
@@ -1,35 +0,0 @@
1#ifndef _X8664_CACHEFLUSH_H
2#define _X8664_CACHEFLUSH_H
3
4/* Keep includes the same across arches. */
5#include <linux/mm.h>
6
7/* Caches aren't brain-dead on the intel. */
8#define flush_cache_all() do { } while (0)
9#define flush_cache_mm(mm) do { } while (0)
10#define flush_cache_dup_mm(mm) do { } while (0)
11#define flush_cache_range(vma, start, end) do { } while (0)
12#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
13#define flush_dcache_page(page) do { } while (0)
14#define flush_dcache_mmap_lock(mapping) do { } while (0)
15#define flush_dcache_mmap_unlock(mapping) do { } while (0)
16#define flush_icache_range(start, end) do { } while (0)
17#define flush_icache_page(vma,pg) do { } while (0)
18#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
19#define flush_cache_vmap(start, end) do { } while (0)
20#define flush_cache_vunmap(start, end) do { } while (0)
21
22#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
23 memcpy(dst, src, len)
24#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
25 memcpy(dst, src, len)
26
27void global_flush_tlb(void);
28int change_page_attr(struct page *page, int numpages, pgprot_t prot);
29int change_page_attr_addr(unsigned long addr, int numpages, pgprot_t prot);
30
31#ifdef CONFIG_DEBUG_RODATA
32void mark_rodata_ro(void);
33#endif
34
35#endif /* _X8664_CACHEFLUSH_H */
diff --git a/include/asm-x86/cpu.h b/include/asm-x86/cpu.h
index 9d914e1e4aad..b1bc7b1b64b0 100644
--- a/include/asm-x86/cpu.h
+++ b/include/asm-x86/cpu.h
@@ -13,9 +13,6 @@ struct i386_cpu {
13extern int arch_register_cpu(int num); 13extern int arch_register_cpu(int num);
14#ifdef CONFIG_HOTPLUG_CPU 14#ifdef CONFIG_HOTPLUG_CPU
15extern void arch_unregister_cpu(int); 15extern void arch_unregister_cpu(int);
16extern int enable_cpu_hotplug;
17#else
18#define enable_cpu_hotplug 0
19#endif 16#endif
20 17
21DECLARE_PER_CPU(int, cpu_state); 18DECLARE_PER_CPU(int, cpu_state);
diff --git a/include/asm-x86/cputime.h b/include/asm-x86/cputime.h
index 87c37cf6b707..6d68ad7e0ea3 100644
--- a/include/asm-x86/cputime.h
+++ b/include/asm-x86/cputime.h
@@ -1,5 +1 @@
1#ifdef CONFIG_X86_32 #include <asm-generic/cputime.h>
2# include "cputime_32.h"
3#else
4# include "cputime_64.h"
5#endif
diff --git a/include/asm-x86/cputime_32.h b/include/asm-x86/cputime_32.h
deleted file mode 100644
index 398ed7cd171d..000000000000
--- a/include/asm-x86/cputime_32.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __I386_CPUTIME_H
2#define __I386_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* __I386_CPUTIME_H */
diff --git a/include/asm-x86/cputime_64.h b/include/asm-x86/cputime_64.h
deleted file mode 100644
index a07012dc5a3c..000000000000
--- a/include/asm-x86/cputime_64.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __X86_64_CPUTIME_H
2#define __X86_64_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* __X86_64_CPUTIME_H */
diff --git a/include/asm-x86/debugreg.h b/include/asm-x86/debugreg.h
index b6ce7e4fa002..c6344d572b03 100644
--- a/include/asm-x86/debugreg.h
+++ b/include/asm-x86/debugreg.h
@@ -1,13 +1,70 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_DEBUGREG_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_DEBUGREG_H
3# include "debugreg_32.h" 3
4# else 4
5# include "debugreg_64.h" 5/* Indicate the register numbers for a number of the specific
6# endif 6 debug registers. Registers 0-3 contain the addresses we wish to trap on */
7#define DR_FIRSTADDR 0 /* u_debugreg[DR_FIRSTADDR] */
8#define DR_LASTADDR 3 /* u_debugreg[DR_LASTADDR] */
9
10#define DR_STATUS 6 /* u_debugreg[DR_STATUS] */
11#define DR_CONTROL 7 /* u_debugreg[DR_CONTROL] */
12
13/* Define a few things for the status register. We can use this to determine
14 which debugging register was responsible for the trap. The other bits
15 are either reserved or not of interest to us. */
16
17#define DR_TRAP0 (0x1) /* db0 */
18#define DR_TRAP1 (0x2) /* db1 */
19#define DR_TRAP2 (0x4) /* db2 */
20#define DR_TRAP3 (0x8) /* db3 */
21
22#define DR_STEP (0x4000) /* single-step */
23#define DR_SWITCH (0x8000) /* task switch */
24
25/* Now define a bunch of things for manipulating the control register.
26 The top two bytes of the control register consist of 4 fields of 4
27 bits - each field corresponds to one of the four debug registers,
28 and indicates what types of access we trap on, and how large the data
29 field is that we are looking at */
30
31#define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */
32#define DR_CONTROL_SIZE 4 /* 4 control bits per register */
33
34#define DR_RW_EXECUTE (0x0) /* Settings for the access types to trap on */
35#define DR_RW_WRITE (0x1)
36#define DR_RW_READ (0x3)
37
38#define DR_LEN_1 (0x0) /* Settings for data length to trap on */
39#define DR_LEN_2 (0x4)
40#define DR_LEN_4 (0xC)
41#define DR_LEN_8 (0x8)
42
43/* The low byte to the control register determine which registers are
44 enabled. There are 4 fields of two bits. One bit is "local", meaning
45 that the processor will reset the bit after a task switch and the other
46 is global meaning that we have to explicitly reset the bit. With linux,
47 you can use either one, since we explicitly zero the register when we enter
48 kernel mode. */
49
50#define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */
51#define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */
52#define DR_ENABLE_SIZE 2 /* 2 enable bits per register */
53
54#define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */
55#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */
56
57/* The second byte to the control register has a few special things.
58 We can slow the instruction pipeline for instructions coming via the
59 gdt or the ldt if we want to. I am not sure why this is an advantage */
60
61#ifdef __i386__
62#define DR_CONTROL_RESERVED (0xFC00) /* Reserved by Intel */
7#else 63#else
8# ifdef __i386__ 64#define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00UL) /* Reserved */
9# include "debugreg_32.h" 65#endif
10# else 66
11# include "debugreg_64.h" 67#define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */
12# endif 68#define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */
69
13#endif 70#endif
diff --git a/include/asm-x86/debugreg_32.h b/include/asm-x86/debugreg_32.h
deleted file mode 100644
index f0b2b06ae0f7..000000000000
--- a/include/asm-x86/debugreg_32.h
+++ /dev/null
@@ -1,64 +0,0 @@
1#ifndef _I386_DEBUGREG_H
2#define _I386_DEBUGREG_H
3
4
5/* Indicate the register numbers for a number of the specific
6 debug registers. Registers 0-3 contain the addresses we wish to trap on */
7#define DR_FIRSTADDR 0 /* u_debugreg[DR_FIRSTADDR] */
8#define DR_LASTADDR 3 /* u_debugreg[DR_LASTADDR] */
9
10#define DR_STATUS 6 /* u_debugreg[DR_STATUS] */
11#define DR_CONTROL 7 /* u_debugreg[DR_CONTROL] */
12
13/* Define a few things for the status register. We can use this to determine
14 which debugging register was responsible for the trap. The other bits
15 are either reserved or not of interest to us. */
16
17#define DR_TRAP0 (0x1) /* db0 */
18#define DR_TRAP1 (0x2) /* db1 */
19#define DR_TRAP2 (0x4) /* db2 */
20#define DR_TRAP3 (0x8) /* db3 */
21
22#define DR_STEP (0x4000) /* single-step */
23#define DR_SWITCH (0x8000) /* task switch */
24
25/* Now define a bunch of things for manipulating the control register.
26 The top two bytes of the control register consist of 4 fields of 4
27 bits - each field corresponds to one of the four debug registers,
28 and indicates what types of access we trap on, and how large the data
29 field is that we are looking at */
30
31#define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */
32#define DR_CONTROL_SIZE 4 /* 4 control bits per register */
33
34#define DR_RW_EXECUTE (0x0) /* Settings for the access types to trap on */
35#define DR_RW_WRITE (0x1)
36#define DR_RW_READ (0x3)
37
38#define DR_LEN_1 (0x0) /* Settings for data length to trap on */
39#define DR_LEN_2 (0x4)
40#define DR_LEN_4 (0xC)
41
42/* The low byte to the control register determine which registers are
43 enabled. There are 4 fields of two bits. One bit is "local", meaning
44 that the processor will reset the bit after a task switch and the other
45 is global meaning that we have to explicitly reset the bit. With linux,
46 you can use either one, since we explicitly zero the register when we enter
47 kernel mode. */
48
49#define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */
50#define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */
51#define DR_ENABLE_SIZE 2 /* 2 enable bits per register */
52
53#define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */
54#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */
55
56/* The second byte to the control register has a few special things.
57 We can slow the instruction pipeline for instructions coming via the
58 gdt or the ldt if we want to. I am not sure why this is an advantage */
59
60#define DR_CONTROL_RESERVED (0xFC00) /* Reserved by Intel */
61#define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */
62#define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */
63
64#endif
diff --git a/include/asm-x86/debugreg_64.h b/include/asm-x86/debugreg_64.h
deleted file mode 100644
index bd1aab1d8c4a..000000000000
--- a/include/asm-x86/debugreg_64.h
+++ /dev/null
@@ -1,65 +0,0 @@
1#ifndef _X86_64_DEBUGREG_H
2#define _X86_64_DEBUGREG_H
3
4
5/* Indicate the register numbers for a number of the specific
6 debug registers. Registers 0-3 contain the addresses we wish to trap on */
7#define DR_FIRSTADDR 0 /* u_debugreg[DR_FIRSTADDR] */
8#define DR_LASTADDR 3 /* u_debugreg[DR_LASTADDR] */
9
10#define DR_STATUS 6 /* u_debugreg[DR_STATUS] */
11#define DR_CONTROL 7 /* u_debugreg[DR_CONTROL] */
12
13/* Define a few things for the status register. We can use this to determine
14 which debugging register was responsible for the trap. The other bits
15 are either reserved or not of interest to us. */
16
17#define DR_TRAP0 (0x1) /* db0 */
18#define DR_TRAP1 (0x2) /* db1 */
19#define DR_TRAP2 (0x4) /* db2 */
20#define DR_TRAP3 (0x8) /* db3 */
21
22#define DR_STEP (0x4000) /* single-step */
23#define DR_SWITCH (0x8000) /* task switch */
24
25/* Now define a bunch of things for manipulating the control register.
26 The top two bytes of the control register consist of 4 fields of 4
27 bits - each field corresponds to one of the four debug registers,
28 and indicates what types of access we trap on, and how large the data
29 field is that we are looking at */
30
31#define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */
32#define DR_CONTROL_SIZE 4 /* 4 control bits per register */
33
34#define DR_RW_EXECUTE (0x0) /* Settings for the access types to trap on */
35#define DR_RW_WRITE (0x1)
36#define DR_RW_READ (0x3)
37
38#define DR_LEN_1 (0x0) /* Settings for data length to trap on */
39#define DR_LEN_2 (0x4)
40#define DR_LEN_4 (0xC)
41#define DR_LEN_8 (0x8)
42
43/* The low byte to the control register determine which registers are
44 enabled. There are 4 fields of two bits. One bit is "local", meaning
45 that the processor will reset the bit after a task switch and the other
46 is global meaning that we have to explicitly reset the bit. With linux,
47 you can use either one, since we explicitly zero the register when we enter
48 kernel mode. */
49
50#define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */
51#define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */
52#define DR_ENABLE_SIZE 2 /* 2 enable bits per register */
53
54#define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */
55#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */
56
57/* The second byte to the control register has a few special things.
58 We can slow the instruction pipeline for instructions coming via the
59 gdt or the ldt if we want to. I am not sure why this is an advantage */
60
61#define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00UL) /* Reserved */
62#define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */
63#define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */
64
65#endif
diff --git a/include/asm-x86/delay.h b/include/asm-x86/delay.h
index 10f2c71d622b..d11d47fc1a0e 100644
--- a/include/asm-x86/delay.h
+++ b/include/asm-x86/delay.h
@@ -1,5 +1,31 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_DELAY_H
2# include "delay_32.h" 2#define _ASM_X86_DELAY_H
3#else 3
4# include "delay_64.h" 4/*
5#endif 5 * Copyright (C) 1993 Linus Torvalds
6 *
7 * Delay routines calling functions in arch/x86/lib/delay.c
8 */
9
10/* Undefined functions to get compile-time errors */
11extern void __bad_udelay(void);
12extern void __bad_ndelay(void);
13
14extern void __udelay(unsigned long usecs);
15extern void __ndelay(unsigned long nsecs);
16extern void __const_udelay(unsigned long usecs);
17extern void __delay(unsigned long loops);
18
19/* 0x10c7 is 2**32 / 1000000 (rounded up) */
20#define udelay(n) (__builtin_constant_p(n) ? \
21 ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \
22 __udelay(n))
23
24/* 0x5 is 2**32 / 1000000000 (rounded up) */
25#define ndelay(n) (__builtin_constant_p(n) ? \
26 ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
27 __ndelay(n))
28
29void use_tsc_delay(void);
30
31#endif /* _ASM_X86_DELAY_H */
diff --git a/include/asm-x86/delay_32.h b/include/asm-x86/delay_32.h
deleted file mode 100644
index 9ae5e3782ed8..000000000000
--- a/include/asm-x86/delay_32.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef _I386_DELAY_H
2#define _I386_DELAY_H
3
4/*
5 * Copyright (C) 1993 Linus Torvalds
6 *
7 * Delay routines calling functions in arch/i386/lib/delay.c
8 */
9
10/* Undefined functions to get compile-time errors */
11extern void __bad_udelay(void);
12extern void __bad_ndelay(void);
13
14extern void __udelay(unsigned long usecs);
15extern void __ndelay(unsigned long nsecs);
16extern void __const_udelay(unsigned long usecs);
17extern void __delay(unsigned long loops);
18
19/* 0x10c7 is 2**32 / 1000000 (rounded up) */
20#define udelay(n) (__builtin_constant_p(n) ? \
21 ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \
22 __udelay(n))
23
24/* 0x5 is 2**32 / 1000000000 (rounded up) */
25#define ndelay(n) (__builtin_constant_p(n) ? \
26 ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
27 __ndelay(n))
28
29void use_tsc_delay(void);
30
31#endif /* defined(_I386_DELAY_H) */
diff --git a/include/asm-x86/delay_64.h b/include/asm-x86/delay_64.h
deleted file mode 100644
index c2669f1f5529..000000000000
--- a/include/asm-x86/delay_64.h
+++ /dev/null
@@ -1,30 +0,0 @@
1#ifndef _X8664_DELAY_H
2#define _X8664_DELAY_H
3
4/*
5 * Copyright (C) 1993 Linus Torvalds
6 *
7 * Delay routines calling functions in arch/x86_64/lib/delay.c
8 */
9
10/* Undefined functions to get compile-time errors */
11extern void __bad_udelay(void);
12extern void __bad_ndelay(void);
13
14extern void __udelay(unsigned long usecs);
15extern void __ndelay(unsigned long nsecs);
16extern void __const_udelay(unsigned long usecs);
17extern void __delay(unsigned long loops);
18
19/* 0x10c7 is 2**32 / 1000000 (rounded up) */
20#define udelay(n) (__builtin_constant_p(n) ? \
21 ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \
22 __udelay(n))
23
24/* 0x5 is 2**32 / 1000000000 (rounded up) */
25#define ndelay(n) (__builtin_constant_p(n) ? \
26 ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
27 __ndelay(n))
28
29
30#endif /* defined(_X8664_DELAY_H) */
diff --git a/include/asm-x86/device.h b/include/asm-x86/device.h
index e2bcf7c7dcee..d9ee5e52e91b 100644
--- a/include/asm-x86/device.h
+++ b/include/asm-x86/device.h
@@ -1,5 +1,10 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_DEVICE_H
2# include "device_32.h" 2#define _ASM_X86_DEVICE_H
3#else 3
4# include "device_64.h" 4struct dev_archdata {
5#ifdef CONFIG_ACPI
6 void *acpi_handle;
5#endif 7#endif
8};
9
10#endif /* _ASM_X86_DEVICE_H */
diff --git a/include/asm-x86/device_32.h b/include/asm-x86/device_32.h
deleted file mode 100644
index 849604c70e6b..000000000000
--- a/include/asm-x86/device_32.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#ifndef _ASM_I386_DEVICE_H
7#define _ASM_I386_DEVICE_H
8
9struct dev_archdata {
10#ifdef CONFIG_ACPI
11 void *acpi_handle;
12#endif
13};
14
15#endif /* _ASM_I386_DEVICE_H */
diff --git a/include/asm-x86/device_64.h b/include/asm-x86/device_64.h
deleted file mode 100644
index 3afa03f33a36..000000000000
--- a/include/asm-x86/device_64.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#ifndef _ASM_X86_64_DEVICE_H
7#define _ASM_X86_64_DEVICE_H
8
9struct dev_archdata {
10#ifdef CONFIG_ACPI
11 void *acpi_handle;
12#endif
13};
14
15#endif /* _ASM_X86_64_DEVICE_H */
diff --git a/include/asm-x86/dmi.h b/include/asm-x86/dmi.h
index c9e4e8ebc270..8e2b0e6aa8e7 100644
--- a/include/asm-x86/dmi.h
+++ b/include/asm-x86/dmi.h
@@ -1,5 +1,35 @@
1#ifndef _ASM_X86_DMI_H
2#define _ASM_X86_DMI_H
3
4#include <asm/io.h>
5
1#ifdef CONFIG_X86_32 6#ifdef CONFIG_X86_32
2# include "dmi_32.h" 7
3#else 8/* Use early IO mappings for DMI because it's initialized early */
4# include "dmi_64.h" 9#define dmi_ioremap bt_ioremap
10#define dmi_iounmap bt_iounmap
11#define dmi_alloc alloc_bootmem
12
13#else /* CONFIG_X86_32 */
14
15#define DMI_MAX_DATA 2048
16
17extern int dmi_alloc_index;
18extern char dmi_alloc_data[DMI_MAX_DATA];
19
20/* This is so early that there is no good way to allocate dynamic memory.
21 Allocate data in an BSS array. */
22static inline void *dmi_alloc(unsigned len)
23{
24 int idx = dmi_alloc_index;
25 if ((dmi_alloc_index += len) > DMI_MAX_DATA)
26 return NULL;
27 return dmi_alloc_data + idx;
28}
29
30#define dmi_ioremap early_ioremap
31#define dmi_iounmap early_iounmap
32
33#endif
34
5#endif 35#endif
diff --git a/include/asm-x86/dmi_32.h b/include/asm-x86/dmi_32.h
deleted file mode 100644
index 38d4eeb7fc7e..000000000000
--- a/include/asm-x86/dmi_32.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef _ASM_DMI_H
2#define _ASM_DMI_H 1
3
4#include <asm/io.h>
5
6/* Use early IO mappings for DMI because it's initialized early */
7#define dmi_ioremap bt_ioremap
8#define dmi_iounmap bt_iounmap
9#define dmi_alloc alloc_bootmem
10
11#endif
diff --git a/include/asm-x86/dmi_64.h b/include/asm-x86/dmi_64.h
deleted file mode 100644
index d02e32e3c3f0..000000000000
--- a/include/asm-x86/dmi_64.h
+++ /dev/null
@@ -1,24 +0,0 @@
1#ifndef _ASM_DMI_H
2#define _ASM_DMI_H 1
3
4#include <asm/io.h>
5
6#define DMI_MAX_DATA 2048
7
8extern int dmi_alloc_index;
9extern char dmi_alloc_data[DMI_MAX_DATA];
10
11/* This is so early that there is no good way to allocate dynamic memory.
12 Allocate data in an BSS array. */
13static inline void *dmi_alloc(unsigned len)
14{
15 int idx = dmi_alloc_index;
16 if ((dmi_alloc_index += len) > DMI_MAX_DATA)
17 return NULL;
18 return dmi_alloc_data + idx;
19}
20
21#define dmi_ioremap early_ioremap
22#define dmi_iounmap early_iounmap
23
24#endif
diff --git a/include/asm-x86/edac.h b/include/asm-x86/edac.h
index f8b888e140b0..cf3200a745ad 100644
--- a/include/asm-x86/edac.h
+++ b/include/asm-x86/edac.h
@@ -1,5 +1,18 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_EDAC_H
2# include "edac_32.h" 2#define _ASM_X86_EDAC_H
3#else 3
4# include "edac_64.h" 4/* ECC atomic, DMA, SMP and interrupt safe scrub function */
5
6static __inline__ void atomic_scrub(void *va, u32 size)
7{
8 u32 i, *virt_addr = va;
9
10 /*
11 * Very carefully read and write to memory atomically so we
12 * are interrupt, DMA and SMP safe.
13 */
14 for (i = 0; i < size / 4; i++, virt_addr++)
15 __asm__ __volatile__("lock; addl $0, %0"::"m"(*virt_addr));
16}
17
5#endif 18#endif
diff --git a/include/asm-x86/edac_32.h b/include/asm-x86/edac_32.h
deleted file mode 100644
index 3e7dd0ab68ce..000000000000
--- a/include/asm-x86/edac_32.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifndef ASM_EDAC_H
2#define ASM_EDAC_H
3
4/* ECC atomic, DMA, SMP and interrupt safe scrub function */
5
6static __inline__ void atomic_scrub(void *va, u32 size)
7{
8 unsigned long *virt_addr = va;
9 u32 i;
10
11 for (i = 0; i < size / 4; i++, virt_addr++)
12 /* Very carefully read and write to memory atomically
13 * so we are interrupt, DMA and SMP safe.
14 */
15 __asm__ __volatile__("lock; addl $0, %0"::"m"(*virt_addr));
16}
17
18#endif
diff --git a/include/asm-x86/edac_64.h b/include/asm-x86/edac_64.h
deleted file mode 100644
index cad1cd42b4ee..000000000000
--- a/include/asm-x86/edac_64.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifndef ASM_EDAC_H
2#define ASM_EDAC_H
3
4/* ECC atomic, DMA, SMP and interrupt safe scrub function */
5
6static __inline__ void atomic_scrub(void *va, u32 size)
7{
8 unsigned int *virt_addr = va;
9 u32 i;
10
11 for (i = 0; i < size / 4; i++, virt_addr++)
12 /* Very carefully read and write to memory atomically
13 * so we are interrupt, DMA and SMP safe.
14 */
15 __asm__ __volatile__("lock; addl $0, %0"::"m"(*virt_addr));
16}
17
18#endif
diff --git a/include/asm-x86/errno.h b/include/asm-x86/errno.h
index 9d511be8e573..4c82b503d92f 100644
--- a/include/asm-x86/errno.h
+++ b/include/asm-x86/errno.h
@@ -1,13 +1 @@
1#ifdef __KERNEL__ #include <asm-generic/errno.h>
2# ifdef CONFIG_X86_32
3# include "errno_32.h"
4# else
5# include "errno_64.h"
6# endif
7#else
8# ifdef __i386__
9# include "errno_32.h"
10# else
11# include "errno_64.h"
12# endif
13#endif
diff --git a/include/asm-x86/errno_32.h b/include/asm-x86/errno_32.h
deleted file mode 100644
index 969b34374728..000000000000
--- a/include/asm-x86/errno_32.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _I386_ERRNO_H
2#define _I386_ERRNO_H
3
4#include <asm-generic/errno.h>
5
6#endif
diff --git a/include/asm-x86/errno_64.h b/include/asm-x86/errno_64.h
deleted file mode 100644
index 311182129e32..000000000000
--- a/include/asm-x86/errno_64.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _X8664_ERRNO_H
2#define _X8664_ERRNO_H
3
4#include <asm-generic/errno.h>
5
6#endif
diff --git a/include/asm-x86/fb.h b/include/asm-x86/fb.h
index 238c7ca45877..53018464aea6 100644
--- a/include/asm-x86/fb.h
+++ b/include/asm-x86/fb.h
@@ -1,5 +1,21 @@
1#ifndef _ASM_X86_FB_H
2#define _ASM_X86_FB_H
3
4#include <linux/fb.h>
5#include <linux/fs.h>
6#include <asm/page.h>
7
8static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
9 unsigned long off)
10{
11 if (boot_cpu_data.x86 > 3)
12 pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
13}
14
1#ifdef CONFIG_X86_32 15#ifdef CONFIG_X86_32
2# include "fb_32.h" 16extern int fb_is_primary_device(struct fb_info *info);
3#else 17#else
4# include "fb_64.h" 18static inline int fb_is_primary_device(struct fb_info *info) { return 0; }
5#endif 19#endif
20
21#endif /* _ASM_X86_FB_H */
diff --git a/include/asm-x86/fb_32.h b/include/asm-x86/fb_32.h
deleted file mode 100644
index d1c6297d4a61..000000000000
--- a/include/asm-x86/fb_32.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_
3
4#include <linux/fb.h>
5#include <linux/fs.h>
6#include <asm/page.h>
7
8extern int fb_is_primary_device(struct fb_info *info);
9
10static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
11 unsigned long off)
12{
13 if (boot_cpu_data.x86 > 3)
14 pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
15}
16
17#endif /* _ASM_FB_H_ */
diff --git a/include/asm-x86/fb_64.h b/include/asm-x86/fb_64.h
deleted file mode 100644
index 60548e651d12..000000000000
--- a/include/asm-x86/fb_64.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_
3#include <linux/fb.h>
4#include <linux/fs.h>
5#include <asm/page.h>
6
7static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
8 unsigned long off)
9{
10 if (boot_cpu_data.x86 > 3)
11 pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
12}
13
14static inline int fb_is_primary_device(struct fb_info *info)
15{
16 return 0;
17}
18
19#endif /* _ASM_FB_H_ */
diff --git a/include/asm-x86/floppy.h b/include/asm-x86/floppy.h
index aecbb6dca21d..a48d7153c097 100644
--- a/include/asm-x86/floppy.h
+++ b/include/asm-x86/floppy.h
@@ -1,5 +1,278 @@
1#ifdef CONFIG_X86_32 1/*
2# include "floppy_32.h" 2 * Architecture specific parts of the Floppy driver
3#else 3 *
4# include "floppy_64.h" 4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1995
9 */
10#ifndef _ASM_X86_FLOPPY_H
11#define _ASM_X86_FLOPPY_H
12
13#include <linux/vmalloc.h>
14
15/*
16 * The DMA channel used by the floppy controller cannot access data at
17 * addresses >= 16MB
18 *
19 * Went back to the 1MB limit, as some people had problems with the floppy
20 * driver otherwise. It doesn't matter much for performance anyway, as most
21 * floppy accesses go through the track buffer.
22 */
23#define _CROSS_64KB(a,s,vdma) \
24(!(vdma) && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
25
26#define CROSS_64KB(a,s) _CROSS_64KB(a,s,use_virtual_dma & 1)
27
28
29#define SW fd_routine[use_virtual_dma&1]
30#define CSW fd_routine[can_use_virtual_dma & 1]
31
32
33#define fd_inb(port) inb_p(port)
34#define fd_outb(value,port) outb_p(value,port)
35
36#define fd_request_dma() CSW._request_dma(FLOPPY_DMA,"floppy")
37#define fd_free_dma() CSW._free_dma(FLOPPY_DMA)
38#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
39#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
40#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL)
41#define fd_get_dma_residue() SW._get_dma_residue(FLOPPY_DMA)
42#define fd_dma_mem_alloc(size) SW._dma_mem_alloc(size)
43#define fd_dma_setup(addr, size, mode, io) SW._dma_setup(addr, size, mode, io)
44
45#define FLOPPY_CAN_FALLBACK_ON_NODMA
46
47static int virtual_dma_count;
48static int virtual_dma_residue;
49static char *virtual_dma_addr;
50static int virtual_dma_mode;
51static int doing_pdma;
52
53static irqreturn_t floppy_hardint(int irq, void *dev_id)
54{
55 register unsigned char st;
56
57#undef TRACE_FLPY_INT
58
59#ifdef TRACE_FLPY_INT
60 static int calls=0;
61 static int bytes=0;
62 static int dma_wait=0;
5#endif 63#endif
64 if (!doing_pdma)
65 return floppy_interrupt(irq, dev_id);
66
67#ifdef TRACE_FLPY_INT
68 if(!calls)
69 bytes = virtual_dma_count;
70#endif
71
72 {
73 register int lcount;
74 register char *lptr;
75
76 st = 1;
77 for(lcount=virtual_dma_count, lptr=virtual_dma_addr;
78 lcount; lcount--, lptr++) {
79 st=inb(virtual_dma_port+4) & 0xa0 ;
80 if(st != 0xa0)
81 break;
82 if(virtual_dma_mode)
83 outb_p(*lptr, virtual_dma_port+5);
84 else
85 *lptr = inb_p(virtual_dma_port+5);
86 }
87 virtual_dma_count = lcount;
88 virtual_dma_addr = lptr;
89 st = inb(virtual_dma_port+4);
90 }
91
92#ifdef TRACE_FLPY_INT
93 calls++;
94#endif
95 if(st == 0x20)
96 return IRQ_HANDLED;
97 if(!(st & 0x20)) {
98 virtual_dma_residue += virtual_dma_count;
99 virtual_dma_count=0;
100#ifdef TRACE_FLPY_INT
101 printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n",
102 virtual_dma_count, virtual_dma_residue, calls, bytes,
103 dma_wait);
104 calls = 0;
105 dma_wait=0;
106#endif
107 doing_pdma = 0;
108 floppy_interrupt(irq, dev_id);
109 return IRQ_HANDLED;
110 }
111#ifdef TRACE_FLPY_INT
112 if(!virtual_dma_count)
113 dma_wait++;
114#endif
115 return IRQ_HANDLED;
116}
117
118static void fd_disable_dma(void)
119{
120 if(! (can_use_virtual_dma & 1))
121 disable_dma(FLOPPY_DMA);
122 doing_pdma = 0;
123 virtual_dma_residue += virtual_dma_count;
124 virtual_dma_count=0;
125}
126
127static int vdma_request_dma(unsigned int dmanr, const char * device_id)
128{
129 return 0;
130}
131
132static void vdma_nop(unsigned int dummy)
133{
134}
135
136
137static int vdma_get_dma_residue(unsigned int dummy)
138{
139 return virtual_dma_count + virtual_dma_residue;
140}
141
142
143static int fd_request_irq(void)
144{
145 if(can_use_virtual_dma)
146 return request_irq(FLOPPY_IRQ, floppy_hardint,
147 IRQF_DISABLED, "floppy", NULL);
148 else
149 return request_irq(FLOPPY_IRQ, floppy_interrupt,
150 IRQF_DISABLED, "floppy", NULL);
151}
152
153static unsigned long dma_mem_alloc(unsigned long size)
154{
155 return __get_dma_pages(GFP_KERNEL|__GFP_NORETRY,get_order(size));
156}
157
158
159static unsigned long vdma_mem_alloc(unsigned long size)
160{
161 return (unsigned long) vmalloc(size);
162
163}
164
165#define nodma_mem_alloc(size) vdma_mem_alloc(size)
166
167static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
168{
169 if((unsigned long) addr >= (unsigned long) high_memory)
170 vfree((void *)addr);
171 else
172 free_pages(addr, get_order(size));
173}
174
175#define fd_dma_mem_free(addr, size) _fd_dma_mem_free(addr, size)
176
177static void _fd_chose_dma_mode(char *addr, unsigned long size)
178{
179 if(can_use_virtual_dma == 2) {
180 if((unsigned long) addr >= (unsigned long) high_memory ||
181 isa_virt_to_bus(addr) >= 0x1000000 ||
182 _CROSS_64KB(addr, size, 0))
183 use_virtual_dma = 1;
184 else
185 use_virtual_dma = 0;
186 } else {
187 use_virtual_dma = can_use_virtual_dma & 1;
188 }
189}
190
191#define fd_chose_dma_mode(addr, size) _fd_chose_dma_mode(addr, size)
192
193
194static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
195{
196 doing_pdma = 1;
197 virtual_dma_port = io;
198 virtual_dma_mode = (mode == DMA_MODE_WRITE);
199 virtual_dma_addr = addr;
200 virtual_dma_count = size;
201 virtual_dma_residue = 0;
202 return 0;
203}
204
205static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
206{
207#ifdef FLOPPY_SANITY_CHECK
208 if (CROSS_64KB(addr, size)) {
209 printk("DMA crossing 64-K boundary %p-%p\n", addr, addr+size);
210 return -1;
211 }
212#endif
213 /* actual, physical DMA */
214 doing_pdma = 0;
215 clear_dma_ff(FLOPPY_DMA);
216 set_dma_mode(FLOPPY_DMA,mode);
217 set_dma_addr(FLOPPY_DMA,isa_virt_to_bus(addr));
218 set_dma_count(FLOPPY_DMA,size);
219 enable_dma(FLOPPY_DMA);
220 return 0;
221}
222
223static struct fd_routine_l {
224 int (*_request_dma)(unsigned int dmanr, const char * device_id);
225 void (*_free_dma)(unsigned int dmanr);
226 int (*_get_dma_residue)(unsigned int dummy);
227 unsigned long (*_dma_mem_alloc) (unsigned long size);
228 int (*_dma_setup)(char *addr, unsigned long size, int mode, int io);
229} fd_routine[] = {
230 {
231 request_dma,
232 free_dma,
233 get_dma_residue,
234 dma_mem_alloc,
235 hard_dma_setup
236 },
237 {
238 vdma_request_dma,
239 vdma_nop,
240 vdma_get_dma_residue,
241 vdma_mem_alloc,
242 vdma_dma_setup
243 }
244};
245
246
247static int FDC1 = 0x3f0;
248static int FDC2 = -1;
249
250/*
251 * Floppy types are stored in the rtc's CMOS RAM and so rtc_lock
252 * is needed to prevent corrupted CMOS RAM in case "insmod floppy"
253 * coincides with another rtc CMOS user. Paul G.
254 */
255#define FLOPPY0_TYPE ({ \
256 unsigned long flags; \
257 unsigned char val; \
258 spin_lock_irqsave(&rtc_lock, flags); \
259 val = (CMOS_READ(0x10) >> 4) & 15; \
260 spin_unlock_irqrestore(&rtc_lock, flags); \
261 val; \
262})
263
264#define FLOPPY1_TYPE ({ \
265 unsigned long flags; \
266 unsigned char val; \
267 spin_lock_irqsave(&rtc_lock, flags); \
268 val = CMOS_READ(0x10) & 15; \
269 spin_unlock_irqrestore(&rtc_lock, flags); \
270 val; \
271})
272
273#define N_FDC 2
274#define N_DRIVE 8
275
276#define EXTRA_FLOPPY_PARAMS
277
278#endif /* _ASM_X86_FLOPPY_H */
diff --git a/include/asm-x86/floppy_32.h b/include/asm-x86/floppy_32.h
deleted file mode 100644
index 99583b39d216..000000000000
--- a/include/asm-x86/floppy_32.h
+++ /dev/null
@@ -1,280 +0,0 @@
1/*
2 * Architecture specific parts of the Floppy driver
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1995
9 */
10#ifndef __ASM_I386_FLOPPY_H
11#define __ASM_I386_FLOPPY_H
12
13#include <linux/vmalloc.h>
14
15
16/*
17 * The DMA channel used by the floppy controller cannot access data at
18 * addresses >= 16MB
19 *
20 * Went back to the 1MB limit, as some people had problems with the floppy
21 * driver otherwise. It doesn't matter much for performance anyway, as most
22 * floppy accesses go through the track buffer.
23 */
24#define _CROSS_64KB(a,s,vdma) \
25(!(vdma) && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
26
27#define CROSS_64KB(a,s) _CROSS_64KB(a,s,use_virtual_dma & 1)
28
29
30#define SW fd_routine[use_virtual_dma&1]
31#define CSW fd_routine[can_use_virtual_dma & 1]
32
33
34#define fd_inb(port) inb_p(port)
35#define fd_outb(value,port) outb_p(value,port)
36
37#define fd_request_dma() CSW._request_dma(FLOPPY_DMA,"floppy")
38#define fd_free_dma() CSW._free_dma(FLOPPY_DMA)
39#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
40#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
41#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL)
42#define fd_get_dma_residue() SW._get_dma_residue(FLOPPY_DMA)
43#define fd_dma_mem_alloc(size) SW._dma_mem_alloc(size)
44#define fd_dma_setup(addr, size, mode, io) SW._dma_setup(addr, size, mode, io)
45
46#define FLOPPY_CAN_FALLBACK_ON_NODMA
47
48static int virtual_dma_count;
49static int virtual_dma_residue;
50static char *virtual_dma_addr;
51static int virtual_dma_mode;
52static int doing_pdma;
53
54static irqreturn_t floppy_hardint(int irq, void *dev_id)
55{
56 register unsigned char st;
57
58#undef TRACE_FLPY_INT
59
60#ifdef TRACE_FLPY_INT
61 static int calls=0;
62 static int bytes=0;
63 static int dma_wait=0;
64#endif
65 if (!doing_pdma)
66 return floppy_interrupt(irq, dev_id);
67
68#ifdef TRACE_FLPY_INT
69 if(!calls)
70 bytes = virtual_dma_count;
71#endif
72
73 {
74 register int lcount;
75 register char *lptr;
76
77 st = 1;
78 for(lcount=virtual_dma_count, lptr=virtual_dma_addr;
79 lcount; lcount--, lptr++) {
80 st=inb(virtual_dma_port+4) & 0xa0 ;
81 if(st != 0xa0)
82 break;
83 if(virtual_dma_mode)
84 outb_p(*lptr, virtual_dma_port+5);
85 else
86 *lptr = inb_p(virtual_dma_port+5);
87 }
88 virtual_dma_count = lcount;
89 virtual_dma_addr = lptr;
90 st = inb(virtual_dma_port+4);
91 }
92
93#ifdef TRACE_FLPY_INT
94 calls++;
95#endif
96 if(st == 0x20)
97 return IRQ_HANDLED;
98 if(!(st & 0x20)) {
99 virtual_dma_residue += virtual_dma_count;
100 virtual_dma_count=0;
101#ifdef TRACE_FLPY_INT
102 printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n",
103 virtual_dma_count, virtual_dma_residue, calls, bytes,
104 dma_wait);
105 calls = 0;
106 dma_wait=0;
107#endif
108 doing_pdma = 0;
109 floppy_interrupt(irq, dev_id);
110 return IRQ_HANDLED;
111 }
112#ifdef TRACE_FLPY_INT
113 if(!virtual_dma_count)
114 dma_wait++;
115#endif
116 return IRQ_HANDLED;
117}
118
119static void fd_disable_dma(void)
120{
121 if(! (can_use_virtual_dma & 1))
122 disable_dma(FLOPPY_DMA);
123 doing_pdma = 0;
124 virtual_dma_residue += virtual_dma_count;
125 virtual_dma_count=0;
126}
127
128static int vdma_request_dma(unsigned int dmanr, const char * device_id)
129{
130 return 0;
131}
132
133static void vdma_nop(unsigned int dummy)
134{
135}
136
137
138static int vdma_get_dma_residue(unsigned int dummy)
139{
140 return virtual_dma_count + virtual_dma_residue;
141}
142
143
144static int fd_request_irq(void)
145{
146 if(can_use_virtual_dma)
147 return request_irq(FLOPPY_IRQ, floppy_hardint,
148 IRQF_DISABLED, "floppy", NULL);
149 else
150 return request_irq(FLOPPY_IRQ, floppy_interrupt,
151 IRQF_DISABLED, "floppy", NULL);
152
153}
154
155static unsigned long dma_mem_alloc(unsigned long size)
156{
157 return __get_dma_pages(GFP_KERNEL,get_order(size));
158}
159
160
161static unsigned long vdma_mem_alloc(unsigned long size)
162{
163 return (unsigned long) vmalloc(size);
164
165}
166
167#define nodma_mem_alloc(size) vdma_mem_alloc(size)
168
169static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
170{
171 if((unsigned int) addr >= (unsigned int) high_memory)
172 vfree((void *)addr);
173 else
174 free_pages(addr, get_order(size));
175}
176
177#define fd_dma_mem_free(addr, size) _fd_dma_mem_free(addr, size)
178
179static void _fd_chose_dma_mode(char *addr, unsigned long size)
180{
181 if(can_use_virtual_dma == 2) {
182 if((unsigned int) addr >= (unsigned int) high_memory ||
183 isa_virt_to_bus(addr) >= 0x1000000 ||
184 _CROSS_64KB(addr, size, 0))
185 use_virtual_dma = 1;
186 else
187 use_virtual_dma = 0;
188 } else {
189 use_virtual_dma = can_use_virtual_dma & 1;
190 }
191}
192
193#define fd_chose_dma_mode(addr, size) _fd_chose_dma_mode(addr, size)
194
195
196static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
197{
198 doing_pdma = 1;
199 virtual_dma_port = io;
200 virtual_dma_mode = (mode == DMA_MODE_WRITE);
201 virtual_dma_addr = addr;
202 virtual_dma_count = size;
203 virtual_dma_residue = 0;
204 return 0;
205}
206
207static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
208{
209#ifdef FLOPPY_SANITY_CHECK
210 if (CROSS_64KB(addr, size)) {
211 printk("DMA crossing 64-K boundary %p-%p\n", addr, addr+size);
212 return -1;
213 }
214#endif
215 /* actual, physical DMA */
216 doing_pdma = 0;
217 clear_dma_ff(FLOPPY_DMA);
218 set_dma_mode(FLOPPY_DMA,mode);
219 set_dma_addr(FLOPPY_DMA,isa_virt_to_bus(addr));
220 set_dma_count(FLOPPY_DMA,size);
221 enable_dma(FLOPPY_DMA);
222 return 0;
223}
224
225static struct fd_routine_l {
226 int (*_request_dma)(unsigned int dmanr, const char * device_id);
227 void (*_free_dma)(unsigned int dmanr);
228 int (*_get_dma_residue)(unsigned int dummy);
229 unsigned long (*_dma_mem_alloc) (unsigned long size);
230 int (*_dma_setup)(char *addr, unsigned long size, int mode, int io);
231} fd_routine[] = {
232 {
233 request_dma,
234 free_dma,
235 get_dma_residue,
236 dma_mem_alloc,
237 hard_dma_setup
238 },
239 {
240 vdma_request_dma,
241 vdma_nop,
242 vdma_get_dma_residue,
243 vdma_mem_alloc,
244 vdma_dma_setup
245 }
246};
247
248
249static int FDC1 = 0x3f0;
250static int FDC2 = -1;
251
252/*
253 * Floppy types are stored in the rtc's CMOS RAM and so rtc_lock
254 * is needed to prevent corrupted CMOS RAM in case "insmod floppy"
255 * coincides with another rtc CMOS user. Paul G.
256 */
257#define FLOPPY0_TYPE ({ \
258 unsigned long flags; \
259 unsigned char val; \
260 spin_lock_irqsave(&rtc_lock, flags); \
261 val = (CMOS_READ(0x10) >> 4) & 15; \
262 spin_unlock_irqrestore(&rtc_lock, flags); \
263 val; \
264})
265
266#define FLOPPY1_TYPE ({ \
267 unsigned long flags; \
268 unsigned char val; \
269 spin_lock_irqsave(&rtc_lock, flags); \
270 val = CMOS_READ(0x10) & 15; \
271 spin_unlock_irqrestore(&rtc_lock, flags); \
272 val; \
273})
274
275#define N_FDC 2
276#define N_DRIVE 8
277
278#define EXTRA_FLOPPY_PARAMS
279
280#endif /* __ASM_I386_FLOPPY_H */
diff --git a/include/asm-x86/floppy_64.h b/include/asm-x86/floppy_64.h
deleted file mode 100644
index d993380dcb47..000000000000
--- a/include/asm-x86/floppy_64.h
+++ /dev/null
@@ -1,279 +0,0 @@
1/*
2 * Architecture specific parts of the Floppy driver
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1995
9 */
10#ifndef __ASM_X86_64_FLOPPY_H
11#define __ASM_X86_64_FLOPPY_H
12
13#include <linux/vmalloc.h>
14
15
16/*
17 * The DMA channel used by the floppy controller cannot access data at
18 * addresses >= 16MB
19 *
20 * Went back to the 1MB limit, as some people had problems with the floppy
21 * driver otherwise. It doesn't matter much for performance anyway, as most
22 * floppy accesses go through the track buffer.
23 */
24#define _CROSS_64KB(a,s,vdma) \
25(!(vdma) && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
26
27#define CROSS_64KB(a,s) _CROSS_64KB(a,s,use_virtual_dma & 1)
28
29
30#define SW fd_routine[use_virtual_dma&1]
31#define CSW fd_routine[can_use_virtual_dma & 1]
32
33
34#define fd_inb(port) inb_p(port)
35#define fd_outb(value,port) outb_p(value,port)
36
37#define fd_request_dma() CSW._request_dma(FLOPPY_DMA,"floppy")
38#define fd_free_dma() CSW._free_dma(FLOPPY_DMA)
39#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
40#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
41#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL)
42#define fd_get_dma_residue() SW._get_dma_residue(FLOPPY_DMA)
43#define fd_dma_mem_alloc(size) SW._dma_mem_alloc(size)
44#define fd_dma_setup(addr, size, mode, io) SW._dma_setup(addr, size, mode, io)
45
46#define FLOPPY_CAN_FALLBACK_ON_NODMA
47
48static int virtual_dma_count;
49static int virtual_dma_residue;
50static char *virtual_dma_addr;
51static int virtual_dma_mode;
52static int doing_pdma;
53
54static irqreturn_t floppy_hardint(int irq, void *dev_id)
55{
56 register unsigned char st;
57
58#undef TRACE_FLPY_INT
59
60#ifdef TRACE_FLPY_INT
61 static int calls=0;
62 static int bytes=0;
63 static int dma_wait=0;
64#endif
65 if (!doing_pdma)
66 return floppy_interrupt(irq, dev_id);
67
68#ifdef TRACE_FLPY_INT
69 if(!calls)
70 bytes = virtual_dma_count;
71#endif
72
73 {
74 register int lcount;
75 register char *lptr;
76
77 st = 1;
78 for(lcount=virtual_dma_count, lptr=virtual_dma_addr;
79 lcount; lcount--, lptr++) {
80 st=inb(virtual_dma_port+4) & 0xa0 ;
81 if(st != 0xa0)
82 break;
83 if(virtual_dma_mode)
84 outb_p(*lptr, virtual_dma_port+5);
85 else
86 *lptr = inb_p(virtual_dma_port+5);
87 }
88 virtual_dma_count = lcount;
89 virtual_dma_addr = lptr;
90 st = inb(virtual_dma_port+4);
91 }
92
93#ifdef TRACE_FLPY_INT
94 calls++;
95#endif
96 if(st == 0x20)
97 return IRQ_HANDLED;
98 if(!(st & 0x20)) {
99 virtual_dma_residue += virtual_dma_count;
100 virtual_dma_count=0;
101#ifdef TRACE_FLPY_INT
102 printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n",
103 virtual_dma_count, virtual_dma_residue, calls, bytes,
104 dma_wait);
105 calls = 0;
106 dma_wait=0;
107#endif
108 doing_pdma = 0;
109 floppy_interrupt(irq, dev_id);
110 return IRQ_HANDLED;
111 }
112#ifdef TRACE_FLPY_INT
113 if(!virtual_dma_count)
114 dma_wait++;
115#endif
116 return IRQ_HANDLED;
117}
118
119static void fd_disable_dma(void)
120{
121 if(! (can_use_virtual_dma & 1))
122 disable_dma(FLOPPY_DMA);
123 doing_pdma = 0;
124 virtual_dma_residue += virtual_dma_count;
125 virtual_dma_count=0;
126}
127
128static int vdma_request_dma(unsigned int dmanr, const char * device_id)
129{
130 return 0;
131}
132
133static void vdma_nop(unsigned int dummy)
134{
135}
136
137
138static int vdma_get_dma_residue(unsigned int dummy)
139{
140 return virtual_dma_count + virtual_dma_residue;
141}
142
143
144static int fd_request_irq(void)
145{
146 if(can_use_virtual_dma)
147 return request_irq(FLOPPY_IRQ, floppy_hardint,
148 IRQF_DISABLED, "floppy", NULL);
149 else
150 return request_irq(FLOPPY_IRQ, floppy_interrupt,
151 IRQF_DISABLED, "floppy", NULL);
152}
153
154static unsigned long dma_mem_alloc(unsigned long size)
155{
156 return __get_dma_pages(GFP_KERNEL|__GFP_NORETRY,get_order(size));
157}
158
159
160static unsigned long vdma_mem_alloc(unsigned long size)
161{
162 return (unsigned long) vmalloc(size);
163
164}
165
166#define nodma_mem_alloc(size) vdma_mem_alloc(size)
167
168static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
169{
170 if((unsigned long) addr >= (unsigned long) high_memory)
171 vfree((void *)addr);
172 else
173 free_pages(addr, get_order(size));
174}
175
176#define fd_dma_mem_free(addr, size) _fd_dma_mem_free(addr, size)
177
178static void _fd_chose_dma_mode(char *addr, unsigned long size)
179{
180 if(can_use_virtual_dma == 2) {
181 if((unsigned long) addr >= (unsigned long) high_memory ||
182 isa_virt_to_bus(addr) >= 0x1000000 ||
183 _CROSS_64KB(addr, size, 0))
184 use_virtual_dma = 1;
185 else
186 use_virtual_dma = 0;
187 } else {
188 use_virtual_dma = can_use_virtual_dma & 1;
189 }
190}
191
192#define fd_chose_dma_mode(addr, size) _fd_chose_dma_mode(addr, size)
193
194
195static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
196{
197 doing_pdma = 1;
198 virtual_dma_port = io;
199 virtual_dma_mode = (mode == DMA_MODE_WRITE);
200 virtual_dma_addr = addr;
201 virtual_dma_count = size;
202 virtual_dma_residue = 0;
203 return 0;
204}
205
206static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
207{
208#ifdef FLOPPY_SANITY_CHECK
209 if (CROSS_64KB(addr, size)) {
210 printk("DMA crossing 64-K boundary %p-%p\n", addr, addr+size);
211 return -1;
212 }
213#endif
214 /* actual, physical DMA */
215 doing_pdma = 0;
216 clear_dma_ff(FLOPPY_DMA);
217 set_dma_mode(FLOPPY_DMA,mode);
218 set_dma_addr(FLOPPY_DMA,isa_virt_to_bus(addr));
219 set_dma_count(FLOPPY_DMA,size);
220 enable_dma(FLOPPY_DMA);
221 return 0;
222}
223
224static struct fd_routine_l {
225 int (*_request_dma)(unsigned int dmanr, const char * device_id);
226 void (*_free_dma)(unsigned int dmanr);
227 int (*_get_dma_residue)(unsigned int dummy);
228 unsigned long (*_dma_mem_alloc) (unsigned long size);
229 int (*_dma_setup)(char *addr, unsigned long size, int mode, int io);
230} fd_routine[] = {
231 {
232 request_dma,
233 free_dma,
234 get_dma_residue,
235 dma_mem_alloc,
236 hard_dma_setup
237 },
238 {
239 vdma_request_dma,
240 vdma_nop,
241 vdma_get_dma_residue,
242 vdma_mem_alloc,
243 vdma_dma_setup
244 }
245};
246
247
248static int FDC1 = 0x3f0;
249static int FDC2 = -1;
250
251/*
252 * Floppy types are stored in the rtc's CMOS RAM and so rtc_lock
253 * is needed to prevent corrupted CMOS RAM in case "insmod floppy"
254 * coincides with another rtc CMOS user. Paul G.
255 */
256#define FLOPPY0_TYPE ({ \
257 unsigned long flags; \
258 unsigned char val; \
259 spin_lock_irqsave(&rtc_lock, flags); \
260 val = (CMOS_READ(0x10) >> 4) & 15; \
261 spin_unlock_irqrestore(&rtc_lock, flags); \
262 val; \
263})
264
265#define FLOPPY1_TYPE ({ \
266 unsigned long flags; \
267 unsigned char val; \
268 spin_lock_irqsave(&rtc_lock, flags); \
269 val = CMOS_READ(0x10) & 15; \
270 spin_unlock_irqrestore(&rtc_lock, flags); \
271 val; \
272})
273
274#define N_FDC 2
275#define N_DRIVE 8
276
277#define EXTRA_FLOPPY_PARAMS
278
279#endif /* __ASM_X86_64_FLOPPY_H */
diff --git a/include/asm-x86/frame.i b/include/asm-x86/frame.h
index 03620251ae17..06850a7194e1 100644
--- a/include/asm-x86/frame.i
+++ b/include/asm-x86/frame.h
@@ -1,3 +1,5 @@
1#ifdef __ASSEMBLY__
2
1#include <asm/dwarf2.h> 3#include <asm/dwarf2.h>
2 4
3/* The annotation hides the frame from the unwinder and makes it look 5/* The annotation hides the frame from the unwinder and makes it look
@@ -21,3 +23,5 @@
21 .macro ENDFRAME 23 .macro ENDFRAME
22 .endm 24 .endm
23#endif 25#endif
26
27#endif /* __ASSEMBLY__ */
diff --git a/include/asm-x86/hardirq_32.h b/include/asm-x86/hardirq_32.h
index 34649585bb59..4f85f0f4b563 100644
--- a/include/asm-x86/hardirq_32.h
+++ b/include/asm-x86/hardirq_32.h
@@ -10,10 +10,14 @@ typedef struct {
10 unsigned int __nmi_count; /* arch dependent */ 10 unsigned int __nmi_count; /* arch dependent */
11 unsigned int apic_timer_irqs; /* arch dependent */ 11 unsigned int apic_timer_irqs; /* arch dependent */
12 unsigned int irq0_irqs; 12 unsigned int irq0_irqs;
13 unsigned int irq_resched_count;
14 unsigned int irq_call_count;
15 unsigned int irq_tlb_count;
16 unsigned int irq_thermal_count;
17 unsigned int irq_spurious_count;
13} ____cacheline_aligned irq_cpustat_t; 18} ____cacheline_aligned irq_cpustat_t;
14 19
15DECLARE_PER_CPU(irq_cpustat_t, irq_stat); 20DECLARE_PER_CPU(irq_cpustat_t, irq_stat);
16extern irq_cpustat_t irq_stat[];
17 21
18#define __ARCH_IRQ_STAT 22#define __ARCH_IRQ_STAT
19#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat, cpu).member) 23#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat, cpu).member)
diff --git a/include/asm-x86/hw_irq_64.h b/include/asm-x86/hw_irq_64.h
index 09dfc18a6dd0..a470d59da678 100644
--- a/include/asm-x86/hw_irq_64.h
+++ b/include/asm-x86/hw_irq_64.h
@@ -40,22 +40,22 @@
40/* 40/*
41 * Vectors 0x30-0x3f are used for ISA interrupts. 41 * Vectors 0x30-0x3f are used for ISA interrupts.
42 */ 42 */
43#define IRQ0_VECTOR FIRST_EXTERNAL_VECTOR + 0x10 43#define IRQ0_VECTOR (FIRST_EXTERNAL_VECTOR + 0x10)
44#define IRQ1_VECTOR IRQ0_VECTOR + 1 44#define IRQ1_VECTOR (IRQ0_VECTOR + 1)
45#define IRQ2_VECTOR IRQ0_VECTOR + 2 45#define IRQ2_VECTOR (IRQ0_VECTOR + 2)
46#define IRQ3_VECTOR IRQ0_VECTOR + 3 46#define IRQ3_VECTOR (IRQ0_VECTOR + 3)
47#define IRQ4_VECTOR IRQ0_VECTOR + 4 47#define IRQ4_VECTOR (IRQ0_VECTOR + 4)
48#define IRQ5_VECTOR IRQ0_VECTOR + 5 48#define IRQ5_VECTOR (IRQ0_VECTOR + 5)
49#define IRQ6_VECTOR IRQ0_VECTOR + 6 49#define IRQ6_VECTOR (IRQ0_VECTOR + 6)
50#define IRQ7_VECTOR IRQ0_VECTOR + 7 50#define IRQ7_VECTOR (IRQ0_VECTOR + 7)
51#define IRQ8_VECTOR IRQ0_VECTOR + 8 51#define IRQ8_VECTOR (IRQ0_VECTOR + 8)
52#define IRQ9_VECTOR IRQ0_VECTOR + 9 52#define IRQ9_VECTOR (IRQ0_VECTOR + 9)
53#define IRQ10_VECTOR IRQ0_VECTOR + 10 53#define IRQ10_VECTOR (IRQ0_VECTOR + 10)
54#define IRQ11_VECTOR IRQ0_VECTOR + 11 54#define IRQ11_VECTOR (IRQ0_VECTOR + 11)
55#define IRQ12_VECTOR IRQ0_VECTOR + 12 55#define IRQ12_VECTOR (IRQ0_VECTOR + 12)
56#define IRQ13_VECTOR IRQ0_VECTOR + 13 56#define IRQ13_VECTOR (IRQ0_VECTOR + 13)
57#define IRQ14_VECTOR IRQ0_VECTOR + 14 57#define IRQ14_VECTOR (IRQ0_VECTOR + 14)
58#define IRQ15_VECTOR IRQ0_VECTOR + 15 58#define IRQ15_VECTOR (IRQ0_VECTOR + 15)
59 59
60/* 60/*
61 * Special IRQ vectors used by the SMP architecture, 0xf0-0xff 61 * Special IRQ vectors used by the SMP architecture, 0xf0-0xff
@@ -148,9 +148,6 @@ extern atomic_t irq_mis_count;
148 148
149#define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs)) 149#define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs))
150 150
151#define __STR(x) #x
152#define STR(x) __STR(x)
153
154#include <asm/ptrace.h> 151#include <asm/ptrace.h>
155 152
156#define IRQ_NAME2(nr) nr##_interrupt(void) 153#define IRQ_NAME2(nr) nr##_interrupt(void)
diff --git a/include/asm-x86/intel_arch_perfmon.h b/include/asm-x86/intel_arch_perfmon.h
index 4f6d4e6bf57e..fa0fd068bc2e 100644
--- a/include/asm-x86/intel_arch_perfmon.h
+++ b/include/asm-x86/intel_arch_perfmon.h
@@ -1,5 +1,31 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_INTEL_ARCH_PERFMON_H
2# include "intel_arch_perfmon_32.h" 2#define _ASM_X86_INTEL_ARCH_PERFMON_H
3#else 3
4# include "intel_arch_perfmon_64.h" 4#define MSR_ARCH_PERFMON_PERFCTR0 0xc1
5#endif 5#define MSR_ARCH_PERFMON_PERFCTR1 0xc2
6
7#define MSR_ARCH_PERFMON_EVENTSEL0 0x186
8#define MSR_ARCH_PERFMON_EVENTSEL1 0x187
9
10#define ARCH_PERFMON_EVENTSEL0_ENABLE (1 << 22)
11#define ARCH_PERFMON_EVENTSEL_INT (1 << 20)
12#define ARCH_PERFMON_EVENTSEL_OS (1 << 17)
13#define ARCH_PERFMON_EVENTSEL_USR (1 << 16)
14
15#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL (0x3c)
16#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8)
17#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_INDEX (0)
18#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT \
19 (1 << (ARCH_PERFMON_UNHALTED_CORE_CYCLES_INDEX))
20
21union cpuid10_eax {
22 struct {
23 unsigned int version_id:8;
24 unsigned int num_counters:8;
25 unsigned int bit_width:8;
26 unsigned int mask_length:8;
27 } split;
28 unsigned int full;
29};
30
31#endif /* _ASM_X86_INTEL_ARCH_PERFMON_H */
diff --git a/include/asm-x86/intel_arch_perfmon_32.h b/include/asm-x86/intel_arch_perfmon_32.h
deleted file mode 100644
index b52cd60a075b..000000000000
--- a/include/asm-x86/intel_arch_perfmon_32.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef X86_INTEL_ARCH_PERFMON_H
2#define X86_INTEL_ARCH_PERFMON_H 1
3
4#define MSR_ARCH_PERFMON_PERFCTR0 0xc1
5#define MSR_ARCH_PERFMON_PERFCTR1 0xc2
6
7#define MSR_ARCH_PERFMON_EVENTSEL0 0x186
8#define MSR_ARCH_PERFMON_EVENTSEL1 0x187
9
10#define ARCH_PERFMON_EVENTSEL0_ENABLE (1 << 22)
11#define ARCH_PERFMON_EVENTSEL_INT (1 << 20)
12#define ARCH_PERFMON_EVENTSEL_OS (1 << 17)
13#define ARCH_PERFMON_EVENTSEL_USR (1 << 16)
14
15#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL (0x3c)
16#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8)
17#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_INDEX (0)
18#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT \
19 (1 << (ARCH_PERFMON_UNHALTED_CORE_CYCLES_INDEX))
20
21union cpuid10_eax {
22 struct {
23 unsigned int version_id:8;
24 unsigned int num_counters:8;
25 unsigned int bit_width:8;
26 unsigned int mask_length:8;
27 } split;
28 unsigned int full;
29};
30
31#endif /* X86_INTEL_ARCH_PERFMON_H */
diff --git a/include/asm-x86/intel_arch_perfmon_64.h b/include/asm-x86/intel_arch_perfmon_64.h
deleted file mode 100644
index 8633331420ec..000000000000
--- a/include/asm-x86/intel_arch_perfmon_64.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef X86_64_INTEL_ARCH_PERFMON_H
2#define X86_64_INTEL_ARCH_PERFMON_H 1
3
4#define MSR_ARCH_PERFMON_PERFCTR0 0xc1
5#define MSR_ARCH_PERFMON_PERFCTR1 0xc2
6
7#define MSR_ARCH_PERFMON_EVENTSEL0 0x186
8#define MSR_ARCH_PERFMON_EVENTSEL1 0x187
9
10#define ARCH_PERFMON_EVENTSEL0_ENABLE (1 << 22)
11#define ARCH_PERFMON_EVENTSEL_INT (1 << 20)
12#define ARCH_PERFMON_EVENTSEL_OS (1 << 17)
13#define ARCH_PERFMON_EVENTSEL_USR (1 << 16)
14
15#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL (0x3c)
16#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8)
17#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_INDEX (0)
18#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT \
19 (1 << (ARCH_PERFMON_UNHALTED_CORE_CYCLES_INDEX))
20
21union cpuid10_eax {
22 struct {
23 unsigned int version_id:8;
24 unsigned int num_counters:8;
25 unsigned int bit_width:8;
26 unsigned int mask_length:8;
27 } split;
28 unsigned int full;
29};
30
31#endif /* X86_64_INTEL_ARCH_PERFMON_H */
diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h
index 4ea7b1ad3c1d..fe881cd1e6f4 100644
--- a/include/asm-x86/io_32.h
+++ b/include/asm-x86/io_32.h
@@ -199,17 +199,22 @@ static inline void writel(unsigned int b, volatile void __iomem *addr)
199 199
200#define mmiowb() 200#define mmiowb()
201 201
202static inline void memset_io(volatile void __iomem *addr, unsigned char val, int count) 202static inline void
203memset_io(volatile void __iomem *addr, unsigned char val, int count)
203{ 204{
204 memset((void __force *) addr, val, count); 205 memset((void __force *)addr, val, count);
205} 206}
206static inline void memcpy_fromio(void *dst, const volatile void __iomem *src, int count) 207
208static inline void
209memcpy_fromio(void *dst, const volatile void __iomem *src, int count)
207{ 210{
208 __memcpy(dst, (void __force *) src, count); 211 __memcpy(dst, (const void __force *)src, count);
209} 212}
210static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int count) 213
214static inline void
215memcpy_toio(volatile void __iomem *dst, const void *src, int count)
211{ 216{
212 __memcpy((void __force *) dst, src, count); 217 __memcpy((void __force *)dst, src, count);
213} 218}
214 219
215/* 220/*
diff --git a/include/asm-x86/ioctls.h b/include/asm-x86/ioctls.h
index 1e0fd48f18bc..93c894dc5154 100644
--- a/include/asm-x86/ioctls.h
+++ b/include/asm-x86/ioctls.h
@@ -1,13 +1,87 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_IOCTLS_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_IOCTLS_H
3# include "ioctls_32.h" 3
4# else 4#include <asm/ioctl.h>
5# include "ioctls_64.h" 5
6# endif 6/* 0x54 is just a magic number to make these relatively unique ('T') */
7#else 7
8# ifdef __i386__ 8#define TCGETS 0x5401
9# include "ioctls_32.h" 9#define TCSETS 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */
10# else 10#define TCSETSW 0x5403
11# include "ioctls_64.h" 11#define TCSETSF 0x5404
12# endif 12#define TCGETA 0x5405
13#define TCSETA 0x5406
14#define TCSETAW 0x5407
15#define TCSETAF 0x5408
16#define TCSBRK 0x5409
17#define TCXONC 0x540A
18#define TCFLSH 0x540B
19#define TIOCEXCL 0x540C
20#define TIOCNXCL 0x540D
21#define TIOCSCTTY 0x540E
22#define TIOCGPGRP 0x540F
23#define TIOCSPGRP 0x5410
24#define TIOCOUTQ 0x5411
25#define TIOCSTI 0x5412
26#define TIOCGWINSZ 0x5413
27#define TIOCSWINSZ 0x5414
28#define TIOCMGET 0x5415
29#define TIOCMBIS 0x5416
30#define TIOCMBIC 0x5417
31#define TIOCMSET 0x5418
32#define TIOCGSOFTCAR 0x5419
33#define TIOCSSOFTCAR 0x541A
34#define FIONREAD 0x541B
35#define TIOCINQ FIONREAD
36#define TIOCLINUX 0x541C
37#define TIOCCONS 0x541D
38#define TIOCGSERIAL 0x541E
39#define TIOCSSERIAL 0x541F
40#define TIOCPKT 0x5420
41#define FIONBIO 0x5421
42#define TIOCNOTTY 0x5422
43#define TIOCSETD 0x5423
44#define TIOCGETD 0x5424
45#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
46/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */
47#define TIOCSBRK 0x5427 /* BSD compatibility */
48#define TIOCCBRK 0x5428 /* BSD compatibility */
49#define TIOCGSID 0x5429 /* Return the session ID of FD */
50#define TCGETS2 _IOR('T',0x2A, struct termios2)
51#define TCSETS2 _IOW('T',0x2B, struct termios2)
52#define TCSETSW2 _IOW('T',0x2C, struct termios2)
53#define TCSETSF2 _IOW('T',0x2D, struct termios2)
54#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
55#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
56
57#define FIONCLEX 0x5450
58#define FIOCLEX 0x5451
59#define FIOASYNC 0x5452
60#define TIOCSERCONFIG 0x5453
61#define TIOCSERGWILD 0x5454
62#define TIOCSERSWILD 0x5455
63#define TIOCGLCKTRMIOS 0x5456
64#define TIOCSLCKTRMIOS 0x5457
65#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
66#define TIOCSERGETLSR 0x5459 /* Get line status register */
67#define TIOCSERGETMULTI 0x545A /* Get multiport config */
68#define TIOCSERSETMULTI 0x545B /* Set multiport config */
69
70#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
71#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
72#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */
73#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */
74#define FIOQSIZE 0x5460
75
76/* Used for packet mode */
77#define TIOCPKT_DATA 0
78#define TIOCPKT_FLUSHREAD 1
79#define TIOCPKT_FLUSHWRITE 2
80#define TIOCPKT_STOP 4
81#define TIOCPKT_START 8
82#define TIOCPKT_NOSTOP 16
83#define TIOCPKT_DOSTOP 32
84
85#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
86
13#endif 87#endif
diff --git a/include/asm-x86/ioctls_32.h b/include/asm-x86/ioctls_32.h
deleted file mode 100644
index ef5878762dc9..000000000000
--- a/include/asm-x86/ioctls_32.h
+++ /dev/null
@@ -1,87 +0,0 @@
1#ifndef __ARCH_I386_IOCTLS_H__
2#define __ARCH_I386_IOCTLS_H__
3
4#include <asm/ioctl.h>
5
6/* 0x54 is just a magic number to make these relatively unique ('T') */
7
8#define TCGETS 0x5401
9#define TCSETS 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */
10#define TCSETSW 0x5403
11#define TCSETSF 0x5404
12#define TCGETA 0x5405
13#define TCSETA 0x5406
14#define TCSETAW 0x5407
15#define TCSETAF 0x5408
16#define TCSBRK 0x5409
17#define TCXONC 0x540A
18#define TCFLSH 0x540B
19#define TIOCEXCL 0x540C
20#define TIOCNXCL 0x540D
21#define TIOCSCTTY 0x540E
22#define TIOCGPGRP 0x540F
23#define TIOCSPGRP 0x5410
24#define TIOCOUTQ 0x5411
25#define TIOCSTI 0x5412
26#define TIOCGWINSZ 0x5413
27#define TIOCSWINSZ 0x5414
28#define TIOCMGET 0x5415
29#define TIOCMBIS 0x5416
30#define TIOCMBIC 0x5417
31#define TIOCMSET 0x5418
32#define TIOCGSOFTCAR 0x5419
33#define TIOCSSOFTCAR 0x541A
34#define FIONREAD 0x541B
35#define TIOCINQ FIONREAD
36#define TIOCLINUX 0x541C
37#define TIOCCONS 0x541D
38#define TIOCGSERIAL 0x541E
39#define TIOCSSERIAL 0x541F
40#define TIOCPKT 0x5420
41#define FIONBIO 0x5421
42#define TIOCNOTTY 0x5422
43#define TIOCSETD 0x5423
44#define TIOCGETD 0x5424
45#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
46/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */
47#define TIOCSBRK 0x5427 /* BSD compatibility */
48#define TIOCCBRK 0x5428 /* BSD compatibility */
49#define TIOCGSID 0x5429 /* Return the session ID of FD */
50#define TCGETS2 _IOR('T',0x2A, struct termios2)
51#define TCSETS2 _IOW('T',0x2B, struct termios2)
52#define TCSETSW2 _IOW('T',0x2C, struct termios2)
53#define TCSETSF2 _IOW('T',0x2D, struct termios2)
54#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
55#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
56
57#define FIONCLEX 0x5450
58#define FIOCLEX 0x5451
59#define FIOASYNC 0x5452
60#define TIOCSERCONFIG 0x5453
61#define TIOCSERGWILD 0x5454
62#define TIOCSERSWILD 0x5455
63#define TIOCGLCKTRMIOS 0x5456
64#define TIOCSLCKTRMIOS 0x5457
65#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
66#define TIOCSERGETLSR 0x5459 /* Get line status register */
67#define TIOCSERGETMULTI 0x545A /* Get multiport config */
68#define TIOCSERSETMULTI 0x545B /* Set multiport config */
69
70#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
71#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
72#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */
73#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */
74#define FIOQSIZE 0x5460
75
76/* Used for packet mode */
77#define TIOCPKT_DATA 0
78#define TIOCPKT_FLUSHREAD 1
79#define TIOCPKT_FLUSHWRITE 2
80#define TIOCPKT_STOP 4
81#define TIOCPKT_START 8
82#define TIOCPKT_NOSTOP 16
83#define TIOCPKT_DOSTOP 32
84
85#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
86
87#endif
diff --git a/include/asm-x86/ioctls_64.h b/include/asm-x86/ioctls_64.h
deleted file mode 100644
index 3fc0b15a0d7e..000000000000
--- a/include/asm-x86/ioctls_64.h
+++ /dev/null
@@ -1,86 +0,0 @@
1#ifndef __ARCH_X8664_IOCTLS_H__
2#define __ARCH_X8664_IOCTLS_H__
3
4#include <asm/ioctl.h>
5
6/* 0x54 is just a magic number to make these relatively unique ('T') */
7
8#define TCGETS 0x5401
9#define TCSETS 0x5402
10#define TCSETSW 0x5403
11#define TCSETSF 0x5404
12#define TCGETA 0x5405
13#define TCSETA 0x5406
14#define TCSETAW 0x5407
15#define TCSETAF 0x5408
16#define TCSBRK 0x5409
17#define TCXONC 0x540A
18#define TCFLSH 0x540B
19#define TIOCEXCL 0x540C
20#define TIOCNXCL 0x540D
21#define TIOCSCTTY 0x540E
22#define TIOCGPGRP 0x540F
23#define TIOCSPGRP 0x5410
24#define TIOCOUTQ 0x5411
25#define TIOCSTI 0x5412
26#define TIOCGWINSZ 0x5413
27#define TIOCSWINSZ 0x5414
28#define TIOCMGET 0x5415
29#define TIOCMBIS 0x5416
30#define TIOCMBIC 0x5417
31#define TIOCMSET 0x5418
32#define TIOCGSOFTCAR 0x5419
33#define TIOCSSOFTCAR 0x541A
34#define FIONREAD 0x541B
35#define TIOCINQ FIONREAD
36#define TIOCLINUX 0x541C
37#define TIOCCONS 0x541D
38#define TIOCGSERIAL 0x541E
39#define TIOCSSERIAL 0x541F
40#define TIOCPKT 0x5420
41#define FIONBIO 0x5421
42#define TIOCNOTTY 0x5422
43#define TIOCSETD 0x5423
44#define TIOCGETD 0x5424
45#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
46#define TIOCSBRK 0x5427 /* BSD compatibility */
47#define TIOCCBRK 0x5428 /* BSD compatibility */
48#define TIOCGSID 0x5429 /* Return the session ID of FD */
49#define TCGETS2 _IOR('T',0x2A, struct termios2)
50#define TCSETS2 _IOW('T',0x2B, struct termios2)
51#define TCSETSW2 _IOW('T',0x2C, struct termios2)
52#define TCSETSF2 _IOW('T',0x2D, struct termios2)
53#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
54#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
55
56#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
57#define FIOCLEX 0x5451
58#define FIOASYNC 0x5452
59#define TIOCSERCONFIG 0x5453
60#define TIOCSERGWILD 0x5454
61#define TIOCSERSWILD 0x5455
62#define TIOCGLCKTRMIOS 0x5456
63#define TIOCSLCKTRMIOS 0x5457
64#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
65#define TIOCSERGETLSR 0x5459 /* Get line status register */
66#define TIOCSERGETMULTI 0x545A /* Get multiport config */
67#define TIOCSERSETMULTI 0x545B /* Set multiport config */
68
69#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
70#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
71#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */
72#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */
73#define FIOQSIZE 0x5460
74
75/* Used for packet mode */
76#define TIOCPKT_DATA 0
77#define TIOCPKT_FLUSHREAD 1
78#define TIOCPKT_FLUSHWRITE 2
79#define TIOCPKT_STOP 4
80#define TIOCPKT_START 8
81#define TIOCPKT_NOSTOP 16
82#define TIOCPKT_DOSTOP 32
83
84#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
85
86#endif
diff --git a/include/asm-x86/ipcbuf.h b/include/asm-x86/ipcbuf.h
index eb2e448c6e28..2adf8b39a40b 100644
--- a/include/asm-x86/ipcbuf.h
+++ b/include/asm-x86/ipcbuf.h
@@ -1,13 +1,29 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_IPCBUF_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_IPCBUF_H
3# include "ipcbuf_32.h" 3
4# else 4/*
5# include "ipcbuf_64.h" 5 * The ipc64_perm structure for x86 architecture.
6# endif 6 * Note extra padding because this structure is passed back and forth
7#else 7 * between kernel and user space.
8# ifdef __i386__ 8 *
9# include "ipcbuf_32.h" 9 * Pad space is left for:
10# else 10 * - 32-bit mode_t and seq
11# include "ipcbuf_64.h" 11 * - 2 miscellaneous 32-bit values
12# endif 12 */
13#endif 13
14struct ipc64_perm
15{
16 __kernel_key_t key;
17 __kernel_uid32_t uid;
18 __kernel_gid32_t gid;
19 __kernel_uid32_t cuid;
20 __kernel_gid32_t cgid;
21 __kernel_mode_t mode;
22 unsigned short __pad1;
23 unsigned short seq;
24 unsigned short __pad2;
25 unsigned long __unused1;
26 unsigned long __unused2;
27};
28
29#endif /* _ASM_X86_IPCBUF_H */
diff --git a/include/asm-x86/ipcbuf_32.h b/include/asm-x86/ipcbuf_32.h
deleted file mode 100644
index 0dcad4f84c2a..000000000000
--- a/include/asm-x86/ipcbuf_32.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef __i386_IPCBUF_H__
2#define __i386_IPCBUF_H__
3
4/*
5 * The ipc64_perm structure for i386 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 32-bit mode_t and seq
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct ipc64_perm
15{
16 __kernel_key_t key;
17 __kernel_uid32_t uid;
18 __kernel_gid32_t gid;
19 __kernel_uid32_t cuid;
20 __kernel_gid32_t cgid;
21 __kernel_mode_t mode;
22 unsigned short __pad1;
23 unsigned short seq;
24 unsigned short __pad2;
25 unsigned long __unused1;
26 unsigned long __unused2;
27};
28
29#endif /* __i386_IPCBUF_H__ */
diff --git a/include/asm-x86/ipcbuf_64.h b/include/asm-x86/ipcbuf_64.h
deleted file mode 100644
index 470cf85e3ba8..000000000000
--- a/include/asm-x86/ipcbuf_64.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef __x86_64_IPCBUF_H__
2#define __x86_64_IPCBUF_H__
3
4/*
5 * The ipc64_perm structure for x86_64 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 32-bit mode_t and seq
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct ipc64_perm
15{
16 __kernel_key_t key;
17 __kernel_uid32_t uid;
18 __kernel_gid32_t gid;
19 __kernel_uid32_t cuid;
20 __kernel_gid32_t cgid;
21 __kernel_mode_t mode;
22 unsigned short __pad1;
23 unsigned short seq;
24 unsigned short __pad2;
25 unsigned long __unused1;
26 unsigned long __unused2;
27};
28
29#endif /* __x86_64_IPCBUF_H__ */
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h
index 38479106c259..e2f9b62e535e 100644
--- a/include/asm-x86/kdebug.h
+++ b/include/asm-x86/kdebug.h
@@ -1,5 +1,33 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_KDEBUG_H
2# include "kdebug_32.h" 2#define _ASM_X86_KDEBUG_H
3#else 3
4# include "kdebug_64.h" 4#include <linux/notifier.h>
5
6struct pt_regs;
7
8/* Grossly misnamed. */
9enum die_val {
10 DIE_OOPS = 1,
11 DIE_INT3,
12 DIE_DEBUG,
13 DIE_PANIC,
14 DIE_NMI,
15 DIE_DIE,
16 DIE_NMIWATCHDOG,
17 DIE_KERNELDEBUG,
18 DIE_TRAP,
19 DIE_GPF,
20 DIE_CALL,
21 DIE_NMI_IPI,
22 DIE_PAGE_FAULT,
23};
24
25extern void printk_address(unsigned long address);
26extern void die(const char *,struct pt_regs *,long);
27extern void __die(const char *,struct pt_regs *,long);
28extern void show_registers(struct pt_regs *regs);
29extern void dump_pagetable(unsigned long);
30extern unsigned long oops_begin(void);
31extern void oops_end(unsigned long);
32
5#endif 33#endif
diff --git a/include/asm-x86/kdebug_32.h b/include/asm-x86/kdebug_32.h
deleted file mode 100644
index 181d437eef4b..000000000000
--- a/include/asm-x86/kdebug_32.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef _I386_KDEBUG_H
2#define _I386_KDEBUG_H 1
3
4/*
5 * Aug-05 2004 Ported by Prasanna S Panchamukhi <prasanna@in.ibm.com>
6 * from x86_64 architecture.
7 */
8
9struct pt_regs;
10
11/* Grossly misnamed. */
12enum die_val {
13 DIE_OOPS = 1,
14 DIE_INT3,
15 DIE_DEBUG,
16 DIE_PANIC,
17 DIE_NMI,
18 DIE_DIE,
19 DIE_NMIWATCHDOG,
20 DIE_KERNELDEBUG,
21 DIE_TRAP,
22 DIE_GPF,
23 DIE_CALL,
24 DIE_NMI_IPI,
25};
26
27#endif
diff --git a/include/asm-x86/kdebug_64.h b/include/asm-x86/kdebug_64.h
deleted file mode 100644
index df413e05375e..000000000000
--- a/include/asm-x86/kdebug_64.h
+++ /dev/null
@@ -1,32 +0,0 @@
1#ifndef _X86_64_KDEBUG_H
2#define _X86_64_KDEBUG_H 1
3
4#include <linux/compiler.h>
5
6struct pt_regs;
7
8/* Grossly misnamed. */
9enum die_val {
10 DIE_OOPS = 1,
11 DIE_INT3,
12 DIE_DEBUG,
13 DIE_PANIC,
14 DIE_NMI,
15 DIE_DIE,
16 DIE_NMIWATCHDOG,
17 DIE_KERNELDEBUG,
18 DIE_TRAP,
19 DIE_GPF,
20 DIE_CALL,
21 DIE_NMI_IPI,
22};
23
24extern void printk_address(unsigned long address);
25extern void die(const char *,struct pt_regs *,long);
26extern void __die(const char *,struct pt_regs *,long);
27extern void show_registers(struct pt_regs *regs);
28extern void dump_pagetable(unsigned long);
29extern unsigned long oops_begin(void);
30extern void oops_end(unsigned long);
31
32#endif
diff --git a/include/asm-x86/kmap_types.h b/include/asm-x86/kmap_types.h
index e4ec724b298e..5f4174132a22 100644
--- a/include/asm-x86/kmap_types.h
+++ b/include/asm-x86/kmap_types.h
@@ -1,5 +1,29 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_KMAP_TYPES_H
2# include "kmap_types_32.h" 2#define _ASM_X86_KMAP_TYPES_H
3
4#if defined(CONFIG_X86_32) && defined(CONFIG_DEBUG_HIGHMEM)
5# define D(n) __KM_FENCE_##n ,
3#else 6#else
4# include "kmap_types_64.h" 7# define D(n)
8#endif
9
10enum km_type {
11D(0) KM_BOUNCE_READ,
12D(1) KM_SKB_SUNRPC_DATA,
13D(2) KM_SKB_DATA_SOFTIRQ,
14D(3) KM_USER0,
15D(4) KM_USER1,
16D(5) KM_BIO_SRC_IRQ,
17D(6) KM_BIO_DST_IRQ,
18D(7) KM_PTE0,
19D(8) KM_PTE1,
20D(9) KM_IRQ0,
21D(10) KM_IRQ1,
22D(11) KM_SOFTIRQ0,
23D(12) KM_SOFTIRQ1,
24D(13) KM_TYPE_NR
25};
26
27#undef D
28
5#endif 29#endif
diff --git a/include/asm-x86/kmap_types_32.h b/include/asm-x86/kmap_types_32.h
deleted file mode 100644
index 806aae3c5338..000000000000
--- a/include/asm-x86/kmap_types_32.h
+++ /dev/null
@@ -1,30 +0,0 @@
1#ifndef _ASM_KMAP_TYPES_H
2#define _ASM_KMAP_TYPES_H
3
4
5#ifdef CONFIG_DEBUG_HIGHMEM
6# define D(n) __KM_FENCE_##n ,
7#else
8# define D(n)
9#endif
10
11enum km_type {
12D(0) KM_BOUNCE_READ,
13D(1) KM_SKB_SUNRPC_DATA,
14D(2) KM_SKB_DATA_SOFTIRQ,
15D(3) KM_USER0,
16D(4) KM_USER1,
17D(5) KM_BIO_SRC_IRQ,
18D(6) KM_BIO_DST_IRQ,
19D(7) KM_PTE0,
20D(8) KM_PTE1,
21D(9) KM_IRQ0,
22D(10) KM_IRQ1,
23D(11) KM_SOFTIRQ0,
24D(12) KM_SOFTIRQ1,
25D(13) KM_TYPE_NR
26};
27
28#undef D
29
30#endif
diff --git a/include/asm-x86/kmap_types_64.h b/include/asm-x86/kmap_types_64.h
deleted file mode 100644
index 7486338c6cea..000000000000
--- a/include/asm-x86/kmap_types_64.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#ifndef _ASM_KMAP_TYPES_H
2#define _ASM_KMAP_TYPES_H
3
4enum km_type {
5 KM_BOUNCE_READ,
6 KM_SKB_SUNRPC_DATA,
7 KM_SKB_DATA_SOFTIRQ,
8 KM_USER0,
9 KM_USER1,
10 KM_BIO_SRC_IRQ,
11 KM_BIO_DST_IRQ,
12 KM_IRQ0,
13 KM_IRQ1,
14 KM_SOFTIRQ0,
15 KM_SOFTIRQ1,
16 KM_TYPE_NR
17};
18
19#endif
diff --git a/include/asm-x86/ldt.h b/include/asm-x86/ldt.h
index 3d9cc20d2ba4..20c597242b53 100644
--- a/include/asm-x86/ldt.h
+++ b/include/asm-x86/ldt.h
@@ -1,13 +1,40 @@
1#ifdef __KERNEL__ 1/*
2# ifdef CONFIG_X86_32 2 * ldt.h
3# include "ldt_32.h" 3 *
4# else 4 * Definitions of structures used with the modify_ldt system call.
5# include "ldt_64.h" 5 */
6# endif 6#ifndef _ASM_X86_LDT_H
7#else 7#define _ASM_X86_LDT_H
8# ifdef __i386__ 8
9# include "ldt_32.h" 9/* Maximum number of LDT entries supported. */
10# else 10#define LDT_ENTRIES 8192
11# include "ldt_64.h" 11/* The size of each LDT entry. */
12# endif 12#define LDT_ENTRY_SIZE 8
13
14#ifndef __ASSEMBLY__
15/*
16 * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS
17 * not to the default values if you still want to do syscalls. This
18 * call is more for 32bit mode therefore.
19 */
20struct user_desc {
21 unsigned int entry_number;
22 unsigned int base_addr;
23 unsigned int limit;
24 unsigned int seg_32bit:1;
25 unsigned int contents:2;
26 unsigned int read_exec_only:1;
27 unsigned int limit_in_pages:1;
28 unsigned int seg_not_present:1;
29 unsigned int useable:1;
30#ifdef __x86_64__
31 unsigned int lm:1;
32#endif
33};
34
35#define MODIFY_LDT_CONTENTS_DATA 0
36#define MODIFY_LDT_CONTENTS_STACK 1
37#define MODIFY_LDT_CONTENTS_CODE 2
38
39#endif /* !__ASSEMBLY__ */
13#endif 40#endif
diff --git a/include/asm-x86/ldt_32.h b/include/asm-x86/ldt_32.h
deleted file mode 100644
index e9d3de1dee6c..000000000000
--- a/include/asm-x86/ldt_32.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * ldt.h
3 *
4 * Definitions of structures used with the modify_ldt system call.
5 */
6#ifndef _LINUX_LDT_H
7#define _LINUX_LDT_H
8
9/* Maximum number of LDT entries supported. */
10#define LDT_ENTRIES 8192
11/* The size of each LDT entry. */
12#define LDT_ENTRY_SIZE 8
13
14#ifndef __ASSEMBLY__
15struct user_desc {
16 unsigned int entry_number;
17 unsigned long base_addr;
18 unsigned int limit;
19 unsigned int seg_32bit:1;
20 unsigned int contents:2;
21 unsigned int read_exec_only:1;
22 unsigned int limit_in_pages:1;
23 unsigned int seg_not_present:1;
24 unsigned int useable:1;
25};
26
27#define MODIFY_LDT_CONTENTS_DATA 0
28#define MODIFY_LDT_CONTENTS_STACK 1
29#define MODIFY_LDT_CONTENTS_CODE 2
30
31#endif /* !__ASSEMBLY__ */
32#endif
diff --git a/include/asm-x86/ldt_64.h b/include/asm-x86/ldt_64.h
deleted file mode 100644
index 9ef647b890d2..000000000000
--- a/include/asm-x86/ldt_64.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * ldt.h
3 *
4 * Definitions of structures used with the modify_ldt system call.
5 */
6#ifndef _LINUX_LDT_H
7#define _LINUX_LDT_H
8
9/* Maximum number of LDT entries supported. */
10#define LDT_ENTRIES 8192
11/* The size of each LDT entry. */
12#define LDT_ENTRY_SIZE 8
13
14#ifndef __ASSEMBLY__
15/* Note on 64bit base and limit is ignored and you cannot set
16 DS/ES/CS not to the default values if you still want to do syscalls. This
17 call is more for 32bit mode therefore. */
18struct user_desc {
19 unsigned int entry_number;
20 unsigned int base_addr;
21 unsigned int limit;
22 unsigned int seg_32bit:1;
23 unsigned int contents:2;
24 unsigned int read_exec_only:1;
25 unsigned int limit_in_pages:1;
26 unsigned int seg_not_present:1;
27 unsigned int useable:1;
28 unsigned int lm:1;
29};
30
31#define MODIFY_LDT_CONTENTS_DATA 0
32#define MODIFY_LDT_CONTENTS_STACK 1
33#define MODIFY_LDT_CONTENTS_CODE 2
34
35#endif /* !__ASSEMBLY__ */
36#endif
diff --git a/include/asm-x86/mach-default/mach_apicdef.h b/include/asm-x86/mach-default/mach_apicdef.h
index 7bcb350c3ee8..ae9841319094 100644
--- a/include/asm-x86/mach-default/mach_apicdef.h
+++ b/include/asm-x86/mach-default/mach_apicdef.h
@@ -1,11 +1,17 @@
1#ifndef __ASM_MACH_APICDEF_H 1#ifndef __ASM_MACH_APICDEF_H
2#define __ASM_MACH_APICDEF_H 2#define __ASM_MACH_APICDEF_H
3 3
4#include <asm/apic.h>
5
4#define APIC_ID_MASK (0xF<<24) 6#define APIC_ID_MASK (0xF<<24)
5 7
6static inline unsigned get_apic_id(unsigned long x) 8static inline unsigned get_apic_id(unsigned long x)
7{ 9{
8 return (((x)>>24)&0xF); 10 unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
11 if (APIC_XAPIC(ver))
12 return (((x)>>24)&0xFF);
13 else
14 return (((x)>>24)&0xF);
9} 15}
10 16
11#define GET_APIC_ID(x) get_apic_id(x) 17#define GET_APIC_ID(x) get_apic_id(x)
diff --git a/include/asm-x86/mach-visws/cobalt.h b/include/asm-x86/mach-visws/cobalt.h
index 33c36225a042..995258831b7f 100644
--- a/include/asm-x86/mach-visws/cobalt.h
+++ b/include/asm-x86/mach-visws/cobalt.h
@@ -94,22 +94,22 @@
94#define CO_IRQ_8259 CO_IRQ(CO_APIC_8259) 94#define CO_IRQ_8259 CO_IRQ(CO_APIC_8259)
95 95
96#ifdef CONFIG_X86_VISWS_APIC 96#ifdef CONFIG_X86_VISWS_APIC
97extern __inline void co_cpu_write(unsigned long reg, unsigned long v) 97static inline void co_cpu_write(unsigned long reg, unsigned long v)
98{ 98{
99 *((volatile unsigned long *)(CO_CPU_VADDR+reg))=v; 99 *((volatile unsigned long *)(CO_CPU_VADDR+reg))=v;
100} 100}
101 101
102extern __inline unsigned long co_cpu_read(unsigned long reg) 102static inline unsigned long co_cpu_read(unsigned long reg)
103{ 103{
104 return *((volatile unsigned long *)(CO_CPU_VADDR+reg)); 104 return *((volatile unsigned long *)(CO_CPU_VADDR+reg));
105} 105}
106 106
107extern __inline void co_apic_write(unsigned long reg, unsigned long v) 107static inline void co_apic_write(unsigned long reg, unsigned long v)
108{ 108{
109 *((volatile unsigned long *)(CO_APIC_VADDR+reg))=v; 109 *((volatile unsigned long *)(CO_APIC_VADDR+reg))=v;
110} 110}
111 111
112extern __inline unsigned long co_apic_read(unsigned long reg) 112static inline unsigned long co_apic_read(unsigned long reg)
113{ 113{
114 return *((volatile unsigned long *)(CO_APIC_VADDR+reg)); 114 return *((volatile unsigned long *)(CO_APIC_VADDR+reg));
115} 115}
diff --git a/include/asm-x86/mach-visws/lithium.h b/include/asm-x86/mach-visws/lithium.h
index d443e68d0066..dfcd4f07ab85 100644
--- a/include/asm-x86/mach-visws/lithium.h
+++ b/include/asm-x86/mach-visws/lithium.h
@@ -29,22 +29,22 @@
29#define LI_INTD 0x0080 29#define LI_INTD 0x0080
30 30
31/* More special purpose macros... */ 31/* More special purpose macros... */
32extern __inline void li_pcia_write16(unsigned long reg, unsigned short v) 32static inline void li_pcia_write16(unsigned long reg, unsigned short v)
33{ 33{
34 *((volatile unsigned short *)(LI_PCIA_VADDR+reg))=v; 34 *((volatile unsigned short *)(LI_PCIA_VADDR+reg))=v;
35} 35}
36 36
37extern __inline unsigned short li_pcia_read16(unsigned long reg) 37static inline unsigned short li_pcia_read16(unsigned long reg)
38{ 38{
39 return *((volatile unsigned short *)(LI_PCIA_VADDR+reg)); 39 return *((volatile unsigned short *)(LI_PCIA_VADDR+reg));
40} 40}
41 41
42extern __inline void li_pcib_write16(unsigned long reg, unsigned short v) 42static inline void li_pcib_write16(unsigned long reg, unsigned short v)
43{ 43{
44 *((volatile unsigned short *)(LI_PCIB_VADDR+reg))=v; 44 *((volatile unsigned short *)(LI_PCIB_VADDR+reg))=v;
45} 45}
46 46
47extern __inline unsigned short li_pcib_read16(unsigned long reg) 47static inline unsigned short li_pcib_read16(unsigned long reg)
48{ 48{
49 return *((volatile unsigned short *)(LI_PCIB_VADDR+reg)); 49 return *((volatile unsigned short *)(LI_PCIB_VADDR+reg));
50} 50}
diff --git a/include/asm-x86/mce.h b/include/asm-x86/mce.h
index cc8ca389912e..df304fd89c27 100644
--- a/include/asm-x86/mce.h
+++ b/include/asm-x86/mce.h
@@ -1,5 +1,129 @@
1#ifndef _ASM_X86_MCE_H
2#define _ASM_X86_MCE_H
3
4#ifdef __x86_64__
5
6#include <asm/ioctls.h>
7#include <asm/types.h>
8
9/*
10 * Machine Check support for x86
11 */
12
13#define MCG_CTL_P (1UL<<8) /* MCG_CAP register available */
14
15#define MCG_STATUS_RIPV (1UL<<0) /* restart ip valid */
16#define MCG_STATUS_EIPV (1UL<<1) /* eip points to correct instruction */
17#define MCG_STATUS_MCIP (1UL<<2) /* machine check in progress */
18
19#define MCI_STATUS_VAL (1UL<<63) /* valid error */
20#define MCI_STATUS_OVER (1UL<<62) /* previous errors lost */
21#define MCI_STATUS_UC (1UL<<61) /* uncorrected error */
22#define MCI_STATUS_EN (1UL<<60) /* error enabled */
23#define MCI_STATUS_MISCV (1UL<<59) /* misc error reg. valid */
24#define MCI_STATUS_ADDRV (1UL<<58) /* addr reg. valid */
25#define MCI_STATUS_PCC (1UL<<57) /* processor context corrupt */
26
27/* Fields are zero when not available */
28struct mce {
29 __u64 status;
30 __u64 misc;
31 __u64 addr;
32 __u64 mcgstatus;
33 __u64 rip;
34 __u64 tsc; /* cpu time stamp counter */
35 __u64 res1; /* for future extension */
36 __u64 res2; /* dito. */
37 __u8 cs; /* code segment */
38 __u8 bank; /* machine check bank */
39 __u8 cpu; /* cpu that raised the error */
40 __u8 finished; /* entry is valid */
41 __u32 pad;
42};
43
44/*
45 * This structure contains all data related to the MCE log. Also
46 * carries a signature to make it easier to find from external
47 * debugging tools. Each entry is only valid when its finished flag
48 * is set.
49 */
50
51#define MCE_LOG_LEN 32
52
53struct mce_log {
54 char signature[12]; /* "MACHINECHECK" */
55 unsigned len; /* = MCE_LOG_LEN */
56 unsigned next;
57 unsigned flags;
58 unsigned pad0;
59 struct mce entry[MCE_LOG_LEN];
60};
61
62#define MCE_OVERFLOW 0 /* bit 0 in flags means overflow */
63
64#define MCE_LOG_SIGNATURE "MACHINECHECK"
65
66#define MCE_GET_RECORD_LEN _IOR('M', 1, int)
67#define MCE_GET_LOG_LEN _IOR('M', 2, int)
68#define MCE_GETCLEAR_FLAGS _IOR('M', 3, int)
69
70/* Software defined banks */
71#define MCE_EXTENDED_BANK 128
72#define MCE_THERMAL_BANK MCE_EXTENDED_BANK + 0
73
74#define K8_MCE_THRESHOLD_BASE (MCE_EXTENDED_BANK + 1) /* MCE_AMD */
75#define K8_MCE_THRESHOLD_BANK_0 (MCE_THRESHOLD_BASE + 0 * 9)
76#define K8_MCE_THRESHOLD_BANK_1 (MCE_THRESHOLD_BASE + 1 * 9)
77#define K8_MCE_THRESHOLD_BANK_2 (MCE_THRESHOLD_BASE + 2 * 9)
78#define K8_MCE_THRESHOLD_BANK_3 (MCE_THRESHOLD_BASE + 3 * 9)
79#define K8_MCE_THRESHOLD_BANK_4 (MCE_THRESHOLD_BASE + 4 * 9)
80#define K8_MCE_THRESHOLD_BANK_5 (MCE_THRESHOLD_BASE + 5 * 9)
81#define K8_MCE_THRESHOLD_DRAM_ECC (MCE_THRESHOLD_BANK_4 + 0)
82
83#endif /* __x86_64__ */
84
85#ifdef __KERNEL__
86
1#ifdef CONFIG_X86_32 87#ifdef CONFIG_X86_32
2# include "mce_32.h" 88#ifdef CONFIG_X86_MCE
89extern void mcheck_init(struct cpuinfo_x86 *c);
3#else 90#else
4# include "mce_64.h" 91#define mcheck_init(c) do {} while(0)
92#endif
93
94extern int mce_disabled;
95
96#else /* CONFIG_X86_32 */
97
98#include <asm/atomic.h>
99
100void mce_log(struct mce *m);
101DECLARE_PER_CPU(struct sys_device, device_mce);
102
103#ifdef CONFIG_X86_MCE_INTEL
104void mce_intel_feature_init(struct cpuinfo_x86 *c);
105#else
106static inline void mce_intel_feature_init(struct cpuinfo_x86 *c) { }
107#endif
108
109#ifdef CONFIG_X86_MCE_AMD
110void mce_amd_feature_init(struct cpuinfo_x86 *c);
111#else
112static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) { }
113#endif
114
115void mce_log_therm_throt_event(unsigned int cpu, __u64 status);
116
117extern atomic_t mce_entry;
118
119extern void do_machine_check(struct pt_regs *, long);
120extern int mce_notify_user(void);
121
122#endif /* !CONFIG_X86_32 */
123
124extern void stop_mce(void);
125extern void restart_mce(void);
126
127#endif /* __KERNEL__ */
128
5#endif 129#endif
diff --git a/include/asm-x86/mce_32.h b/include/asm-x86/mce_32.h
deleted file mode 100644
index d56d89742e8f..000000000000
--- a/include/asm-x86/mce_32.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifdef CONFIG_X86_MCE
2extern void mcheck_init(struct cpuinfo_x86 *c);
3#else
4#define mcheck_init(c) do {} while(0)
5#endif
6
7extern int mce_disabled;
8
9extern void stop_mce(void);
10extern void restart_mce(void);
11
diff --git a/include/asm-x86/mce_64.h b/include/asm-x86/mce_64.h
deleted file mode 100644
index 7bc030a1996d..000000000000
--- a/include/asm-x86/mce_64.h
+++ /dev/null
@@ -1,115 +0,0 @@
1#ifndef _ASM_MCE_H
2#define _ASM_MCE_H 1
3
4#include <asm/ioctls.h>
5#include <asm/types.h>
6
7/*
8 * Machine Check support for x86
9 */
10
11#define MCG_CTL_P (1UL<<8) /* MCG_CAP register available */
12
13#define MCG_STATUS_RIPV (1UL<<0) /* restart ip valid */
14#define MCG_STATUS_EIPV (1UL<<1) /* eip points to correct instruction */
15#define MCG_STATUS_MCIP (1UL<<2) /* machine check in progress */
16
17#define MCI_STATUS_VAL (1UL<<63) /* valid error */
18#define MCI_STATUS_OVER (1UL<<62) /* previous errors lost */
19#define MCI_STATUS_UC (1UL<<61) /* uncorrected error */
20#define MCI_STATUS_EN (1UL<<60) /* error enabled */
21#define MCI_STATUS_MISCV (1UL<<59) /* misc error reg. valid */
22#define MCI_STATUS_ADDRV (1UL<<58) /* addr reg. valid */
23#define MCI_STATUS_PCC (1UL<<57) /* processor context corrupt */
24
25/* Fields are zero when not available */
26struct mce {
27 __u64 status;
28 __u64 misc;
29 __u64 addr;
30 __u64 mcgstatus;
31 __u64 rip;
32 __u64 tsc; /* cpu time stamp counter */
33 __u64 res1; /* for future extension */
34 __u64 res2; /* dito. */
35 __u8 cs; /* code segment */
36 __u8 bank; /* machine check bank */
37 __u8 cpu; /* cpu that raised the error */
38 __u8 finished; /* entry is valid */
39 __u32 pad;
40};
41
42/*
43 * This structure contains all data related to the MCE log.
44 * Also carries a signature to make it easier to find from external debugging tools.
45 * Each entry is only valid when its finished flag is set.
46 */
47
48#define MCE_LOG_LEN 32
49
50struct mce_log {
51 char signature[12]; /* "MACHINECHECK" */
52 unsigned len; /* = MCE_LOG_LEN */
53 unsigned next;
54 unsigned flags;
55 unsigned pad0;
56 struct mce entry[MCE_LOG_LEN];
57};
58
59#define MCE_OVERFLOW 0 /* bit 0 in flags means overflow */
60
61#define MCE_LOG_SIGNATURE "MACHINECHECK"
62
63#define MCE_GET_RECORD_LEN _IOR('M', 1, int)
64#define MCE_GET_LOG_LEN _IOR('M', 2, int)
65#define MCE_GETCLEAR_FLAGS _IOR('M', 3, int)
66
67/* Software defined banks */
68#define MCE_EXTENDED_BANK 128
69#define MCE_THERMAL_BANK MCE_EXTENDED_BANK + 0
70
71#define K8_MCE_THRESHOLD_BASE (MCE_EXTENDED_BANK + 1) /* MCE_AMD */
72#define K8_MCE_THRESHOLD_BANK_0 (MCE_THRESHOLD_BASE + 0 * 9)
73#define K8_MCE_THRESHOLD_BANK_1 (MCE_THRESHOLD_BASE + 1 * 9)
74#define K8_MCE_THRESHOLD_BANK_2 (MCE_THRESHOLD_BASE + 2 * 9)
75#define K8_MCE_THRESHOLD_BANK_3 (MCE_THRESHOLD_BASE + 3 * 9)
76#define K8_MCE_THRESHOLD_BANK_4 (MCE_THRESHOLD_BASE + 4 * 9)
77#define K8_MCE_THRESHOLD_BANK_5 (MCE_THRESHOLD_BASE + 5 * 9)
78#define K8_MCE_THRESHOLD_DRAM_ECC (MCE_THRESHOLD_BANK_4 + 0)
79
80#ifdef __KERNEL__
81#include <asm/atomic.h>
82
83void mce_log(struct mce *m);
84DECLARE_PER_CPU(struct sys_device, device_mce);
85
86#ifdef CONFIG_X86_MCE_INTEL
87void mce_intel_feature_init(struct cpuinfo_x86 *c);
88#else
89static inline void mce_intel_feature_init(struct cpuinfo_x86 *c)
90{
91}
92#endif
93
94#ifdef CONFIG_X86_MCE_AMD
95void mce_amd_feature_init(struct cpuinfo_x86 *c);
96#else
97static inline void mce_amd_feature_init(struct cpuinfo_x86 *c)
98{
99}
100#endif
101
102void mce_log_therm_throt_event(unsigned int cpu, __u64 status);
103
104extern atomic_t mce_entry;
105
106extern void do_machine_check(struct pt_regs *, long);
107
108extern int mce_notify_user(void);
109
110extern void stop_mce(void);
111extern void restart_mce(void);
112
113#endif
114
115#endif
diff --git a/include/asm-x86/mman.h b/include/asm-x86/mman.h
index 322db07e82c3..c1682b542daf 100644
--- a/include/asm-x86/mman.h
+++ b/include/asm-x86/mman.h
@@ -1,13 +1,19 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_MMAN_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_MMAN_H
3# include "mman_32.h" 3
4# else 4#include <asm-generic/mman.h>
5# include "mman_64.h" 5
6# endif 6#define MAP_32BIT 0x40 /* only give out 32bit addresses */
7#else 7
8# ifdef __i386__ 8#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
9# include "mman_32.h" 9#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
10# else 10#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
11# include "mman_64.h" 11#define MAP_LOCKED 0x2000 /* pages are locked */
12# endif 12#define MAP_NORESERVE 0x4000 /* don't check for reservations */
13#endif 13#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
14#define MAP_NONBLOCK 0x10000 /* do not block on IO */
15
16#define MCL_CURRENT 1 /* lock all current mappings */
17#define MCL_FUTURE 2 /* lock all future mappings */
18
19#endif /* _ASM_X86_MMAN_H */
diff --git a/include/asm-x86/mman_32.h b/include/asm-x86/mman_32.h
deleted file mode 100644
index 8fd9d7ab7faf..000000000000
--- a/include/asm-x86/mman_32.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef __I386_MMAN_H__
2#define __I386_MMAN_H__
3
4#include <asm-generic/mman.h>
5
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
9#define MAP_LOCKED 0x2000 /* pages are locked */
10#define MAP_NORESERVE 0x4000 /* don't check for reservations */
11#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
12#define MAP_NONBLOCK 0x10000 /* do not block on IO */
13
14#define MCL_CURRENT 1 /* lock all current mappings */
15#define MCL_FUTURE 2 /* lock all future mappings */
16
17#endif /* __I386_MMAN_H__ */
diff --git a/include/asm-x86/mman_64.h b/include/asm-x86/mman_64.h
deleted file mode 100644
index dd5cb0534d37..000000000000
--- a/include/asm-x86/mman_64.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#ifndef __X8664_MMAN_H__
2#define __X8664_MMAN_H__
3
4#include <asm-generic/mman.h>
5
6#define MAP_32BIT 0x40 /* only give out 32bit addresses */
7
8#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
9#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
10#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
11#define MAP_LOCKED 0x2000 /* pages are locked */
12#define MAP_NORESERVE 0x4000 /* don't check for reservations */
13#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
14#define MAP_NONBLOCK 0x10000 /* do not block on IO */
15
16#define MCL_CURRENT 1 /* lock all current mappings */
17#define MCL_FUTURE 2 /* lock all future mappings */
18
19#endif
diff --git a/include/asm-x86/mmu_32.h b/include/asm-x86/mmu_32.h
index 8358dd3df7aa..5e249c51ef56 100644
--- a/include/asm-x86/mmu_32.h
+++ b/include/asm-x86/mmu_32.h
@@ -1,7 +1,7 @@
1#ifndef __i386_MMU_H 1#ifndef __i386_MMU_H
2#define __i386_MMU_H 2#define __i386_MMU_H
3 3
4#include <asm/semaphore.h> 4#include <linux/mutex.h>
5/* 5/*
6 * The i386 doesn't have a mmu context, but 6 * The i386 doesn't have a mmu context, but
7 * we put the segment information here. 7 * we put the segment information here.
@@ -10,7 +10,7 @@
10 */ 10 */
11typedef struct { 11typedef struct {
12 int size; 12 int size;
13 struct semaphore sem; 13 struct mutex lock;
14 void *ldt; 14 void *ldt;
15 void *vdso; 15 void *vdso;
16} mm_context_t; 16} mm_context_t;
diff --git a/include/asm-x86/mmu_64.h b/include/asm-x86/mmu_64.h
index d2cd4a9d984d..024357c27222 100644
--- a/include/asm-x86/mmu_64.h
+++ b/include/asm-x86/mmu_64.h
@@ -2,7 +2,7 @@
2#define __x86_64_MMU_H 2#define __x86_64_MMU_H
3 3
4#include <linux/spinlock.h> 4#include <linux/spinlock.h>
5#include <asm/semaphore.h> 5#include <linux/mutex.h>
6 6
7/* 7/*
8 * The x86_64 doesn't have a mmu context, but 8 * The x86_64 doesn't have a mmu context, but
@@ -14,7 +14,7 @@ typedef struct {
14 void *ldt; 14 void *ldt;
15 rwlock_t ldtlock; 15 rwlock_t ldtlock;
16 int size; 16 int size;
17 struct semaphore sem; 17 struct mutex lock;
18 void *vdso; 18 void *vdso;
19} mm_context_t; 19} mm_context_t;
20 20
diff --git a/include/asm-x86/namei.h b/include/asm-x86/namei.h
index 732f8f0b3dcd..415ef5d9550e 100644
--- a/include/asm-x86/namei.h
+++ b/include/asm-x86/namei.h
@@ -1,5 +1,11 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_NAMEI_H
2# include "namei_32.h" 2#define _ASM_X86_NAMEI_H
3#else 3
4# include "namei_64.h" 4/* This dummy routine maybe changed to something useful
5#endif 5 * for /usr/gnemul/ emulation stuff.
6 * Look at asm-sparc/namei.h for details.
7 */
8
9#define __emul_prefix() NULL
10
11#endif /* _ASM_X86_NAMEI_H */
diff --git a/include/asm-x86/namei_32.h b/include/asm-x86/namei_32.h
deleted file mode 100644
index 814865088617..000000000000
--- a/include/asm-x86/namei_32.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/* $Id: namei.h,v 1.1 1996/12/13 14:48:21 jj Exp $
2 * linux/include/asm-i386/namei.h
3 *
4 * Included from linux/fs/namei.c
5 */
6
7#ifndef __I386_NAMEI_H
8#define __I386_NAMEI_H
9
10/* This dummy routine maybe changed to something useful
11 * for /usr/gnemul/ emulation stuff.
12 * Look at asm-sparc/namei.h for details.
13 */
14
15#define __emul_prefix() NULL
16
17#endif /* __I386_NAMEI_H */
diff --git a/include/asm-x86/namei_64.h b/include/asm-x86/namei_64.h
deleted file mode 100644
index bef239f5318f..000000000000
--- a/include/asm-x86/namei_64.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef __X8664_NAMEI_H
2#define __X8664_NAMEI_H
3
4/* This dummy routine maybe changed to something useful
5 * for /usr/gnemul/ emulation stuff.
6 * Look at asm-sparc/namei.h for details.
7 */
8
9#define __emul_prefix() NULL
10
11#endif
diff --git a/include/asm-x86/numa_64.h b/include/asm-x86/numa_64.h
index 933ff11ece15..0cc5c97a7fc9 100644
--- a/include/asm-x86/numa_64.h
+++ b/include/asm-x86/numa_64.h
@@ -2,6 +2,7 @@
2#define _ASM_X8664_NUMA_H 1 2#define _ASM_X8664_NUMA_H 1
3 3
4#include <linux/nodemask.h> 4#include <linux/nodemask.h>
5#include <asm/apicdef.h>
5 6
6struct bootnode { 7struct bootnode {
7 u64 start,end; 8 u64 start,end;
@@ -19,7 +20,7 @@ extern void numa_set_node(int cpu, int node);
19extern void srat_reserve_add_area(int nodeid); 20extern void srat_reserve_add_area(int nodeid);
20extern int hotadd_percent; 21extern int hotadd_percent;
21 22
22extern unsigned char apicid_to_node[256]; 23extern unsigned char apicid_to_node[MAX_LOCAL_APIC];
23#ifdef CONFIG_NUMA 24#ifdef CONFIG_NUMA
24extern void __init init_cpu_to_node(void); 25extern void __init init_cpu_to_node(void);
25 26
diff --git a/include/asm-x86/param.h b/include/asm-x86/param.h
index 640851bab124..c996ec4da0c8 100644
--- a/include/asm-x86/param.h
+++ b/include/asm-x86/param.h
@@ -1,13 +1,22 @@
1#ifndef _ASM_X86_PARAM_H
2#define _ASM_X86_PARAM_H
3
1#ifdef __KERNEL__ 4#ifdef __KERNEL__
2# ifdef CONFIG_X86_32 5# define HZ CONFIG_HZ /* Internal kernel timer frequency */
3# include "param_32.h" 6# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
4# else 7# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
5# include "param_64.h"
6# endif
7#else
8# ifdef __i386__
9# include "param_32.h"
10# else
11# include "param_64.h"
12# endif
13#endif 8#endif
9
10#ifndef HZ
11#define HZ 100
12#endif
13
14#define EXEC_PAGESIZE 4096
15
16#ifndef NOGROUP
17#define NOGROUP (-1)
18#endif
19
20#define MAXHOSTNAMELEN 64 /* max length of hostname */
21
22#endif /* _ASM_X86_PARAM_H */
diff --git a/include/asm-x86/param_32.h b/include/asm-x86/param_32.h
deleted file mode 100644
index 21b32466fcdc..000000000000
--- a/include/asm-x86/param_32.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef _ASMi386_PARAM_H
2#define _ASMi386_PARAM_H
3
4#ifdef __KERNEL__
5# define HZ CONFIG_HZ /* Internal kernel timer frequency */
6# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
7# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
8#endif
9
10#ifndef HZ
11#define HZ 100
12#endif
13
14#define EXEC_PAGESIZE 4096
15
16#ifndef NOGROUP
17#define NOGROUP (-1)
18#endif
19
20#define MAXHOSTNAMELEN 64 /* max length of hostname */
21
22#endif
diff --git a/include/asm-x86/param_64.h b/include/asm-x86/param_64.h
deleted file mode 100644
index a728786c3c7c..000000000000
--- a/include/asm-x86/param_64.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef _ASMx86_64_PARAM_H
2#define _ASMx86_64_PARAM_H
3
4#ifdef __KERNEL__
5# define HZ CONFIG_HZ /* Internal kernel timer frequency */
6# define USER_HZ 100 /* .. some user interfaces are in "ticks */
7#define CLOCKS_PER_SEC (USER_HZ) /* like times() */
8#endif
9
10#ifndef HZ
11#define HZ 100
12#endif
13
14#define EXEC_PAGESIZE 4096
15
16#ifndef NOGROUP
17#define NOGROUP (-1)
18#endif
19
20#define MAXHOSTNAMELEN 64 /* max length of hostname */
21
22#endif
diff --git a/include/asm-x86/parport.h b/include/asm-x86/parport.h
index 2a31157349c9..019cbca24a38 100644
--- a/include/asm-x86/parport.h
+++ b/include/asm-x86/parport.h
@@ -1,5 +1,10 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_PARPORT_H
2# include "parport_32.h" 2#define _ASM_X86_PARPORT_H
3#else 3
4# include "parport_64.h" 4static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
5#endif 5static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
6{
7 return parport_pc_find_isa_ports (autoirq, autodma);
8}
9
10#endif /* _ASM_X86_PARPORT_H */
diff --git a/include/asm-x86/parport_32.h b/include/asm-x86/parport_32.h
deleted file mode 100644
index fa0e321e498e..000000000000
--- a/include/asm-x86/parport_32.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * parport.h: ia32-specific parport initialisation
3 *
4 * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
5 *
6 * This file should only be included by drivers/parport/parport_pc.c.
7 */
8
9#ifndef _ASM_I386_PARPORT_H
10#define _ASM_I386_PARPORT_H 1
11
12static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
13static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
14{
15 return parport_pc_find_isa_ports (autoirq, autodma);
16}
17
18#endif /* !(_ASM_I386_PARPORT_H) */
diff --git a/include/asm-x86/parport_64.h b/include/asm-x86/parport_64.h
deleted file mode 100644
index 7135ef977c96..000000000000
--- a/include/asm-x86/parport_64.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * parport.h: ia32-specific parport initialisation
3 *
4 * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
5 *
6 * This file should only be included by drivers/parport/parport_pc.c.
7 */
8
9#ifndef _ASM_X8664_PARPORT_H
10#define _ASM_X8664_PARPORT_H 1
11
12static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
13static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
14{
15 return parport_pc_find_isa_ports (autoirq, autodma);
16}
17
18#endif
diff --git a/include/asm-x86/pda.h b/include/asm-x86/pda.h
index fb49f80eb94f..35962bbe5e72 100644
--- a/include/asm-x86/pda.h
+++ b/include/asm-x86/pda.h
@@ -30,6 +30,12 @@ struct x8664_pda {
30 struct mm_struct *active_mm; 30 struct mm_struct *active_mm;
31 unsigned apic_timer_irqs; 31 unsigned apic_timer_irqs;
32 unsigned irq0_irqs; 32 unsigned irq0_irqs;
33 unsigned irq_resched_count;
34 unsigned irq_call_count;
35 unsigned irq_tlb_count;
36 unsigned irq_thermal_count;
37 unsigned irq_threshold_count;
38 unsigned irq_spurious_count;
33} ____cacheline_aligned_in_smp; 39} ____cacheline_aligned_in_smp;
34 40
35extern struct x8664_pda *_cpu_pda[]; 41extern struct x8664_pda *_cpu_pda[];
diff --git a/include/asm-x86/processor_32.h b/include/asm-x86/processor_32.h
index 3845fe72383e..83800e7496ee 100644
--- a/include/asm-x86/processor_32.h
+++ b/include/asm-x86/processor_32.h
@@ -595,7 +595,9 @@ static inline void load_esp0(struct tss_struct *tss, struct thread_struct *threa
595 * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx 595 * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx
596 * resulting in stale register contents being returned. 596 * resulting in stale register contents being returned.
597 */ 597 */
598static inline void cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) 598static inline void cpuid(unsigned int op,
599 unsigned int *eax, unsigned int *ebx,
600 unsigned int *ecx, unsigned int *edx)
599{ 601{
600 *eax = op; 602 *eax = op;
601 *ecx = 0; 603 *ecx = 0;
@@ -603,8 +605,9 @@ static inline void cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx,
603} 605}
604 606
605/* Some CPUID calls want 'count' to be placed in ecx */ 607/* Some CPUID calls want 'count' to be placed in ecx */
606static inline void cpuid_count(int op, int count, int *eax, int *ebx, int *ecx, 608static inline void cpuid_count(unsigned int op, int count,
607 int *edx) 609 unsigned int *eax, unsigned int *ebx,
610 unsigned int *ecx, unsigned int *edx)
608{ 611{
609 *eax = op; 612 *eax = op;
610 *ecx = count; 613 *ecx = count;
@@ -674,6 +677,17 @@ static inline unsigned int cpuid_edx(unsigned int op)
674#define K7_NOP7 ".byte 0x8D,0x04,0x05,0,0,0,0\n" 677#define K7_NOP7 ".byte 0x8D,0x04,0x05,0,0,0,0\n"
675#define K7_NOP8 K7_NOP7 ASM_NOP1 678#define K7_NOP8 K7_NOP7 ASM_NOP1
676 679
680/* P6 nops */
681/* uses eax dependencies (Intel-recommended choice) */
682#define P6_NOP1 GENERIC_NOP1
683#define P6_NOP2 ".byte 0x66,0x90\n"
684#define P6_NOP3 ".byte 0x0f,0x1f,0x00\n"
685#define P6_NOP4 ".byte 0x0f,0x1f,0x40,0\n"
686#define P6_NOP5 ".byte 0x0f,0x1f,0x44,0x00,0\n"
687#define P6_NOP6 ".byte 0x66,0x0f,0x1f,0x44,0x00,0\n"
688#define P6_NOP7 ".byte 0x0f,0x1f,0x80,0,0,0,0\n"
689#define P6_NOP8 ".byte 0x0f,0x1f,0x84,0x00,0,0,0,0\n"
690
677#ifdef CONFIG_MK8 691#ifdef CONFIG_MK8
678#define ASM_NOP1 K8_NOP1 692#define ASM_NOP1 K8_NOP1
679#define ASM_NOP2 K8_NOP2 693#define ASM_NOP2 K8_NOP2
@@ -692,6 +706,17 @@ static inline unsigned int cpuid_edx(unsigned int op)
692#define ASM_NOP6 K7_NOP6 706#define ASM_NOP6 K7_NOP6
693#define ASM_NOP7 K7_NOP7 707#define ASM_NOP7 K7_NOP7
694#define ASM_NOP8 K7_NOP8 708#define ASM_NOP8 K7_NOP8
709#elif defined(CONFIG_M686) || defined(CONFIG_MPENTIUMII) || \
710 defined(CONFIG_MPENTIUMIII) || defined(CONFIG_MPENTIUMM) || \
711 defined(CONFIG_MCORE2) || defined(CONFIG_PENTIUM4)
712#define ASM_NOP1 P6_NOP1
713#define ASM_NOP2 P6_NOP2
714#define ASM_NOP3 P6_NOP3
715#define ASM_NOP4 P6_NOP4
716#define ASM_NOP5 P6_NOP5
717#define ASM_NOP6 P6_NOP6
718#define ASM_NOP7 P6_NOP7
719#define ASM_NOP8 P6_NOP8
695#else 720#else
696#define ASM_NOP1 GENERIC_NOP1 721#define ASM_NOP1 GENERIC_NOP1
697#define ASM_NOP2 GENERIC_NOP2 722#define ASM_NOP2 GENERIC_NOP2
diff --git a/include/asm-x86/processor_64.h b/include/asm-x86/processor_64.h
index 31f579b828f2..f422becbddd9 100644
--- a/include/asm-x86/processor_64.h
+++ b/include/asm-x86/processor_64.h
@@ -334,6 +334,16 @@ struct extended_sigtable {
334}; 334};
335 335
336 336
337#if defined(CONFIG_MPSC) || defined(CONFIG_MCORE2)
338#define ASM_NOP1 P6_NOP1
339#define ASM_NOP2 P6_NOP2
340#define ASM_NOP3 P6_NOP3
341#define ASM_NOP4 P6_NOP4
342#define ASM_NOP5 P6_NOP5
343#define ASM_NOP6 P6_NOP6
344#define ASM_NOP7 P6_NOP7
345#define ASM_NOP8 P6_NOP8
346#else
337#define ASM_NOP1 K8_NOP1 347#define ASM_NOP1 K8_NOP1
338#define ASM_NOP2 K8_NOP2 348#define ASM_NOP2 K8_NOP2
339#define ASM_NOP3 K8_NOP3 349#define ASM_NOP3 K8_NOP3
@@ -342,6 +352,7 @@ struct extended_sigtable {
342#define ASM_NOP6 K8_NOP6 352#define ASM_NOP6 K8_NOP6
343#define ASM_NOP7 K8_NOP7 353#define ASM_NOP7 K8_NOP7
344#define ASM_NOP8 K8_NOP8 354#define ASM_NOP8 K8_NOP8
355#endif
345 356
346/* Opteron nops */ 357/* Opteron nops */
347#define K8_NOP1 ".byte 0x90\n" 358#define K8_NOP1 ".byte 0x90\n"
@@ -353,6 +364,17 @@ struct extended_sigtable {
353#define K8_NOP7 K8_NOP4 K8_NOP3 364#define K8_NOP7 K8_NOP4 K8_NOP3
354#define K8_NOP8 K8_NOP4 K8_NOP4 365#define K8_NOP8 K8_NOP4 K8_NOP4
355 366
367/* P6 nops */
368/* uses eax dependencies (Intel-recommended choice) */
369#define P6_NOP1 ".byte 0x90\n"
370#define P6_NOP2 ".byte 0x66,0x90\n"
371#define P6_NOP3 ".byte 0x0f,0x1f,0x00\n"
372#define P6_NOP4 ".byte 0x0f,0x1f,0x40,0\n"
373#define P6_NOP5 ".byte 0x0f,0x1f,0x44,0x00,0\n"
374#define P6_NOP6 ".byte 0x66,0x0f,0x1f,0x44,0x00,0\n"
375#define P6_NOP7 ".byte 0x0f,0x1f,0x80,0,0,0,0\n"
376#define P6_NOP8 ".byte 0x0f,0x1f,0x84,0x00,0,0,0,0\n"
377
356#define ASM_NOP_MAX 8 378#define ASM_NOP_MAX 8
357 379
358/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ 380/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
@@ -389,11 +411,6 @@ static inline void prefetchw(void *x)
389 411
390#define cpu_relax() rep_nop() 412#define cpu_relax() rep_nop()
391 413
392static inline void serialize_cpu(void)
393{
394 __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");
395}
396
397static inline void __monitor(const void *eax, unsigned long ecx, 414static inline void __monitor(const void *eax, unsigned long ecx,
398 unsigned long edx) 415 unsigned long edx)
399{ 416{
diff --git a/include/asm-x86/ptrace-abi.h b/include/asm-x86/ptrace-abi.h
index 6824c49def1c..7524e1233833 100644
--- a/include/asm-x86/ptrace-abi.h
+++ b/include/asm-x86/ptrace-abi.h
@@ -1,13 +1,81 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_PTRACE_ABI_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_PTRACE_ABI_H
3# include "ptrace-abi_32.h" 3
4# else 4#ifdef __i386__
5# include "ptrace-abi_64.h" 5
6# endif 6#define EBX 0
7#define ECX 1
8#define EDX 2
9#define ESI 3
10#define EDI 4
11#define EBP 5
12#define EAX 6
13#define DS 7
14#define ES 8
15#define FS 9
16#define GS 10
17#define ORIG_EAX 11
18#define EIP 12
19#define CS 13
20#define EFL 14
21#define UESP 15
22#define SS 16
23#define FRAME_SIZE 17
24
25#else /* __i386__ */
26
27#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
28#define R15 0
29#define R14 8
30#define R13 16
31#define R12 24
32#define RBP 32
33#define RBX 40
34/* arguments: interrupts/non tracing syscalls only save upto here*/
35#define R11 48
36#define R10 56
37#define R9 64
38#define R8 72
39#define RAX 80
40#define RCX 88
41#define RDX 96
42#define RSI 104
43#define RDI 112
44#define ORIG_RAX 120 /* = ERROR */
45/* end of arguments */
46/* cpu exception frame or undefined in case of fast syscall. */
47#define RIP 128
48#define CS 136
49#define EFLAGS 144
50#define RSP 152
51#define SS 160
52#define ARGOFFSET R11
53#endif /* __ASSEMBLY__ */
54
55/* top of stack page */
56#define FRAME_SIZE 168
57
58#endif /* !__i386__ */
59
60/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
61#define PTRACE_GETREGS 12
62#define PTRACE_SETREGS 13
63#define PTRACE_GETFPREGS 14
64#define PTRACE_SETFPREGS 15
65#define PTRACE_GETFPXREGS 18
66#define PTRACE_SETFPXREGS 19
67
68#define PTRACE_OLDSETOPTIONS 21
69
70/* only useful for access 32bit programs / kernels */
71#define PTRACE_GET_THREAD_AREA 25
72#define PTRACE_SET_THREAD_AREA 26
73
74#ifdef __x86_64__
75# define PTRACE_ARCH_PRCTL 30
7#else 76#else
8# ifdef __i386__ 77# define PTRACE_SYSEMU 31
9# include "ptrace-abi_32.h" 78# define PTRACE_SYSEMU_SINGLESTEP 32
10# else 79#endif
11# include "ptrace-abi_64.h" 80
12# endif
13#endif 81#endif
diff --git a/include/asm-x86/ptrace-abi_32.h b/include/asm-x86/ptrace-abi_32.h
deleted file mode 100644
index a44901817a26..000000000000
--- a/include/asm-x86/ptrace-abi_32.h
+++ /dev/null
@@ -1,39 +0,0 @@
1#ifndef I386_PTRACE_ABI_H
2#define I386_PTRACE_ABI_H
3
4#define EBX 0
5#define ECX 1
6#define EDX 2
7#define ESI 3
8#define EDI 4
9#define EBP 5
10#define EAX 6
11#define DS 7
12#define ES 8
13#define FS 9
14#define GS 10
15#define ORIG_EAX 11
16#define EIP 12
17#define CS 13
18#define EFL 14
19#define UESP 15
20#define SS 16
21#define FRAME_SIZE 17
22
23/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
24#define PTRACE_GETREGS 12
25#define PTRACE_SETREGS 13
26#define PTRACE_GETFPREGS 14
27#define PTRACE_SETFPREGS 15
28#define PTRACE_GETFPXREGS 18
29#define PTRACE_SETFPXREGS 19
30
31#define PTRACE_OLDSETOPTIONS 21
32
33#define PTRACE_GET_THREAD_AREA 25
34#define PTRACE_SET_THREAD_AREA 26
35
36#define PTRACE_SYSEMU 31
37#define PTRACE_SYSEMU_SINGLESTEP 32
38
39#endif
diff --git a/include/asm-x86/ptrace-abi_64.h b/include/asm-x86/ptrace-abi_64.h
deleted file mode 100644
index 19184b0806b1..000000000000
--- a/include/asm-x86/ptrace-abi_64.h
+++ /dev/null
@@ -1,51 +0,0 @@
1#ifndef _X86_64_PTRACE_ABI_H
2#define _X86_64_PTRACE_ABI_H
3
4#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
5#define R15 0
6#define R14 8
7#define R13 16
8#define R12 24
9#define RBP 32
10#define RBX 40
11/* arguments: interrupts/non tracing syscalls only save upto here*/
12#define R11 48
13#define R10 56
14#define R9 64
15#define R8 72
16#define RAX 80
17#define RCX 88
18#define RDX 96
19#define RSI 104
20#define RDI 112
21#define ORIG_RAX 120 /* = ERROR */
22/* end of arguments */
23/* cpu exception frame or undefined in case of fast syscall. */
24#define RIP 128
25#define CS 136
26#define EFLAGS 144
27#define RSP 152
28#define SS 160
29#define ARGOFFSET R11
30#endif /* __ASSEMBLY__ */
31
32/* top of stack page */
33#define FRAME_SIZE 168
34
35#define PTRACE_OLDSETOPTIONS 21
36
37/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
38#define PTRACE_GETREGS 12
39#define PTRACE_SETREGS 13
40#define PTRACE_GETFPREGS 14
41#define PTRACE_SETFPREGS 15
42#define PTRACE_GETFPXREGS 18
43#define PTRACE_SETFPXREGS 19
44
45/* only useful for access 32bit programs */
46#define PTRACE_GET_THREAD_AREA 25
47#define PTRACE_SET_THREAD_AREA 26
48
49#define PTRACE_ARCH_PRCTL 30 /* arch_prctl for child */
50
51#endif
diff --git a/include/asm-x86/resource.h b/include/asm-x86/resource.h
index 732410a8c02a..04bc4db8921b 100644
--- a/include/asm-x86/resource.h
+++ b/include/asm-x86/resource.h
@@ -1,13 +1 @@
1#ifdef __KERNEL__ #include <asm-generic/resource.h>
2# ifdef CONFIG_X86_32
3# include "resource_32.h"
4# else
5# include "resource_64.h"
6# endif
7#else
8# ifdef __i386__
9# include "resource_32.h"
10# else
11# include "resource_64.h"
12# endif
13#endif
diff --git a/include/asm-x86/resource_32.h b/include/asm-x86/resource_32.h
deleted file mode 100644
index 6c1ea37c7718..000000000000
--- a/include/asm-x86/resource_32.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _I386_RESOURCE_H
2#define _I386_RESOURCE_H
3
4#include <asm-generic/resource.h>
5
6#endif
diff --git a/include/asm-x86/resource_64.h b/include/asm-x86/resource_64.h
deleted file mode 100644
index f40b40623234..000000000000
--- a/include/asm-x86/resource_64.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _X8664_RESOURCE_H
2#define _X8664_RESOURCE_H
3
4#include <asm-generic/resource.h>
5
6#endif
diff --git a/include/asm-x86/rtc.h b/include/asm-x86/rtc.h
index 1f0c98eb2e38..f71c3b0ed360 100644
--- a/include/asm-x86/rtc.h
+++ b/include/asm-x86/rtc.h
@@ -1,5 +1 @@
1#ifdef CONFIG_X86_32 #include <asm-generic/rtc.h>
2# include "rtc_32.h"
3#else
4# include "rtc_64.h"
5#endif
diff --git a/include/asm-x86/rtc_32.h b/include/asm-x86/rtc_32.h
deleted file mode 100644
index ffd02109a0e5..000000000000
--- a/include/asm-x86/rtc_32.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef _I386_RTC_H
2#define _I386_RTC_H
3
4/*
5 * x86 uses the default access methods for the RTC.
6 */
7
8#include <asm-generic/rtc.h>
9
10#endif
diff --git a/include/asm-x86/rtc_64.h b/include/asm-x86/rtc_64.h
deleted file mode 100644
index 18ed713ac7de..000000000000
--- a/include/asm-x86/rtc_64.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef _X86_64_RTC_H
2#define _X86_64_RTC_H
3
4/*
5 * x86 uses the default access methods for the RTC.
6 */
7
8#include <asm-generic/rtc.h>
9
10#endif
diff --git a/include/asm-x86/rwlock.h b/include/asm-x86/rwlock.h
index a3be7d8364af..f2b64a429e6b 100644
--- a/include/asm-x86/rwlock.h
+++ b/include/asm-x86/rwlock.h
@@ -1,5 +1,9 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_RWLOCK_H
2# include "rwlock_32.h" 2#define _ASM_X86_RWLOCK_H
3#else 3
4# include "rwlock_64.h" 4#define RW_LOCK_BIAS 0x01000000
5#endif 5#define RW_LOCK_BIAS_STR "0x01000000"
6
7/* Actual code is in asm/spinlock.h or in arch/x86/lib/rwlock.S */
8
9#endif /* _ASM_X86_RWLOCK_H */
diff --git a/include/asm-x86/rwlock_32.h b/include/asm-x86/rwlock_32.h
deleted file mode 100644
index c3e5db32fa48..000000000000
--- a/include/asm-x86/rwlock_32.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/* include/asm-i386/rwlock.h
2 *
3 * Helpers used by both rw spinlocks and rw semaphores.
4 *
5 * Based in part on code from semaphore.h and
6 * spinlock.h Copyright 1996 Linus Torvalds.
7 *
8 * Copyright 1999 Red Hat, Inc.
9 *
10 * Written by Benjamin LaHaise.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version
15 * 2 of the License, or (at your option) any later version.
16 */
17#ifndef _ASM_I386_RWLOCK_H
18#define _ASM_I386_RWLOCK_H
19
20#define RW_LOCK_BIAS 0x01000000
21#define RW_LOCK_BIAS_STR "0x01000000"
22
23/* Code is in asm-i386/spinlock.h */
24
25#endif
diff --git a/include/asm-x86/rwlock_64.h b/include/asm-x86/rwlock_64.h
deleted file mode 100644
index 72aeebed920b..000000000000
--- a/include/asm-x86/rwlock_64.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/* include/asm-x86_64/rwlock.h
2 *
3 * Helpers used by both rw spinlocks and rw semaphores.
4 *
5 * Based in part on code from semaphore.h and
6 * spinlock.h Copyright 1996 Linus Torvalds.
7 *
8 * Copyright 1999 Red Hat, Inc.
9 * Copyright 2001,2002 SuSE labs
10 *
11 * Written by Benjamin LaHaise.
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version
16 * 2 of the License, or (at your option) any later version.
17 */
18#ifndef _ASM_X86_64_RWLOCK_H
19#define _ASM_X86_64_RWLOCK_H
20
21#define RW_LOCK_BIAS 0x01000000
22#define RW_LOCK_BIAS_STR "0x01000000"
23
24/* Actual code is in asm/spinlock.h or in arch/x86_64/lib/rwlock.S */
25
26#endif
diff --git a/include/asm-x86/sections.h b/include/asm-x86/sections.h
index ae6c69d9be3f..2b8c5160388f 100644
--- a/include/asm-x86/sections.h
+++ b/include/asm-x86/sections.h
@@ -1,5 +1 @@
1#ifdef CONFIG_X86_32 #include <asm-generic/sections.h>
2# include "sections_32.h"
3#else
4# include "sections_64.h"
5#endif
diff --git a/include/asm-x86/sections_32.h b/include/asm-x86/sections_32.h
deleted file mode 100644
index 2dcbb92918b2..000000000000
--- a/include/asm-x86/sections_32.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _I386_SECTIONS_H
2#define _I386_SECTIONS_H
3
4/* nothing to see, move along */
5#include <asm-generic/sections.h>
6
7#endif
diff --git a/include/asm-x86/sections_64.h b/include/asm-x86/sections_64.h
deleted file mode 100644
index c746d9f1e70c..000000000000
--- a/include/asm-x86/sections_64.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _X8664_SECTIONS_H
2#define _X8664_SECTIONS_H
3
4/* nothing to see, move along */
5#include <asm-generic/sections.h>
6
7#endif
diff --git a/include/asm-x86/sembuf.h b/include/asm-x86/sembuf.h
index e42c971e383f..ee50c801f7b7 100644
--- a/include/asm-x86/sembuf.h
+++ b/include/asm-x86/sembuf.h
@@ -1,13 +1,24 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_SEMBUF_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_SEMBUF_H
3# include "sembuf_32.h" 3
4# else 4/*
5# include "sembuf_64.h" 5 * The semid64_ds structure for x86 architecture.
6# endif 6 * Note extra padding because this structure is passed back and forth
7#else 7 * between kernel and user space.
8# ifdef __i386__ 8 *
9# include "sembuf_32.h" 9 * Pad space is left for:
10# else 10 * - 64-bit time_t to solve y2038 problem
11# include "sembuf_64.h" 11 * - 2 miscellaneous 32-bit values
12# endif 12 */
13#endif 13struct semid64_ds {
14 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
15 __kernel_time_t sem_otime; /* last semop time */
16 unsigned long __unused1;
17 __kernel_time_t sem_ctime; /* last change time */
18 unsigned long __unused2;
19 unsigned long sem_nsems; /* no. of semaphores in array */
20 unsigned long __unused3;
21 unsigned long __unused4;
22};
23
24#endif /* _ASM_X86_SEMBUF_H */
diff --git a/include/asm-x86/sembuf_32.h b/include/asm-x86/sembuf_32.h
deleted file mode 100644
index 323835166c14..000000000000
--- a/include/asm-x86/sembuf_32.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef _I386_SEMBUF_H
2#define _I386_SEMBUF_H
3
4/*
5 * The semid64_ds structure for i386 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct semid64_ds {
15 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
16 __kernel_time_t sem_otime; /* last semop time */
17 unsigned long __unused1;
18 __kernel_time_t sem_ctime; /* last change time */
19 unsigned long __unused2;
20 unsigned long sem_nsems; /* no. of semaphores in array */
21 unsigned long __unused3;
22 unsigned long __unused4;
23};
24
25#endif /* _I386_SEMBUF_H */
diff --git a/include/asm-x86/sembuf_64.h b/include/asm-x86/sembuf_64.h
deleted file mode 100644
index 63b52925ae2a..000000000000
--- a/include/asm-x86/sembuf_64.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef _X86_64_SEMBUF_H
2#define _X86_64_SEMBUF_H
3
4/*
5 * The semid64_ds structure for x86_64 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct semid64_ds {
15 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
16 __kernel_time_t sem_otime; /* last semop time */
17 unsigned long __unused1;
18 __kernel_time_t sem_ctime; /* last change time */
19 unsigned long __unused2;
20 unsigned long sem_nsems; /* no. of semaphores in array */
21 unsigned long __unused3;
22 unsigned long __unused4;
23};
24
25#endif /* _X86_64_SEMBUF_H */
diff --git a/include/asm-x86/serial.h b/include/asm-x86/serial.h
index cf1b05227b29..628c801535ea 100644
--- a/include/asm-x86/serial.h
+++ b/include/asm-x86/serial.h
@@ -1,5 +1,29 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_SERIAL_H
2# include "serial_32.h" 2#define _ASM_X86_SERIAL_H
3
4/*
5 * This assumes you have a 1.8432 MHz clock for your UART.
6 *
7 * It'd be nice if someone built a serial card with a 24.576 MHz
8 * clock, since the 16550A is capable of handling a top speed of 1.5
9 * megabits/second; but this requires the faster clock.
10 */
11#define BASE_BAUD ( 1843200 / 16 )
12
13/* Standard COM flags (except for COM4, because of the 8514 problem) */
14#ifdef CONFIG_SERIAL_DETECT_IRQ
15#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
16#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
3#else 17#else
4# include "serial_64.h" 18#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
19#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
5#endif 20#endif
21
22#define SERIAL_PORT_DFNS \
23 /* UART CLK PORT IRQ FLAGS */ \
24 { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \
25 { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \
26 { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \
27 { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */
28
29#endif /* _ASM_X86_SERIAL_H */
diff --git a/include/asm-x86/serial_32.h b/include/asm-x86/serial_32.h
deleted file mode 100644
index bd67480ca109..000000000000
--- a/include/asm-x86/serial_32.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * include/asm-i386/serial.h
3 */
4
5
6/*
7 * This assumes you have a 1.8432 MHz clock for your UART.
8 *
9 * It'd be nice if someone built a serial card with a 24.576 MHz
10 * clock, since the 16550A is capable of handling a top speed of 1.5
11 * megabits/second; but this requires the faster clock.
12 */
13#define BASE_BAUD ( 1843200 / 16 )
14
15/* Standard COM flags (except for COM4, because of the 8514 problem) */
16#ifdef CONFIG_SERIAL_DETECT_IRQ
17#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
18#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
19#else
20#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
21#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
22#endif
23
24#define SERIAL_PORT_DFNS \
25 /* UART CLK PORT IRQ FLAGS */ \
26 { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \
27 { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \
28 { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \
29 { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */
diff --git a/include/asm-x86/serial_64.h b/include/asm-x86/serial_64.h
deleted file mode 100644
index b0496e0d72a6..000000000000
--- a/include/asm-x86/serial_64.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * include/asm-x86_64/serial.h
3 */
4
5
6/*
7 * This assumes you have a 1.8432 MHz clock for your UART.
8 *
9 * It'd be nice if someone built a serial card with a 24.576 MHz
10 * clock, since the 16550A is capable of handling a top speed of 1.5
11 * megabits/second; but this requires the faster clock.
12 */
13#define BASE_BAUD ( 1843200 / 16 )
14
15/* Standard COM flags (except for COM4, because of the 8514 problem) */
16#ifdef CONFIG_SERIAL_DETECT_IRQ
17#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
18#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
19#else
20#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
21#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
22#endif
23
24#define SERIAL_PORT_DFNS \
25 /* UART CLK PORT IRQ FLAGS */ \
26 { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \
27 { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \
28 { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \
29 { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */
diff --git a/include/asm-x86/shmparam.h b/include/asm-x86/shmparam.h
index 165627cc5345..0880cf0917b9 100644
--- a/include/asm-x86/shmparam.h
+++ b/include/asm-x86/shmparam.h
@@ -1,13 +1,6 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_SHMPARAM_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_SHMPARAM_H
3# include "shmparam_32.h" 3
4# else 4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
5# include "shmparam_64.h" 5
6# endif 6#endif /* _ASM_X86_SHMPARAM_H */
7#else
8# ifdef __i386__
9# include "shmparam_32.h"
10# else
11# include "shmparam_64.h"
12# endif
13#endif
diff --git a/include/asm-x86/shmparam_32.h b/include/asm-x86/shmparam_32.h
deleted file mode 100644
index 786243a5b319..000000000000
--- a/include/asm-x86/shmparam_32.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASMI386_SHMPARAM_H
2#define _ASMI386_SHMPARAM_H
3
4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
5
6#endif /* _ASMI386_SHMPARAM_H */
diff --git a/include/asm-x86/shmparam_64.h b/include/asm-x86/shmparam_64.h
deleted file mode 100644
index d7021620dcb7..000000000000
--- a/include/asm-x86/shmparam_64.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASMX8664_SHMPARAM_H
2#define _ASMX8664_SHMPARAM_H
3
4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
5
6#endif /* _ASMX8664_SHMPARAM_H */
diff --git a/include/asm-x86/siginfo.h b/include/asm-x86/siginfo.h
index 0b8e4bb47d25..a477bea0c2a1 100644
--- a/include/asm-x86/siginfo.h
+++ b/include/asm-x86/siginfo.h
@@ -1,13 +1,10 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_SIGINFO_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_SIGINFO_H
3# include "siginfo_32.h" 3
4# else 4#ifdef __x86_64__
5# include "siginfo_64.h" 5# define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
6# endif 6#endif
7#else 7
8# ifdef __i386__ 8#include <asm-generic/siginfo.h>
9# include "siginfo_32.h" 9
10# else
11# include "siginfo_64.h"
12# endif
13#endif 10#endif
diff --git a/include/asm-x86/siginfo_32.h b/include/asm-x86/siginfo_32.h
deleted file mode 100644
index fe18f98fccfa..000000000000
--- a/include/asm-x86/siginfo_32.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _I386_SIGINFO_H
2#define _I386_SIGINFO_H
3
4#include <asm-generic/siginfo.h>
5
6#endif
diff --git a/include/asm-x86/siginfo_64.h b/include/asm-x86/siginfo_64.h
deleted file mode 100644
index d09a1e6e7246..000000000000
--- a/include/asm-x86/siginfo_64.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _X8664_SIGINFO_H
2#define _X8664_SIGINFO_H
3
4#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
5
6#include <asm-generic/siginfo.h>
7
8#endif
diff --git a/include/asm-x86/smp_32.h b/include/asm-x86/smp_32.h
index 955dd7c8538f..ee46038d126c 100644
--- a/include/asm-x86/smp_32.h
+++ b/include/asm-x86/smp_32.h
@@ -92,12 +92,9 @@ static inline void smp_send_reschedule(int cpu)
92{ 92{
93 smp_ops.smp_send_reschedule(cpu); 93 smp_ops.smp_send_reschedule(cpu);
94} 94}
95static inline int smp_call_function_mask(cpumask_t mask, 95extern int smp_call_function_mask(cpumask_t mask,
96 void (*func) (void *info), void *info, 96 void (*func) (void *info), void *info,
97 int wait) 97 int wait);
98{
99 return smp_ops.smp_call_function_mask(mask, func, info, wait);
100}
101 98
102void native_smp_prepare_boot_cpu(void); 99void native_smp_prepare_boot_cpu(void);
103void native_smp_prepare_cpus(unsigned int max_cpus); 100void native_smp_prepare_cpus(unsigned int max_cpus);
diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h
index f5bcee1c0927..d30e9b684fdd 100644
--- a/include/asm-x86/smp_64.h
+++ b/include/asm-x86/smp_64.h
@@ -85,7 +85,6 @@ static inline int hard_smp_processor_id(void)
85 * the real APIC ID <-> CPU # mapping. 85 * the real APIC ID <-> CPU # mapping.
86 */ 86 */
87extern u8 x86_cpu_to_apicid[NR_CPUS]; /* physical ID */ 87extern u8 x86_cpu_to_apicid[NR_CPUS]; /* physical ID */
88extern u8 x86_cpu_to_log_apicid[NR_CPUS];
89extern u8 bios_cpu_apicid[]; 88extern u8 bios_cpu_apicid[];
90 89
91static inline int cpu_present_to_apicid(int mps_cpu) 90static inline int cpu_present_to_apicid(int mps_cpu)
diff --git a/include/asm-x86/sockios.h b/include/asm-x86/sockios.h
index 5a134fc70b9c..49cc72b5d3c9 100644
--- a/include/asm-x86/sockios.h
+++ b/include/asm-x86/sockios.h
@@ -1,13 +1,13 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_SOCKIOS_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_SOCKIOS_H
3# include "sockios_32.h" 3
4# else 4/* Socket-level I/O control calls. */
5# include "sockios_64.h" 5#define FIOSETOWN 0x8901
6# endif 6#define SIOCSPGRP 0x8902
7#else 7#define FIOGETOWN 0x8903
8# ifdef __i386__ 8#define SIOCGPGRP 0x8904
9# include "sockios_32.h" 9#define SIOCATMARK 0x8905
10# else 10#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
11# include "sockios_64.h" 11#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
12# endif 12
13#endif 13#endif /* _ASM_X86_SOCKIOS_H */
diff --git a/include/asm-x86/sockios_32.h b/include/asm-x86/sockios_32.h
deleted file mode 100644
index ff528c7d255c..000000000000
--- a/include/asm-x86/sockios_32.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ARCH_I386_SOCKIOS__
2#define __ARCH_I386_SOCKIOS__
3
4/* Socket-level I/O control calls. */
5#define FIOSETOWN 0x8901
6#define SIOCSPGRP 0x8902
7#define FIOGETOWN 0x8903
8#define SIOCGPGRP 0x8904
9#define SIOCATMARK 0x8905
10#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
11#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
12
13#endif
diff --git a/include/asm-x86/sockios_64.h b/include/asm-x86/sockios_64.h
deleted file mode 100644
index d726ba2513e3..000000000000
--- a/include/asm-x86/sockios_64.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ARCH_X8664_SOCKIOS__
2#define __ARCH_X8664_SOCKIOS__
3
4/* Socket-level I/O control calls. */
5#define FIOSETOWN 0x8901
6#define SIOCSPGRP 0x8902
7#define FIOGETOWN 0x8903
8#define SIOCGPGRP 0x8904
9#define SIOCATMARK 0x8905
10#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
11#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
12
13#endif
diff --git a/include/asm-x86/stacktrace.h b/include/asm-x86/stacktrace.h
index 6f0b54594307..70dd5bae3235 100644
--- a/include/asm-x86/stacktrace.h
+++ b/include/asm-x86/stacktrace.h
@@ -15,6 +15,6 @@ struct stacktrace_ops {
15}; 15};
16 16
17void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long *stack, 17void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long *stack,
18 struct stacktrace_ops *ops, void *data); 18 const struct stacktrace_ops *ops, void *data);
19 19
20#endif 20#endif
diff --git a/include/asm-x86/string_32.h b/include/asm-x86/string_32.h
index a9b64453bdf5..55bfa308f900 100644
--- a/include/asm-x86/string_32.h
+++ b/include/asm-x86/string_32.h
@@ -26,9 +26,6 @@ extern int strncmp(const char *cs, const char *ct, size_t count);
26#define __HAVE_ARCH_STRCHR 26#define __HAVE_ARCH_STRCHR
27extern char *strchr(const char *s, int c); 27extern char *strchr(const char *s, int c);
28 28
29#define __HAVE_ARCH_STRRCHR
30extern char *strrchr(const char *s, int c);
31
32#define __HAVE_ARCH_STRLEN 29#define __HAVE_ARCH_STRLEN
33extern size_t strlen(const char *s); 30extern size_t strlen(const char *s);
34 31
diff --git a/include/asm-x86/system_32.h b/include/asm-x86/system_32.h
index d84e593b7dfc..db6283eb5e46 100644
--- a/include/asm-x86/system_32.h
+++ b/include/asm-x86/system_32.h
@@ -142,7 +142,7 @@ static inline unsigned long native_read_cr4_safe(void)
142{ 142{
143 unsigned long val; 143 unsigned long val;
144 /* This could fault if %cr4 does not exist */ 144 /* This could fault if %cr4 does not exist */
145 asm("1: movl %%cr4, %0 \n" 145 asm volatile("1: movl %%cr4, %0 \n"
146 "2: \n" 146 "2: \n"
147 ".section __ex_table,\"a\" \n" 147 ".section __ex_table,\"a\" \n"
148 ".long 1b,2b \n" 148 ".long 1b,2b \n"
@@ -161,6 +161,10 @@ static inline void native_wbinvd(void)
161 asm volatile("wbinvd": : :"memory"); 161 asm volatile("wbinvd": : :"memory");
162} 162}
163 163
164static inline void clflush(volatile void *__p)
165{
166 asm volatile("clflush %0" : "+m" (*(char __force *)__p));
167}
164 168
165#ifdef CONFIG_PARAVIRT 169#ifdef CONFIG_PARAVIRT
166#include <asm/paravirt.h> 170#include <asm/paravirt.h>
diff --git a/include/asm-x86/system_64.h b/include/asm-x86/system_64.h
index 5022aecc333d..4cb23848d460 100644
--- a/include/asm-x86/system_64.h
+++ b/include/asm-x86/system_64.h
@@ -7,9 +7,6 @@
7 7
8#ifdef __KERNEL__ 8#ifdef __KERNEL__
9 9
10#define __STR(x) #x
11#define STR(x) __STR(x)
12
13#define __SAVE(reg,offset) "movq %%" #reg ",(14-" #offset ")*8(%%rsp)\n\t" 10#define __SAVE(reg,offset) "movq %%" #reg ",(14-" #offset ")*8(%%rsp)\n\t"
14#define __RESTORE(reg,offset) "movq (14-" #offset ")*8(%%rsp),%%" #reg "\n\t" 11#define __RESTORE(reg,offset) "movq (14-" #offset ")*8(%%rsp),%%" #reg "\n\t"
15 12
@@ -85,7 +82,7 @@ static inline void write_cr0(unsigned long val)
85static inline unsigned long read_cr2(void) 82static inline unsigned long read_cr2(void)
86{ 83{
87 unsigned long cr2; 84 unsigned long cr2;
88 asm("movq %%cr2,%0" : "=r" (cr2)); 85 asm volatile("movq %%cr2,%0" : "=r" (cr2));
89 return cr2; 86 return cr2;
90} 87}
91 88
@@ -97,7 +94,7 @@ static inline void write_cr2(unsigned long val)
97static inline unsigned long read_cr3(void) 94static inline unsigned long read_cr3(void)
98{ 95{
99 unsigned long cr3; 96 unsigned long cr3;
100 asm("movq %%cr3,%0" : "=r" (cr3)); 97 asm volatile("movq %%cr3,%0" : "=r" (cr3));
101 return cr3; 98 return cr3;
102} 99}
103 100
@@ -109,7 +106,7 @@ static inline void write_cr3(unsigned long val)
109static inline unsigned long read_cr4(void) 106static inline unsigned long read_cr4(void)
110{ 107{
111 unsigned long cr4; 108 unsigned long cr4;
112 asm("movq %%cr4,%0" : "=r" (cr4)); 109 asm volatile("movq %%cr4,%0" : "=r" (cr4));
113 return cr4; 110 return cr4;
114} 111}
115 112
@@ -121,7 +118,7 @@ static inline void write_cr4(unsigned long val)
121static inline unsigned long read_cr8(void) 118static inline unsigned long read_cr8(void)
122{ 119{
123 unsigned long cr8; 120 unsigned long cr8;
124 asm("movq %%cr8,%0" : "=r" (cr8)); 121 asm volatile("movq %%cr8,%0" : "=r" (cr8));
125 return cr8; 122 return cr8;
126} 123}
127 124
@@ -137,6 +134,11 @@ static inline void write_cr8(unsigned long val)
137 134
138#endif /* __KERNEL__ */ 135#endif /* __KERNEL__ */
139 136
137static inline void clflush(volatile void *__p)
138{
139 asm volatile("clflush %0" : "+m" (*(char __force *)__p));
140}
141
140#define nop() __asm__ __volatile__ ("nop") 142#define nop() __asm__ __volatile__ ("nop")
141 143
142#ifdef CONFIG_SMP 144#ifdef CONFIG_SMP
diff --git a/include/asm-x86/termbits.h b/include/asm-x86/termbits.h
index 69f3080e2a1d..af1b70ea440f 100644
--- a/include/asm-x86/termbits.h
+++ b/include/asm-x86/termbits.h
@@ -1,13 +1,198 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_TERMBITS_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_TERMBITS_H
3# include "termbits_32.h" 3
4# else 4#include <linux/posix_types.h>
5# include "termbits_64.h" 5
6# endif 6typedef unsigned char cc_t;
7#else 7typedef unsigned int speed_t;
8# ifdef __i386__ 8typedef unsigned int tcflag_t;
9# include "termbits_32.h" 9
10# else 10#define NCCS 19
11# include "termbits_64.h" 11struct termios {
12# endif 12 tcflag_t c_iflag; /* input mode flags */
13#endif 13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
16 cc_t c_line; /* line discipline */
17 cc_t c_cc[NCCS]; /* control characters */
18};
19
20struct termios2 {
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
25 cc_t c_line; /* line discipline */
26 cc_t c_cc[NCCS]; /* control characters */
27 speed_t c_ispeed; /* input speed */
28 speed_t c_ospeed; /* output speed */
29};
30
31struct ktermios {
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
36 cc_t c_line; /* line discipline */
37 cc_t c_cc[NCCS]; /* control characters */
38 speed_t c_ispeed; /* input speed */
39 speed_t c_ospeed; /* output speed */
40};
41
42/* c_cc characters */
43#define VINTR 0
44#define VQUIT 1
45#define VERASE 2
46#define VKILL 3
47#define VEOF 4
48#define VTIME 5
49#define VMIN 6
50#define VSWTC 7
51#define VSTART 8
52#define VSTOP 9
53#define VSUSP 10
54#define VEOL 11
55#define VREPRINT 12
56#define VDISCARD 13
57#define VWERASE 14
58#define VLNEXT 15
59#define VEOL2 16
60
61/* c_iflag bits */
62#define IGNBRK 0000001
63#define BRKINT 0000002
64#define IGNPAR 0000004
65#define PARMRK 0000010
66#define INPCK 0000020
67#define ISTRIP 0000040
68#define INLCR 0000100
69#define IGNCR 0000200
70#define ICRNL 0000400
71#define IUCLC 0001000
72#define IXON 0002000
73#define IXANY 0004000
74#define IXOFF 0010000
75#define IMAXBEL 0020000
76#define IUTF8 0040000
77
78/* c_oflag bits */
79#define OPOST 0000001
80#define OLCUC 0000002
81#define ONLCR 0000004
82#define OCRNL 0000010
83#define ONOCR 0000020
84#define ONLRET 0000040
85#define OFILL 0000100
86#define OFDEL 0000200
87#define NLDLY 0000400
88#define NL0 0000000
89#define NL1 0000400
90#define CRDLY 0003000
91#define CR0 0000000
92#define CR1 0001000
93#define CR2 0002000
94#define CR3 0003000
95#define TABDLY 0014000
96#define TAB0 0000000
97#define TAB1 0004000
98#define TAB2 0010000
99#define TAB3 0014000
100#define XTABS 0014000
101#define BSDLY 0020000
102#define BS0 0000000
103#define BS1 0020000
104#define VTDLY 0040000
105#define VT0 0000000
106#define VT1 0040000
107#define FFDLY 0100000
108#define FF0 0000000
109#define FF1 0100000
110
111/* c_cflag bit meaning */
112#define CBAUD 0010017
113#define B0 0000000 /* hang up */
114#define B50 0000001
115#define B75 0000002
116#define B110 0000003
117#define B134 0000004
118#define B150 0000005
119#define B200 0000006
120#define B300 0000007
121#define B600 0000010
122#define B1200 0000011
123#define B1800 0000012
124#define B2400 0000013
125#define B4800 0000014
126#define B9600 0000015
127#define B19200 0000016
128#define B38400 0000017
129#define EXTA B19200
130#define EXTB B38400
131#define CSIZE 0000060
132#define CS5 0000000
133#define CS6 0000020
134#define CS7 0000040
135#define CS8 0000060
136#define CSTOPB 0000100
137#define CREAD 0000200
138#define PARENB 0000400
139#define PARODD 0001000
140#define HUPCL 0002000
141#define CLOCAL 0004000
142#define CBAUDEX 0010000
143#define BOTHER 0010000 /* non standard rate */
144#define B57600 0010001
145#define B115200 0010002
146#define B230400 0010003
147#define B460800 0010004
148#define B500000 0010005
149#define B576000 0010006
150#define B921600 0010007
151#define B1000000 0010010
152#define B1152000 0010011
153#define B1500000 0010012
154#define B2000000 0010013
155#define B2500000 0010014
156#define B3000000 0010015
157#define B3500000 0010016
158#define B4000000 0010017
159#define CIBAUD 002003600000 /* input baud rate */
160#define CMSPAR 010000000000 /* mark or space (stick) parity */
161#define CRTSCTS 020000000000 /* flow control */
162
163#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
164
165/* c_lflag bits */
166#define ISIG 0000001
167#define ICANON 0000002
168#define XCASE 0000004
169#define ECHO 0000010
170#define ECHOE 0000020
171#define ECHOK 0000040
172#define ECHONL 0000100
173#define NOFLSH 0000200
174#define TOSTOP 0000400
175#define ECHOCTL 0001000
176#define ECHOPRT 0002000
177#define ECHOKE 0004000
178#define FLUSHO 0010000
179#define PENDIN 0040000
180#define IEXTEN 0100000
181
182/* tcflow() and TCXONC use these */
183#define TCOOFF 0
184#define TCOON 1
185#define TCIOFF 2
186#define TCION 3
187
188/* tcflush() and TCFLSH use these */
189#define TCIFLUSH 0
190#define TCOFLUSH 1
191#define TCIOFLUSH 2
192
193/* tcsetattr uses these */
194#define TCSANOW 0
195#define TCSADRAIN 1
196#define TCSAFLUSH 2
197
198#endif /* _ASM_X86_TERMBITS_H */
diff --git a/include/asm-x86/termbits_32.h b/include/asm-x86/termbits_32.h
deleted file mode 100644
index a21700352e7b..000000000000
--- a/include/asm-x86/termbits_32.h
+++ /dev/null
@@ -1,198 +0,0 @@
1#ifndef __ARCH_I386_TERMBITS_H__
2#define __ARCH_I386_TERMBITS_H__
3
4#include <linux/posix_types.h>
5
6typedef unsigned char cc_t;
7typedef unsigned int speed_t;
8typedef unsigned int tcflag_t;
9
10#define NCCS 19
11struct termios {
12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
16 cc_t c_line; /* line discipline */
17 cc_t c_cc[NCCS]; /* control characters */
18};
19
20struct termios2 {
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
25 cc_t c_line; /* line discipline */
26 cc_t c_cc[NCCS]; /* control characters */
27 speed_t c_ispeed; /* input speed */
28 speed_t c_ospeed; /* output speed */
29};
30
31struct ktermios {
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
36 cc_t c_line; /* line discipline */
37 cc_t c_cc[NCCS]; /* control characters */
38 speed_t c_ispeed; /* input speed */
39 speed_t c_ospeed; /* output speed */
40};
41
42/* c_cc characters */
43#define VINTR 0
44#define VQUIT 1
45#define VERASE 2
46#define VKILL 3
47#define VEOF 4
48#define VTIME 5
49#define VMIN 6
50#define VSWTC 7
51#define VSTART 8
52#define VSTOP 9
53#define VSUSP 10
54#define VEOL 11
55#define VREPRINT 12
56#define VDISCARD 13
57#define VWERASE 14
58#define VLNEXT 15
59#define VEOL2 16
60
61/* c_iflag bits */
62#define IGNBRK 0000001
63#define BRKINT 0000002
64#define IGNPAR 0000004
65#define PARMRK 0000010
66#define INPCK 0000020
67#define ISTRIP 0000040
68#define INLCR 0000100
69#define IGNCR 0000200
70#define ICRNL 0000400
71#define IUCLC 0001000
72#define IXON 0002000
73#define IXANY 0004000
74#define IXOFF 0010000
75#define IMAXBEL 0020000
76#define IUTF8 0040000
77
78/* c_oflag bits */
79#define OPOST 0000001
80#define OLCUC 0000002
81#define ONLCR 0000004
82#define OCRNL 0000010
83#define ONOCR 0000020
84#define ONLRET 0000040
85#define OFILL 0000100
86#define OFDEL 0000200
87#define NLDLY 0000400
88#define NL0 0000000
89#define NL1 0000400
90#define CRDLY 0003000
91#define CR0 0000000
92#define CR1 0001000
93#define CR2 0002000
94#define CR3 0003000
95#define TABDLY 0014000
96#define TAB0 0000000
97#define TAB1 0004000
98#define TAB2 0010000
99#define TAB3 0014000
100#define XTABS 0014000
101#define BSDLY 0020000
102#define BS0 0000000
103#define BS1 0020000
104#define VTDLY 0040000
105#define VT0 0000000
106#define VT1 0040000
107#define FFDLY 0100000
108#define FF0 0000000
109#define FF1 0100000
110
111/* c_cflag bit meaning */
112#define CBAUD 0010017
113#define B0 0000000 /* hang up */
114#define B50 0000001
115#define B75 0000002
116#define B110 0000003
117#define B134 0000004
118#define B150 0000005
119#define B200 0000006
120#define B300 0000007
121#define B600 0000010
122#define B1200 0000011
123#define B1800 0000012
124#define B2400 0000013
125#define B4800 0000014
126#define B9600 0000015
127#define B19200 0000016
128#define B38400 0000017
129#define EXTA B19200
130#define EXTB B38400
131#define CSIZE 0000060
132#define CS5 0000000
133#define CS6 0000020
134#define CS7 0000040
135#define CS8 0000060
136#define CSTOPB 0000100
137#define CREAD 0000200
138#define PARENB 0000400
139#define PARODD 0001000
140#define HUPCL 0002000
141#define CLOCAL 0004000
142#define CBAUDEX 0010000
143#define BOTHER 0010000
144#define B57600 0010001
145#define B115200 0010002
146#define B230400 0010003
147#define B460800 0010004
148#define B500000 0010005
149#define B576000 0010006
150#define B921600 0010007
151#define B1000000 0010010
152#define B1152000 0010011
153#define B1500000 0010012
154#define B2000000 0010013
155#define B2500000 0010014
156#define B3000000 0010015
157#define B3500000 0010016
158#define B4000000 0010017
159#define CIBAUD 002003600000
160#define CMSPAR 010000000000 /* mark or space (stick) parity */
161#define CRTSCTS 020000000000 /* flow control */
162
163#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
164
165/* c_lflag bits */
166#define ISIG 0000001
167#define ICANON 0000002
168#define XCASE 0000004
169#define ECHO 0000010
170#define ECHOE 0000020
171#define ECHOK 0000040
172#define ECHONL 0000100
173#define NOFLSH 0000200
174#define TOSTOP 0000400
175#define ECHOCTL 0001000
176#define ECHOPRT 0002000
177#define ECHOKE 0004000
178#define FLUSHO 0010000
179#define PENDIN 0040000
180#define IEXTEN 0100000
181
182/* tcflow() and TCXONC use these */
183#define TCOOFF 0
184#define TCOON 1
185#define TCIOFF 2
186#define TCION 3
187
188/* tcflush() and TCFLSH use these */
189#define TCIFLUSH 0
190#define TCOFLUSH 1
191#define TCIOFLUSH 2
192
193/* tcsetattr uses these */
194#define TCSANOW 0
195#define TCSADRAIN 1
196#define TCSAFLUSH 2
197
198#endif
diff --git a/include/asm-x86/termbits_64.h b/include/asm-x86/termbits_64.h
deleted file mode 100644
index 7405756dd41b..000000000000
--- a/include/asm-x86/termbits_64.h
+++ /dev/null
@@ -1,198 +0,0 @@
1#ifndef __ARCH_X8664_TERMBITS_H__
2#define __ARCH_X8664_TERMBITS_H__
3
4#include <linux/posix_types.h>
5
6typedef unsigned char cc_t;
7typedef unsigned int speed_t;
8typedef unsigned int tcflag_t;
9
10#define NCCS 19
11struct termios {
12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
16 cc_t c_line; /* line discipline */
17 cc_t c_cc[NCCS]; /* control characters */
18};
19
20struct termios2 {
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
25 cc_t c_line; /* line discipline */
26 cc_t c_cc[NCCS]; /* control characters */
27 speed_t c_ispeed; /* input speed */
28 speed_t c_ospeed; /* output speed */
29};
30
31struct ktermios {
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
36 cc_t c_line; /* line discipline */
37 cc_t c_cc[NCCS]; /* control characters */
38 speed_t c_ispeed; /* input speed */
39 speed_t c_ospeed; /* output speed */
40};
41
42/* c_cc characters */
43#define VINTR 0
44#define VQUIT 1
45#define VERASE 2
46#define VKILL 3
47#define VEOF 4
48#define VTIME 5
49#define VMIN 6
50#define VSWTC 7
51#define VSTART 8
52#define VSTOP 9
53#define VSUSP 10
54#define VEOL 11
55#define VREPRINT 12
56#define VDISCARD 13
57#define VWERASE 14
58#define VLNEXT 15
59#define VEOL2 16
60
61/* c_iflag bits */
62#define IGNBRK 0000001
63#define BRKINT 0000002
64#define IGNPAR 0000004
65#define PARMRK 0000010
66#define INPCK 0000020
67#define ISTRIP 0000040
68#define INLCR 0000100
69#define IGNCR 0000200
70#define ICRNL 0000400
71#define IUCLC 0001000
72#define IXON 0002000
73#define IXANY 0004000
74#define IXOFF 0010000
75#define IMAXBEL 0020000
76#define IUTF8 0040000
77
78/* c_oflag bits */
79#define OPOST 0000001
80#define OLCUC 0000002
81#define ONLCR 0000004
82#define OCRNL 0000010
83#define ONOCR 0000020
84#define ONLRET 0000040
85#define OFILL 0000100
86#define OFDEL 0000200
87#define NLDLY 0000400
88#define NL0 0000000
89#define NL1 0000400
90#define CRDLY 0003000
91#define CR0 0000000
92#define CR1 0001000
93#define CR2 0002000
94#define CR3 0003000
95#define TABDLY 0014000
96#define TAB0 0000000
97#define TAB1 0004000
98#define TAB2 0010000
99#define TAB3 0014000
100#define XTABS 0014000
101#define BSDLY 0020000
102#define BS0 0000000
103#define BS1 0020000
104#define VTDLY 0040000
105#define VT0 0000000
106#define VT1 0040000
107#define FFDLY 0100000
108#define FF0 0000000
109#define FF1 0100000
110
111/* c_cflag bit meaning */
112#define CBAUD 0010017
113#define B0 0000000 /* hang up */
114#define B50 0000001
115#define B75 0000002
116#define B110 0000003
117#define B134 0000004
118#define B150 0000005
119#define B200 0000006
120#define B300 0000007
121#define B600 0000010
122#define B1200 0000011
123#define B1800 0000012
124#define B2400 0000013
125#define B4800 0000014
126#define B9600 0000015
127#define B19200 0000016
128#define B38400 0000017
129#define EXTA B19200
130#define EXTB B38400
131#define CSIZE 0000060
132#define CS5 0000000
133#define CS6 0000020
134#define CS7 0000040
135#define CS8 0000060
136#define CSTOPB 0000100
137#define CREAD 0000200
138#define PARENB 0000400
139#define PARODD 0001000
140#define HUPCL 0002000
141#define CLOCAL 0004000
142#define CBAUDEX 0010000
143#define BOTHER 0010000 /* non standard rate */
144#define B57600 0010001
145#define B115200 0010002
146#define B230400 0010003
147#define B460800 0010004
148#define B500000 0010005
149#define B576000 0010006
150#define B921600 0010007
151#define B1000000 0010010
152#define B1152000 0010011
153#define B1500000 0010012
154#define B2000000 0010013
155#define B2500000 0010014
156#define B3000000 0010015
157#define B3500000 0010016
158#define B4000000 0010017
159#define CIBAUD 002003600000 /* input baud rate */
160#define CMSPAR 010000000000 /* mark or space (stick) parity */
161#define CRTSCTS 020000000000 /* flow control */
162
163#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
164
165/* c_lflag bits */
166#define ISIG 0000001
167#define ICANON 0000002
168#define XCASE 0000004
169#define ECHO 0000010
170#define ECHOE 0000020
171#define ECHOK 0000040
172#define ECHONL 0000100
173#define NOFLSH 0000200
174#define TOSTOP 0000400
175#define ECHOCTL 0001000
176#define ECHOPRT 0002000
177#define ECHOKE 0004000
178#define FLUSHO 0010000
179#define PENDIN 0040000
180#define IEXTEN 0100000
181
182/* tcflow() and TCXONC use these */
183#define TCOOFF 0
184#define TCOON 1
185#define TCIOFF 2
186#define TCION 3
187
188/* tcflush() and TCFLSH use these */
189#define TCIFLUSH 0
190#define TCOFLUSH 1
191#define TCIOFLUSH 2
192
193/* tcsetattr uses these */
194#define TCSANOW 0
195#define TCSADRAIN 1
196#define TCSAFLUSH 2
197
198#endif
diff --git a/include/asm-x86/termios.h b/include/asm-x86/termios.h
index a4f4ae20a591..d501748700d2 100644
--- a/include/asm-x86/termios.h
+++ b/include/asm-x86/termios.h
@@ -1,13 +1,97 @@
1#ifndef _ASM_X86_TERMIOS_H
2#define _ASM_X86_TERMIOS_H
3
4#include <asm/termbits.h>
5#include <asm/ioctls.h>
6
7struct winsize {
8 unsigned short ws_row;
9 unsigned short ws_col;
10 unsigned short ws_xpixel;
11 unsigned short ws_ypixel;
12};
13
14#define NCC 8
15struct termio {
16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
20 unsigned char c_line; /* line discipline */
21 unsigned char c_cc[NCC]; /* control characters */
22};
23
24/* modem lines */
25#define TIOCM_LE 0x001
26#define TIOCM_DTR 0x002
27#define TIOCM_RTS 0x004
28#define TIOCM_ST 0x008
29#define TIOCM_SR 0x010
30#define TIOCM_CTS 0x020
31#define TIOCM_CAR 0x040
32#define TIOCM_RNG 0x080
33#define TIOCM_DSR 0x100
34#define TIOCM_CD TIOCM_CAR
35#define TIOCM_RI TIOCM_RNG
36#define TIOCM_OUT1 0x2000
37#define TIOCM_OUT2 0x4000
38#define TIOCM_LOOP 0x8000
39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41
1#ifdef __KERNEL__ 42#ifdef __KERNEL__
2# ifdef CONFIG_X86_32 43
3# include "termios_32.h" 44/* intr=^C quit=^\ erase=del kill=^U
4# else 45 eof=^D vtime=\0 vmin=\1 sxtc=\0
5# include "termios_64.h" 46 start=^Q stop=^S susp=^Z eol=\0
6# endif 47 reprint=^R discard=^U werase=^W lnext=^V
7#else 48 eol2=\0
8# ifdef __i386__ 49*/
9# include "termios_32.h" 50#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
10# else 51
11# include "termios_64.h" 52/*
12# endif 53 * Translate a "termio" structure into a "termios". Ugh.
13#endif 54 */
55#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
56 unsigned short __tmp; \
57 get_user(__tmp,&(termio)->x); \
58 *(unsigned short *) &(termios)->x = __tmp; \
59}
60
61#define user_termio_to_kernel_termios(termios, termio) \
62({ \
63 SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
64 SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
65 SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
66 SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
67 copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
68})
69
70/*
71 * Translate a "termios" structure into a "termio". Ugh.
72 */
73#define kernel_termios_to_user_termio(termio, termios) \
74({ \
75 put_user((termios)->c_iflag, &(termio)->c_iflag); \
76 put_user((termios)->c_oflag, &(termio)->c_oflag); \
77 put_user((termios)->c_cflag, &(termio)->c_cflag); \
78 put_user((termios)->c_lflag, &(termio)->c_lflag); \
79 put_user((termios)->c_line, &(termio)->c_line); \
80 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
81})
82
83#define user_termios_to_kernel_termios(k, u) \
84 copy_from_user(k, u, sizeof(struct termios2))
85
86#define kernel_termios_to_user_termios(u, k) \
87 copy_to_user(u, k, sizeof(struct termios2))
88
89#define user_termios_to_kernel_termios_1(k, u) \
90 copy_from_user(k, u, sizeof(struct termios))
91
92#define kernel_termios_to_user_termios_1(u, k) \
93 copy_to_user(u, k, sizeof(struct termios))
94
95#endif /* __KERNEL__ */
96
97#endif /* _ASM_X86_TERMIOS_H */
diff --git a/include/asm-x86/termios_32.h b/include/asm-x86/termios_32.h
deleted file mode 100644
index 6fdb2c841b73..000000000000
--- a/include/asm-x86/termios_32.h
+++ /dev/null
@@ -1,90 +0,0 @@
1#ifndef _I386_TERMIOS_H
2#define _I386_TERMIOS_H
3
4#include <asm/termbits.h>
5#include <asm/ioctls.h>
6
7struct winsize {
8 unsigned short ws_row;
9 unsigned short ws_col;
10 unsigned short ws_xpixel;
11 unsigned short ws_ypixel;
12};
13
14#define NCC 8
15struct termio {
16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
20 unsigned char c_line; /* line discipline */
21 unsigned char c_cc[NCC]; /* control characters */
22};
23
24/* modem lines */
25#define TIOCM_LE 0x001
26#define TIOCM_DTR 0x002
27#define TIOCM_RTS 0x004
28#define TIOCM_ST 0x008
29#define TIOCM_SR 0x010
30#define TIOCM_CTS 0x020
31#define TIOCM_CAR 0x040
32#define TIOCM_RNG 0x080
33#define TIOCM_DSR 0x100
34#define TIOCM_CD TIOCM_CAR
35#define TIOCM_RI TIOCM_RNG
36#define TIOCM_OUT1 0x2000
37#define TIOCM_OUT2 0x4000
38#define TIOCM_LOOP 0x8000
39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41
42#ifdef __KERNEL__
43
44/* intr=^C quit=^\ erase=del kill=^U
45 eof=^D vtime=\0 vmin=\1 sxtc=\0
46 start=^Q stop=^S susp=^Z eol=\0
47 reprint=^R discard=^U werase=^W lnext=^V
48 eol2=\0
49*/
50#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
51
52/*
53 * Translate a "termio" structure into a "termios". Ugh.
54 */
55#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
56 unsigned short __tmp; \
57 get_user(__tmp,&(termio)->x); \
58 *(unsigned short *) &(termios)->x = __tmp; \
59}
60
61#define user_termio_to_kernel_termios(termios, termio) \
62({ \
63 SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
64 SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
65 SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
66 SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
67 copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
68})
69
70/*
71 * Translate a "termios" structure into a "termio". Ugh.
72 */
73#define kernel_termios_to_user_termio(termio, termios) \
74({ \
75 put_user((termios)->c_iflag, &(termio)->c_iflag); \
76 put_user((termios)->c_oflag, &(termio)->c_oflag); \
77 put_user((termios)->c_cflag, &(termio)->c_cflag); \
78 put_user((termios)->c_lflag, &(termio)->c_lflag); \
79 put_user((termios)->c_line, &(termio)->c_line); \
80 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
81})
82
83#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
84#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
85#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
86#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
87
88#endif /* __KERNEL__ */
89
90#endif /* _I386_TERMIOS_H */
diff --git a/include/asm-x86/termios_64.h b/include/asm-x86/termios_64.h
deleted file mode 100644
index 35ee59b78329..000000000000
--- a/include/asm-x86/termios_64.h
+++ /dev/null
@@ -1,90 +0,0 @@
1#ifndef _X8664_TERMIOS_H
2#define _X8664_TERMIOS_H
3
4#include <asm/termbits.h>
5#include <asm/ioctls.h>
6
7struct winsize {
8 unsigned short ws_row;
9 unsigned short ws_col;
10 unsigned short ws_xpixel;
11 unsigned short ws_ypixel;
12};
13
14#define NCC 8
15struct termio {
16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
20 unsigned char c_line; /* line discipline */
21 unsigned char c_cc[NCC]; /* control characters */
22};
23
24/* modem lines */
25#define TIOCM_LE 0x001
26#define TIOCM_DTR 0x002
27#define TIOCM_RTS 0x004
28#define TIOCM_ST 0x008
29#define TIOCM_SR 0x010
30#define TIOCM_CTS 0x020
31#define TIOCM_CAR 0x040
32#define TIOCM_RNG 0x080
33#define TIOCM_DSR 0x100
34#define TIOCM_CD TIOCM_CAR
35#define TIOCM_RI TIOCM_RNG
36#define TIOCM_OUT1 0x2000
37#define TIOCM_OUT2 0x4000
38#define TIOCM_LOOP 0x8000
39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41
42#ifdef __KERNEL__
43
44/* intr=^C quit=^\ erase=del kill=^U
45 eof=^D vtime=\0 vmin=\1 sxtc=\0
46 start=^Q stop=^S susp=^Z eol=\0
47 reprint=^R discard=^U werase=^W lnext=^V
48 eol2=\0
49*/
50#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
51
52/*
53 * Translate a "termio" structure into a "termios". Ugh.
54 */
55#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
56 unsigned short __tmp; \
57 get_user(__tmp,&(termio)->x); \
58 *(unsigned short *) &(termios)->x = __tmp; \
59}
60
61#define user_termio_to_kernel_termios(termios, termio) \
62({ \
63 SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
64 SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
65 SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
66 SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
67 copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
68})
69
70/*
71 * Translate a "termios" structure into a "termio". Ugh.
72 */
73#define kernel_termios_to_user_termio(termio, termios) \
74({ \
75 put_user((termios)->c_iflag, &(termio)->c_iflag); \
76 put_user((termios)->c_oflag, &(termio)->c_oflag); \
77 put_user((termios)->c_cflag, &(termio)->c_cflag); \
78 put_user((termios)->c_lflag, &(termio)->c_lflag); \
79 put_user((termios)->c_line, &(termio)->c_line); \
80 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
81})
82
83#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
84#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
85#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
86#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
87
88#endif /* __KERNEL__ */
89
90#endif /* _X8664_TERMIOS_H */
diff --git a/include/asm-x86/tlb.h b/include/asm-x86/tlb.h
index 7d55c3762b43..e4e9e2d07a93 100644
--- a/include/asm-x86/tlb.h
+++ b/include/asm-x86/tlb.h
@@ -1,5 +1,11 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_TLB_H
2# include "tlb_32.h" 2#define _ASM_X86_TLB_H
3#else 3
4# include "tlb_64.h" 4#define tlb_start_vma(tlb, vma) do { } while (0)
5#define tlb_end_vma(tlb, vma) do { } while (0)
6#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
7#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
8
9#include <asm-generic/tlb.h>
10
5#endif 11#endif
diff --git a/include/asm-x86/tlb_32.h b/include/asm-x86/tlb_32.h
deleted file mode 100644
index c006c5c92bea..000000000000
--- a/include/asm-x86/tlb_32.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef _I386_TLB_H
2#define _I386_TLB_H
3
4/*
5 * x86 doesn't need any special per-pte or
6 * per-vma handling..
7 */
8#define tlb_start_vma(tlb, vma) do { } while (0)
9#define tlb_end_vma(tlb, vma) do { } while (0)
10#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
11
12/*
13 * .. because we flush the whole mm when it
14 * fills up.
15 */
16#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
17
18#include <asm-generic/tlb.h>
19
20#endif
diff --git a/include/asm-x86/tlb_64.h b/include/asm-x86/tlb_64.h
deleted file mode 100644
index cd4c3c590a0e..000000000000
--- a/include/asm-x86/tlb_64.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef TLB_H
2#define TLB_H 1
3
4
5#define tlb_start_vma(tlb, vma) do { } while (0)
6#define tlb_end_vma(tlb, vma) do { } while (0)
7#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
8
9#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
10
11#include <asm-generic/tlb.h>
12
13#endif
diff --git a/include/asm-x86/types.h b/include/asm-x86/types.h
index a777a9b83974..63733f315688 100644
--- a/include/asm-x86/types.h
+++ b/include/asm-x86/types.h
@@ -1,13 +1,70 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_TYPES_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_TYPES_H
3# include "types_32.h" 3
4# else 4#ifndef __ASSEMBLY__
5# include "types_64.h" 5
6typedef unsigned short umode_t;
7
8/*
9 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
10 * header files exported to user space
11 */
12
13typedef __signed__ char __s8;
14typedef unsigned char __u8;
15
16typedef __signed__ short __s16;
17typedef unsigned short __u16;
18
19typedef __signed__ int __s32;
20typedef unsigned int __u32;
21
22#ifdef __i386__
23# ifdef __GNUC__
24__extension__ typedef __signed__ long long __s64;
25__extension__ typedef unsigned long long __u64;
6# endif 26# endif
7#else 27#else
8# ifdef __i386__ 28typedef __signed__ long long __s64;
9# include "types_32.h" 29typedef unsigned long long __u64;
10# else 30#endif
11# include "types_64.h" 31
12# endif 32#endif /* __ASSEMBLY__ */
33
34/*
35 * These aren't exported outside the kernel to avoid name space clashes
36 */
37#ifdef __KERNEL__
38
39#ifdef CONFIG_X86_32
40# define BITS_PER_LONG 32
41#else
42# define BITS_PER_LONG 64
43#endif
44
45#ifndef __ASSEMBLY__
46
47typedef signed char s8;
48typedef unsigned char u8;
49
50typedef signed short s16;
51typedef unsigned short u16;
52
53typedef signed int s32;
54typedef unsigned int u32;
55
56typedef signed long long s64;
57typedef unsigned long long u64;
58
59typedef u64 dma64_addr_t;
60#if defined(CONFIG_X86_64) || defined(CONFIG_HIGHMEM64G)
61/* DMA addresses come in 32-bit and 64-bit flavours. */
62typedef u64 dma_addr_t;
63#else
64typedef u32 dma_addr_t;
65#endif
66
67#endif /* __ASSEMBLY__ */
68#endif /* __KERNEL__ */
69
13#endif 70#endif
diff --git a/include/asm-x86/types_32.h b/include/asm-x86/types_32.h
deleted file mode 100644
index faca1922c4c3..000000000000
--- a/include/asm-x86/types_32.h
+++ /dev/null
@@ -1,64 +0,0 @@
1#ifndef _I386_TYPES_H
2#define _I386_TYPES_H
3
4#ifndef __ASSEMBLY__
5
6typedef unsigned short umode_t;
7
8/*
9 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
10 * header files exported to user space
11 */
12
13typedef __signed__ char __s8;
14typedef unsigned char __u8;
15
16typedef __signed__ short __s16;
17typedef unsigned short __u16;
18
19typedef __signed__ int __s32;
20typedef unsigned int __u32;
21
22#if defined(__GNUC__)
23__extension__ typedef __signed__ long long __s64;
24__extension__ typedef unsigned long long __u64;
25#endif
26
27#endif /* __ASSEMBLY__ */
28
29/*
30 * These aren't exported outside the kernel to avoid name space clashes
31 */
32#ifdef __KERNEL__
33
34#define BITS_PER_LONG 32
35
36#ifndef __ASSEMBLY__
37
38
39typedef signed char s8;
40typedef unsigned char u8;
41
42typedef signed short s16;
43typedef unsigned short u16;
44
45typedef signed int s32;
46typedef unsigned int u32;
47
48typedef signed long long s64;
49typedef unsigned long long u64;
50
51/* DMA addresses come in generic and 64-bit flavours. */
52
53#ifdef CONFIG_HIGHMEM64G
54typedef u64 dma_addr_t;
55#else
56typedef u32 dma_addr_t;
57#endif
58typedef u64 dma64_addr_t;
59
60#endif /* __ASSEMBLY__ */
61
62#endif /* __KERNEL__ */
63
64#endif
diff --git a/include/asm-x86/types_64.h b/include/asm-x86/types_64.h
deleted file mode 100644
index 2d4491aae281..000000000000
--- a/include/asm-x86/types_64.h
+++ /dev/null
@@ -1,55 +0,0 @@
1#ifndef _X86_64_TYPES_H
2#define _X86_64_TYPES_H
3
4#ifndef __ASSEMBLY__
5
6typedef unsigned short umode_t;
7
8/*
9 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
10 * header files exported to user space
11 */
12
13typedef __signed__ char __s8;
14typedef unsigned char __u8;
15
16typedef __signed__ short __s16;
17typedef unsigned short __u16;
18
19typedef __signed__ int __s32;
20typedef unsigned int __u32;
21
22typedef __signed__ long long __s64;
23typedef unsigned long long __u64;
24
25#endif /* __ASSEMBLY__ */
26
27/*
28 * These aren't exported outside the kernel to avoid name space clashes
29 */
30#ifdef __KERNEL__
31
32#define BITS_PER_LONG 64
33
34#ifndef __ASSEMBLY__
35
36typedef signed char s8;
37typedef unsigned char u8;
38
39typedef signed short s16;
40typedef unsigned short u16;
41
42typedef signed int s32;
43typedef unsigned int u32;
44
45typedef signed long long s64;
46typedef unsigned long long u64;
47
48typedef u64 dma64_addr_t;
49typedef u64 dma_addr_t;
50
51#endif /* __ASSEMBLY__ */
52
53#endif /* __KERNEL__ */
54
55#endif
diff --git a/include/asm-x86/ucontext.h b/include/asm-x86/ucontext.h
index 175c8cb59731..50a79f7fcde9 100644
--- a/include/asm-x86/ucontext.h
+++ b/include/asm-x86/ucontext.h
@@ -1,13 +1,12 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_UCONTEXT_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_UCONTEXT_H
3# include "ucontext_32.h" 3
4# else 4struct ucontext {
5# include "ucontext_64.h" 5 unsigned long uc_flags;
6# endif 6 struct ucontext *uc_link;
7#else 7 stack_t uc_stack;
8# ifdef __i386__ 8 struct sigcontext uc_mcontext;
9# include "ucontext_32.h" 9 sigset_t uc_sigmask; /* mask last for extensibility */
10# else 10};
11# include "ucontext_64.h" 11
12# endif 12#endif /* _ASM_X86_UCONTEXT_H */
13#endif
diff --git a/include/asm-x86/ucontext_32.h b/include/asm-x86/ucontext_32.h
deleted file mode 100644
index b0db36925f55..000000000000
--- a/include/asm-x86/ucontext_32.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASMi386_UCONTEXT_H
2#define _ASMi386_UCONTEXT_H
3
4struct ucontext {
5 unsigned long uc_flags;
6 struct ucontext *uc_link;
7 stack_t uc_stack;
8 struct sigcontext uc_mcontext;
9 sigset_t uc_sigmask; /* mask last for extensibility */
10};
11
12#endif /* !_ASMi386_UCONTEXT_H */
diff --git a/include/asm-x86/ucontext_64.h b/include/asm-x86/ucontext_64.h
deleted file mode 100644
index 159a3da9e112..000000000000
--- a/include/asm-x86/ucontext_64.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASMX8664_UCONTEXT_H
2#define _ASMX8664_UCONTEXT_H
3
4struct ucontext {
5 unsigned long uc_flags;
6 struct ucontext *uc_link;
7 stack_t uc_stack;
8 struct sigcontext uc_mcontext;
9 sigset_t uc_sigmask; /* mask last for extensibility */
10};
11
12#endif
diff --git a/include/asm-x86/unaligned.h b/include/asm-x86/unaligned.h
index 68067150fbcb..913598d4f761 100644
--- a/include/asm-x86/unaligned.h
+++ b/include/asm-x86/unaligned.h
@@ -1,5 +1,37 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_UNALIGNED_H
2# include "unaligned_32.h" 2#define _ASM_X86_UNALIGNED_H
3#else 3
4# include "unaligned_64.h" 4/*
5#endif 5 * The x86 can do unaligned accesses itself.
6 *
7 * The strange macros are there to make sure these can't
8 * be misused in a way that makes them not work on other
9 * architectures where unaligned accesses aren't as simple.
10 */
11
12/**
13 * get_unaligned - get value from possibly mis-aligned location
14 * @ptr: pointer to value
15 *
16 * This macro should be used for accessing values larger in size than
17 * single bytes at locations that are expected to be improperly aligned,
18 * e.g. retrieving a u16 value from a location not u16-aligned.
19 *
20 * Note that unaligned accesses can be very expensive on some architectures.
21 */
22#define get_unaligned(ptr) (*(ptr))
23
24/**
25 * put_unaligned - put value to a possibly mis-aligned location
26 * @val: value to place
27 * @ptr: pointer to location
28 *
29 * This macro should be used for placing values larger in size than
30 * single bytes at locations that are expected to be improperly aligned,
31 * e.g. writing a u16 value to a location not u16-aligned.
32 *
33 * Note that unaligned accesses can be very expensive on some architectures.
34 */
35#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
36
37#endif /* _ASM_X86_UNALIGNED_H */
diff --git a/include/asm-x86/unaligned_32.h b/include/asm-x86/unaligned_32.h
deleted file mode 100644
index 7acd7957621e..000000000000
--- a/include/asm-x86/unaligned_32.h
+++ /dev/null
@@ -1,37 +0,0 @@
1#ifndef __I386_UNALIGNED_H
2#define __I386_UNALIGNED_H
3
4/*
5 * The i386 can do unaligned accesses itself.
6 *
7 * The strange macros are there to make sure these can't
8 * be misused in a way that makes them not work on other
9 * architectures where unaligned accesses aren't as simple.
10 */
11
12/**
13 * get_unaligned - get value from possibly mis-aligned location
14 * @ptr: pointer to value
15 *
16 * This macro should be used for accessing values larger in size than
17 * single bytes at locations that are expected to be improperly aligned,
18 * e.g. retrieving a u16 value from a location not u16-aligned.
19 *
20 * Note that unaligned accesses can be very expensive on some architectures.
21 */
22#define get_unaligned(ptr) (*(ptr))
23
24/**
25 * put_unaligned - put value to a possibly mis-aligned location
26 * @val: value to place
27 * @ptr: pointer to location
28 *
29 * This macro should be used for placing values larger in size than
30 * single bytes at locations that are expected to be improperly aligned,
31 * e.g. writing a u16 value to a location not u16-aligned.
32 *
33 * Note that unaligned accesses can be very expensive on some architectures.
34 */
35#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
36
37#endif
diff --git a/include/asm-x86/unaligned_64.h b/include/asm-x86/unaligned_64.h
deleted file mode 100644
index d4bf78dc6f39..000000000000
--- a/include/asm-x86/unaligned_64.h
+++ /dev/null
@@ -1,37 +0,0 @@
1#ifndef __X8664_UNALIGNED_H
2#define __X8664_UNALIGNED_H
3
4/*
5 * The x86-64 can do unaligned accesses itself.
6 *
7 * The strange macros are there to make sure these can't
8 * be misused in a way that makes them not work on other
9 * architectures where unaligned accesses aren't as simple.
10 */
11
12/**
13 * get_unaligned - get value from possibly mis-aligned location
14 * @ptr: pointer to value
15 *
16 * This macro should be used for accessing values larger in size than
17 * single bytes at locations that are expected to be improperly aligned,
18 * e.g. retrieving a u16 value from a location not u16-aligned.
19 *
20 * Note that unaligned accesses can be very expensive on some architectures.
21 */
22#define get_unaligned(ptr) (*(ptr))
23
24/**
25 * put_unaligned - put value to a possibly mis-aligned location
26 * @val: value to place
27 * @ptr: pointer to location
28 *
29 * This macro should be used for placing values larger in size than
30 * single bytes at locations that are expected to be improperly aligned,
31 * e.g. writing a u16 value to a location not u16-aligned.
32 *
33 * Note that unaligned accesses can be very expensive on some architectures.
34 */
35#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
36
37#endif
diff --git a/include/asm-x86/unistd_64.h b/include/asm-x86/unistd_64.h
index fc4e73f5f1fa..5ff4d3e24c34 100644
--- a/include/asm-x86/unistd_64.h
+++ b/include/asm-x86/unistd_64.h
@@ -2,635 +2,638 @@
2#define _ASM_X86_64_UNISTD_H_ 2#define _ASM_X86_64_UNISTD_H_
3 3
4#ifndef __SYSCALL 4#ifndef __SYSCALL
5#define __SYSCALL(a,b) 5#define __SYSCALL(a,b)
6#endif 6#endif
7 7
8/* 8/*
9 * This file contains the system call numbers. 9 * This file contains the system call numbers.
10 * 10 *
11 * Note: holes are not allowed. 11 * Note: holes are not allowed.
12 */ 12 */
13 13
14/* at least 8 syscall per cacheline */ 14/* at least 8 syscall per cacheline */
15#define __NR_read 0 15#define __NR_read 0
16__SYSCALL(__NR_read, sys_read) 16__SYSCALL(__NR_read, sys_read)
17#define __NR_write 1 17#define __NR_write 1
18__SYSCALL(__NR_write, sys_write) 18__SYSCALL(__NR_write, sys_write)
19#define __NR_open 2 19#define __NR_open 2
20__SYSCALL(__NR_open, sys_open) 20__SYSCALL(__NR_open, sys_open)
21#define __NR_close 3 21#define __NR_close 3
22__SYSCALL(__NR_close, sys_close) 22__SYSCALL(__NR_close, sys_close)
23#define __NR_stat 4 23#define __NR_stat 4
24__SYSCALL(__NR_stat, sys_newstat) 24__SYSCALL(__NR_stat, sys_newstat)
25#define __NR_fstat 5 25#define __NR_fstat 5
26__SYSCALL(__NR_fstat, sys_newfstat) 26__SYSCALL(__NR_fstat, sys_newfstat)
27#define __NR_lstat 6 27#define __NR_lstat 6
28__SYSCALL(__NR_lstat, sys_newlstat) 28__SYSCALL(__NR_lstat, sys_newlstat)
29#define __NR_poll 7 29#define __NR_poll 7
30__SYSCALL(__NR_poll, sys_poll) 30__SYSCALL(__NR_poll, sys_poll)
31 31
32#define __NR_lseek 8 32#define __NR_lseek 8
33__SYSCALL(__NR_lseek, sys_lseek) 33__SYSCALL(__NR_lseek, sys_lseek)
34#define __NR_mmap 9 34#define __NR_mmap 9
35__SYSCALL(__NR_mmap, sys_mmap) 35__SYSCALL(__NR_mmap, sys_mmap)
36#define __NR_mprotect 10 36#define __NR_mprotect 10
37__SYSCALL(__NR_mprotect, sys_mprotect) 37__SYSCALL(__NR_mprotect, sys_mprotect)
38#define __NR_munmap 11 38#define __NR_munmap 11
39__SYSCALL(__NR_munmap, sys_munmap) 39__SYSCALL(__NR_munmap, sys_munmap)
40#define __NR_brk 12 40#define __NR_brk 12
41__SYSCALL(__NR_brk, sys_brk) 41__SYSCALL(__NR_brk, sys_brk)
42#define __NR_rt_sigaction 13 42#define __NR_rt_sigaction 13
43__SYSCALL(__NR_rt_sigaction, sys_rt_sigaction) 43__SYSCALL(__NR_rt_sigaction, sys_rt_sigaction)
44#define __NR_rt_sigprocmask 14 44#define __NR_rt_sigprocmask 14
45__SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask) 45__SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask)
46#define __NR_rt_sigreturn 15 46#define __NR_rt_sigreturn 15
47__SYSCALL(__NR_rt_sigreturn, stub_rt_sigreturn) 47__SYSCALL(__NR_rt_sigreturn, stub_rt_sigreturn)
48 48
49#define __NR_ioctl 16 49#define __NR_ioctl 16
50__SYSCALL(__NR_ioctl, sys_ioctl) 50__SYSCALL(__NR_ioctl, sys_ioctl)
51#define __NR_pread64 17 51#define __NR_pread64 17
52__SYSCALL(__NR_pread64, sys_pread64) 52__SYSCALL(__NR_pread64, sys_pread64)
53#define __NR_pwrite64 18 53#define __NR_pwrite64 18
54__SYSCALL(__NR_pwrite64, sys_pwrite64) 54__SYSCALL(__NR_pwrite64, sys_pwrite64)
55#define __NR_readv 19 55#define __NR_readv 19
56__SYSCALL(__NR_readv, sys_readv) 56__SYSCALL(__NR_readv, sys_readv)
57#define __NR_writev 20 57#define __NR_writev 20
58__SYSCALL(__NR_writev, sys_writev) 58__SYSCALL(__NR_writev, sys_writev)
59#define __NR_access 21 59#define __NR_access 21
60__SYSCALL(__NR_access, sys_access) 60__SYSCALL(__NR_access, sys_access)
61#define __NR_pipe 22 61#define __NR_pipe 22
62__SYSCALL(__NR_pipe, sys_pipe) 62__SYSCALL(__NR_pipe, sys_pipe)
63#define __NR_select 23 63#define __NR_select 23
64__SYSCALL(__NR_select, sys_select) 64__SYSCALL(__NR_select, sys_select)
65 65
66#define __NR_sched_yield 24 66#define __NR_sched_yield 24
67__SYSCALL(__NR_sched_yield, sys_sched_yield) 67__SYSCALL(__NR_sched_yield, sys_sched_yield)
68#define __NR_mremap 25 68#define __NR_mremap 25
69__SYSCALL(__NR_mremap, sys_mremap) 69__SYSCALL(__NR_mremap, sys_mremap)
70#define __NR_msync 26 70#define __NR_msync 26
71__SYSCALL(__NR_msync, sys_msync) 71__SYSCALL(__NR_msync, sys_msync)
72#define __NR_mincore 27 72#define __NR_mincore 27
73__SYSCALL(__NR_mincore, sys_mincore) 73__SYSCALL(__NR_mincore, sys_mincore)
74#define __NR_madvise 28 74#define __NR_madvise 28
75__SYSCALL(__NR_madvise, sys_madvise) 75__SYSCALL(__NR_madvise, sys_madvise)
76#define __NR_shmget 29 76#define __NR_shmget 29
77__SYSCALL(__NR_shmget, sys_shmget) 77__SYSCALL(__NR_shmget, sys_shmget)
78#define __NR_shmat 30 78#define __NR_shmat 30
79__SYSCALL(__NR_shmat, sys_shmat) 79__SYSCALL(__NR_shmat, sys_shmat)
80#define __NR_shmctl 31 80#define __NR_shmctl 31
81__SYSCALL(__NR_shmctl, sys_shmctl) 81__SYSCALL(__NR_shmctl, sys_shmctl)
82 82
83#define __NR_dup 32 83#define __NR_dup 32
84__SYSCALL(__NR_dup, sys_dup) 84__SYSCALL(__NR_dup, sys_dup)
85#define __NR_dup2 33 85#define __NR_dup2 33
86__SYSCALL(__NR_dup2, sys_dup2) 86__SYSCALL(__NR_dup2, sys_dup2)
87#define __NR_pause 34 87#define __NR_pause 34
88__SYSCALL(__NR_pause, sys_pause) 88__SYSCALL(__NR_pause, sys_pause)
89#define __NR_nanosleep 35 89#define __NR_nanosleep 35
90__SYSCALL(__NR_nanosleep, sys_nanosleep) 90__SYSCALL(__NR_nanosleep, sys_nanosleep)
91#define __NR_getitimer 36 91#define __NR_getitimer 36
92__SYSCALL(__NR_getitimer, sys_getitimer) 92__SYSCALL(__NR_getitimer, sys_getitimer)
93#define __NR_alarm 37 93#define __NR_alarm 37
94__SYSCALL(__NR_alarm, sys_alarm) 94__SYSCALL(__NR_alarm, sys_alarm)
95#define __NR_setitimer 38 95#define __NR_setitimer 38
96__SYSCALL(__NR_setitimer, sys_setitimer) 96__SYSCALL(__NR_setitimer, sys_setitimer)
97#define __NR_getpid 39 97#define __NR_getpid 39
98__SYSCALL(__NR_getpid, sys_getpid) 98__SYSCALL(__NR_getpid, sys_getpid)
99 99
100#define __NR_sendfile 40 100#define __NR_sendfile 40
101__SYSCALL(__NR_sendfile, sys_sendfile64) 101__SYSCALL(__NR_sendfile, sys_sendfile64)
102#define __NR_socket 41 102#define __NR_socket 41
103__SYSCALL(__NR_socket, sys_socket) 103__SYSCALL(__NR_socket, sys_socket)
104#define __NR_connect 42 104#define __NR_connect 42
105__SYSCALL(__NR_connect, sys_connect) 105__SYSCALL(__NR_connect, sys_connect)
106#define __NR_accept 43 106#define __NR_accept 43
107__SYSCALL(__NR_accept, sys_accept) 107__SYSCALL(__NR_accept, sys_accept)
108#define __NR_sendto 44 108#define __NR_sendto 44
109__SYSCALL(__NR_sendto, sys_sendto) 109__SYSCALL(__NR_sendto, sys_sendto)
110#define __NR_recvfrom 45 110#define __NR_recvfrom 45
111__SYSCALL(__NR_recvfrom, sys_recvfrom) 111__SYSCALL(__NR_recvfrom, sys_recvfrom)
112#define __NR_sendmsg 46 112#define __NR_sendmsg 46
113__SYSCALL(__NR_sendmsg, sys_sendmsg) 113__SYSCALL(__NR_sendmsg, sys_sendmsg)
114#define __NR_recvmsg 47 114#define __NR_recvmsg 47
115__SYSCALL(__NR_recvmsg, sys_recvmsg) 115__SYSCALL(__NR_recvmsg, sys_recvmsg)
116 116
117#define __NR_shutdown 48 117#define __NR_shutdown 48
118__SYSCALL(__NR_shutdown, sys_shutdown) 118__SYSCALL(__NR_shutdown, sys_shutdown)
119#define __NR_bind 49 119#define __NR_bind 49
120__SYSCALL(__NR_bind, sys_bind) 120__SYSCALL(__NR_bind, sys_bind)
121#define __NR_listen 50 121#define __NR_listen 50
122__SYSCALL(__NR_listen, sys_listen) 122__SYSCALL(__NR_listen, sys_listen)
123#define __NR_getsockname 51 123#define __NR_getsockname 51
124__SYSCALL(__NR_getsockname, sys_getsockname) 124__SYSCALL(__NR_getsockname, sys_getsockname)
125#define __NR_getpeername 52 125#define __NR_getpeername 52
126__SYSCALL(__NR_getpeername, sys_getpeername) 126__SYSCALL(__NR_getpeername, sys_getpeername)
127#define __NR_socketpair 53 127#define __NR_socketpair 53
128__SYSCALL(__NR_socketpair, sys_socketpair) 128__SYSCALL(__NR_socketpair, sys_socketpair)
129#define __NR_setsockopt 54 129#define __NR_setsockopt 54
130__SYSCALL(__NR_setsockopt, sys_setsockopt) 130__SYSCALL(__NR_setsockopt, sys_setsockopt)
131#define __NR_getsockopt 55 131#define __NR_getsockopt 55
132__SYSCALL(__NR_getsockopt, sys_getsockopt) 132__SYSCALL(__NR_getsockopt, sys_getsockopt)
133 133
134#define __NR_clone 56 134#define __NR_clone 56
135__SYSCALL(__NR_clone, stub_clone) 135__SYSCALL(__NR_clone, stub_clone)
136#define __NR_fork 57 136#define __NR_fork 57
137__SYSCALL(__NR_fork, stub_fork) 137__SYSCALL(__NR_fork, stub_fork)
138#define __NR_vfork 58 138#define __NR_vfork 58
139__SYSCALL(__NR_vfork, stub_vfork) 139__SYSCALL(__NR_vfork, stub_vfork)
140#define __NR_execve 59 140#define __NR_execve 59
141__SYSCALL(__NR_execve, stub_execve) 141__SYSCALL(__NR_execve, stub_execve)
142#define __NR_exit 60 142#define __NR_exit 60
143__SYSCALL(__NR_exit, sys_exit) 143__SYSCALL(__NR_exit, sys_exit)
144#define __NR_wait4 61 144#define __NR_wait4 61
145__SYSCALL(__NR_wait4, sys_wait4) 145__SYSCALL(__NR_wait4, sys_wait4)
146#define __NR_kill 62 146#define __NR_kill 62
147__SYSCALL(__NR_kill, sys_kill) 147__SYSCALL(__NR_kill, sys_kill)
148#define __NR_uname 63 148#define __NR_uname 63
149__SYSCALL(__NR_uname, sys_uname) 149__SYSCALL(__NR_uname, sys_uname)
150 150
151#define __NR_semget 64 151#define __NR_semget 64
152__SYSCALL(__NR_semget, sys_semget) 152__SYSCALL(__NR_semget, sys_semget)
153#define __NR_semop 65 153#define __NR_semop 65
154__SYSCALL(__NR_semop, sys_semop) 154__SYSCALL(__NR_semop, sys_semop)
155#define __NR_semctl 66 155#define __NR_semctl 66
156__SYSCALL(__NR_semctl, sys_semctl) 156__SYSCALL(__NR_semctl, sys_semctl)
157#define __NR_shmdt 67 157#define __NR_shmdt 67
158__SYSCALL(__NR_shmdt, sys_shmdt) 158__SYSCALL(__NR_shmdt, sys_shmdt)
159#define __NR_msgget 68 159#define __NR_msgget 68
160__SYSCALL(__NR_msgget, sys_msgget) 160__SYSCALL(__NR_msgget, sys_msgget)
161#define __NR_msgsnd 69 161#define __NR_msgsnd 69
162__SYSCALL(__NR_msgsnd, sys_msgsnd) 162__SYSCALL(__NR_msgsnd, sys_msgsnd)
163#define __NR_msgrcv 70 163#define __NR_msgrcv 70
164__SYSCALL(__NR_msgrcv, sys_msgrcv) 164__SYSCALL(__NR_msgrcv, sys_msgrcv)
165#define __NR_msgctl 71 165#define __NR_msgctl 71
166__SYSCALL(__NR_msgctl, sys_msgctl) 166__SYSCALL(__NR_msgctl, sys_msgctl)
167 167
168#define __NR_fcntl 72 168#define __NR_fcntl 72
169__SYSCALL(__NR_fcntl, sys_fcntl) 169__SYSCALL(__NR_fcntl, sys_fcntl)
170#define __NR_flock 73 170#define __NR_flock 73
171__SYSCALL(__NR_flock, sys_flock) 171__SYSCALL(__NR_flock, sys_flock)
172#define __NR_fsync 74 172#define __NR_fsync 74
173__SYSCALL(__NR_fsync, sys_fsync) 173__SYSCALL(__NR_fsync, sys_fsync)
174#define __NR_fdatasync 75 174#define __NR_fdatasync 75
175__SYSCALL(__NR_fdatasync, sys_fdatasync) 175__SYSCALL(__NR_fdatasync, sys_fdatasync)
176#define __NR_truncate 76 176#define __NR_truncate 76
177__SYSCALL(__NR_truncate, sys_truncate) 177__SYSCALL(__NR_truncate, sys_truncate)
178#define __NR_ftruncate 77 178#define __NR_ftruncate 77
179__SYSCALL(__NR_ftruncate, sys_ftruncate) 179__SYSCALL(__NR_ftruncate, sys_ftruncate)
180#define __NR_getdents 78 180#define __NR_getdents 78
181__SYSCALL(__NR_getdents, sys_getdents) 181__SYSCALL(__NR_getdents, sys_getdents)
182#define __NR_getcwd 79 182#define __NR_getcwd 79
183__SYSCALL(__NR_getcwd, sys_getcwd) 183__SYSCALL(__NR_getcwd, sys_getcwd)
184 184
185#define __NR_chdir 80 185#define __NR_chdir 80
186__SYSCALL(__NR_chdir, sys_chdir) 186__SYSCALL(__NR_chdir, sys_chdir)
187#define __NR_fchdir 81 187#define __NR_fchdir 81
188__SYSCALL(__NR_fchdir, sys_fchdir) 188__SYSCALL(__NR_fchdir, sys_fchdir)
189#define __NR_rename 82 189#define __NR_rename 82
190__SYSCALL(__NR_rename, sys_rename) 190__SYSCALL(__NR_rename, sys_rename)
191#define __NR_mkdir 83 191#define __NR_mkdir 83
192__SYSCALL(__NR_mkdir, sys_mkdir) 192__SYSCALL(__NR_mkdir, sys_mkdir)
193#define __NR_rmdir 84 193#define __NR_rmdir 84
194__SYSCALL(__NR_rmdir, sys_rmdir) 194__SYSCALL(__NR_rmdir, sys_rmdir)
195#define __NR_creat 85 195#define __NR_creat 85
196__SYSCALL(__NR_creat, sys_creat) 196__SYSCALL(__NR_creat, sys_creat)
197#define __NR_link 86 197#define __NR_link 86
198__SYSCALL(__NR_link, sys_link) 198__SYSCALL(__NR_link, sys_link)
199#define __NR_unlink 87 199#define __NR_unlink 87
200__SYSCALL(__NR_unlink, sys_unlink) 200__SYSCALL(__NR_unlink, sys_unlink)
201 201
202#define __NR_symlink 88 202#define __NR_symlink 88
203__SYSCALL(__NR_symlink, sys_symlink) 203__SYSCALL(__NR_symlink, sys_symlink)
204#define __NR_readlink 89 204#define __NR_readlink 89
205__SYSCALL(__NR_readlink, sys_readlink) 205__SYSCALL(__NR_readlink, sys_readlink)
206#define __NR_chmod 90 206#define __NR_chmod 90
207__SYSCALL(__NR_chmod, sys_chmod) 207__SYSCALL(__NR_chmod, sys_chmod)
208#define __NR_fchmod 91 208#define __NR_fchmod 91
209__SYSCALL(__NR_fchmod, sys_fchmod) 209__SYSCALL(__NR_fchmod, sys_fchmod)
210#define __NR_chown 92 210#define __NR_chown 92
211__SYSCALL(__NR_chown, sys_chown) 211__SYSCALL(__NR_chown, sys_chown)
212#define __NR_fchown 93 212#define __NR_fchown 93
213__SYSCALL(__NR_fchown, sys_fchown) 213__SYSCALL(__NR_fchown, sys_fchown)
214#define __NR_lchown 94 214#define __NR_lchown 94
215__SYSCALL(__NR_lchown, sys_lchown) 215__SYSCALL(__NR_lchown, sys_lchown)
216#define __NR_umask 95 216#define __NR_umask 95
217__SYSCALL(__NR_umask, sys_umask) 217__SYSCALL(__NR_umask, sys_umask)
218 218
219#define __NR_gettimeofday 96 219#define __NR_gettimeofday 96
220__SYSCALL(__NR_gettimeofday, sys_gettimeofday) 220__SYSCALL(__NR_gettimeofday, sys_gettimeofday)
221#define __NR_getrlimit 97 221#define __NR_getrlimit 97
222__SYSCALL(__NR_getrlimit, sys_getrlimit) 222__SYSCALL(__NR_getrlimit, sys_getrlimit)
223#define __NR_getrusage 98 223#define __NR_getrusage 98
224__SYSCALL(__NR_getrusage, sys_getrusage) 224__SYSCALL(__NR_getrusage, sys_getrusage)
225#define __NR_sysinfo 99 225#define __NR_sysinfo 99
226__SYSCALL(__NR_sysinfo, sys_sysinfo) 226__SYSCALL(__NR_sysinfo, sys_sysinfo)
227#define __NR_times 100 227#define __NR_times 100
228__SYSCALL(__NR_times, sys_times) 228__SYSCALL(__NR_times, sys_times)
229#define __NR_ptrace 101 229#define __NR_ptrace 101
230__SYSCALL(__NR_ptrace, sys_ptrace) 230__SYSCALL(__NR_ptrace, sys_ptrace)
231#define __NR_getuid 102 231#define __NR_getuid 102
232__SYSCALL(__NR_getuid, sys_getuid) 232__SYSCALL(__NR_getuid, sys_getuid)
233#define __NR_syslog 103 233#define __NR_syslog 103
234__SYSCALL(__NR_syslog, sys_syslog) 234__SYSCALL(__NR_syslog, sys_syslog)
235 235
236/* at the very end the stuff that never runs during the benchmarks */ 236/* at the very end the stuff that never runs during the benchmarks */
237#define __NR_getgid 104 237#define __NR_getgid 104
238__SYSCALL(__NR_getgid, sys_getgid) 238__SYSCALL(__NR_getgid, sys_getgid)
239#define __NR_setuid 105 239#define __NR_setuid 105
240__SYSCALL(__NR_setuid, sys_setuid) 240__SYSCALL(__NR_setuid, sys_setuid)
241#define __NR_setgid 106 241#define __NR_setgid 106
242__SYSCALL(__NR_setgid, sys_setgid) 242__SYSCALL(__NR_setgid, sys_setgid)
243#define __NR_geteuid 107 243#define __NR_geteuid 107
244__SYSCALL(__NR_geteuid, sys_geteuid) 244__SYSCALL(__NR_geteuid, sys_geteuid)
245#define __NR_getegid 108 245#define __NR_getegid 108
246__SYSCALL(__NR_getegid, sys_getegid) 246__SYSCALL(__NR_getegid, sys_getegid)
247#define __NR_setpgid 109 247#define __NR_setpgid 109
248__SYSCALL(__NR_setpgid, sys_setpgid) 248__SYSCALL(__NR_setpgid, sys_setpgid)
249#define __NR_getppid 110 249#define __NR_getppid 110
250__SYSCALL(__NR_getppid, sys_getppid) 250__SYSCALL(__NR_getppid, sys_getppid)
251#define __NR_getpgrp 111 251#define __NR_getpgrp 111
252__SYSCALL(__NR_getpgrp, sys_getpgrp) 252__SYSCALL(__NR_getpgrp, sys_getpgrp)
253 253
254#define __NR_setsid 112 254#define __NR_setsid 112
255__SYSCALL(__NR_setsid, sys_setsid) 255__SYSCALL(__NR_setsid, sys_setsid)
256#define __NR_setreuid 113 256#define __NR_setreuid 113
257__SYSCALL(__NR_setreuid, sys_setreuid) 257__SYSCALL(__NR_setreuid, sys_setreuid)
258#define __NR_setregid 114 258#define __NR_setregid 114
259__SYSCALL(__NR_setregid, sys_setregid) 259__SYSCALL(__NR_setregid, sys_setregid)
260#define __NR_getgroups 115 260#define __NR_getgroups 115
261__SYSCALL(__NR_getgroups, sys_getgroups) 261__SYSCALL(__NR_getgroups, sys_getgroups)
262#define __NR_setgroups 116 262#define __NR_setgroups 116
263__SYSCALL(__NR_setgroups, sys_setgroups) 263__SYSCALL(__NR_setgroups, sys_setgroups)
264#define __NR_setresuid 117 264#define __NR_setresuid 117
265__SYSCALL(__NR_setresuid, sys_setresuid) 265__SYSCALL(__NR_setresuid, sys_setresuid)
266#define __NR_getresuid 118 266#define __NR_getresuid 118
267__SYSCALL(__NR_getresuid, sys_getresuid) 267__SYSCALL(__NR_getresuid, sys_getresuid)
268#define __NR_setresgid 119 268#define __NR_setresgid 119
269__SYSCALL(__NR_setresgid, sys_setresgid) 269__SYSCALL(__NR_setresgid, sys_setresgid)
270 270
271#define __NR_getresgid 120 271#define __NR_getresgid 120
272__SYSCALL(__NR_getresgid, sys_getresgid) 272__SYSCALL(__NR_getresgid, sys_getresgid)
273#define __NR_getpgid 121 273#define __NR_getpgid 121
274__SYSCALL(__NR_getpgid, sys_getpgid) 274__SYSCALL(__NR_getpgid, sys_getpgid)
275#define __NR_setfsuid 122 275#define __NR_setfsuid 122
276__SYSCALL(__NR_setfsuid, sys_setfsuid) 276__SYSCALL(__NR_setfsuid, sys_setfsuid)
277#define __NR_setfsgid 123 277#define __NR_setfsgid 123
278__SYSCALL(__NR_setfsgid, sys_setfsgid) 278__SYSCALL(__NR_setfsgid, sys_setfsgid)
279#define __NR_getsid 124 279#define __NR_getsid 124
280__SYSCALL(__NR_getsid, sys_getsid) 280__SYSCALL(__NR_getsid, sys_getsid)
281#define __NR_capget 125 281#define __NR_capget 125
282__SYSCALL(__NR_capget, sys_capget) 282__SYSCALL(__NR_capget, sys_capget)
283#define __NR_capset 126 283#define __NR_capset 126
284__SYSCALL(__NR_capset, sys_capset) 284__SYSCALL(__NR_capset, sys_capset)
285 285
286#define __NR_rt_sigpending 127 286#define __NR_rt_sigpending 127
287__SYSCALL(__NR_rt_sigpending, sys_rt_sigpending) 287__SYSCALL(__NR_rt_sigpending, sys_rt_sigpending)
288#define __NR_rt_sigtimedwait 128 288#define __NR_rt_sigtimedwait 128
289__SYSCALL(__NR_rt_sigtimedwait, sys_rt_sigtimedwait) 289__SYSCALL(__NR_rt_sigtimedwait, sys_rt_sigtimedwait)
290#define __NR_rt_sigqueueinfo 129 290#define __NR_rt_sigqueueinfo 129
291__SYSCALL(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo) 291__SYSCALL(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo)
292#define __NR_rt_sigsuspend 130 292#define __NR_rt_sigsuspend 130
293__SYSCALL(__NR_rt_sigsuspend, stub_rt_sigsuspend) 293__SYSCALL(__NR_rt_sigsuspend, stub_rt_sigsuspend)
294#define __NR_sigaltstack 131 294#define __NR_sigaltstack 131
295__SYSCALL(__NR_sigaltstack, stub_sigaltstack) 295__SYSCALL(__NR_sigaltstack, stub_sigaltstack)
296#define __NR_utime 132 296#define __NR_utime 132
297__SYSCALL(__NR_utime, sys_utime) 297__SYSCALL(__NR_utime, sys_utime)
298#define __NR_mknod 133 298#define __NR_mknod 133
299__SYSCALL(__NR_mknod, sys_mknod) 299__SYSCALL(__NR_mknod, sys_mknod)
300 300
301/* Only needed for a.out */ 301/* Only needed for a.out */
302#define __NR_uselib 134 302#define __NR_uselib 134
303__SYSCALL(__NR_uselib, sys_ni_syscall) 303__SYSCALL(__NR_uselib, sys_ni_syscall)
304#define __NR_personality 135 304#define __NR_personality 135
305__SYSCALL(__NR_personality, sys_personality) 305__SYSCALL(__NR_personality, sys_personality)
306 306
307#define __NR_ustat 136 307#define __NR_ustat 136
308__SYSCALL(__NR_ustat, sys_ustat) 308__SYSCALL(__NR_ustat, sys_ustat)
309#define __NR_statfs 137 309#define __NR_statfs 137
310__SYSCALL(__NR_statfs, sys_statfs) 310__SYSCALL(__NR_statfs, sys_statfs)
311#define __NR_fstatfs 138 311#define __NR_fstatfs 138
312__SYSCALL(__NR_fstatfs, sys_fstatfs) 312__SYSCALL(__NR_fstatfs, sys_fstatfs)
313#define __NR_sysfs 139 313#define __NR_sysfs 139
314__SYSCALL(__NR_sysfs, sys_sysfs) 314__SYSCALL(__NR_sysfs, sys_sysfs)
315 315
316#define __NR_getpriority 140 316#define __NR_getpriority 140
317__SYSCALL(__NR_getpriority, sys_getpriority) 317__SYSCALL(__NR_getpriority, sys_getpriority)
318#define __NR_setpriority 141 318#define __NR_setpriority 141
319__SYSCALL(__NR_setpriority, sys_setpriority) 319__SYSCALL(__NR_setpriority, sys_setpriority)
320#define __NR_sched_setparam 142 320#define __NR_sched_setparam 142
321__SYSCALL(__NR_sched_setparam, sys_sched_setparam) 321__SYSCALL(__NR_sched_setparam, sys_sched_setparam)
322#define __NR_sched_getparam 143 322#define __NR_sched_getparam 143
323__SYSCALL(__NR_sched_getparam, sys_sched_getparam) 323__SYSCALL(__NR_sched_getparam, sys_sched_getparam)
324#define __NR_sched_setscheduler 144 324#define __NR_sched_setscheduler 144
325__SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler) 325__SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler)
326#define __NR_sched_getscheduler 145 326#define __NR_sched_getscheduler 145
327__SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler) 327__SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler)
328#define __NR_sched_get_priority_max 146 328#define __NR_sched_get_priority_max 146
329__SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) 329__SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max)
330#define __NR_sched_get_priority_min 147 330#define __NR_sched_get_priority_min 147
331__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) 331__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min)
332#define __NR_sched_rr_get_interval 148 332#define __NR_sched_rr_get_interval 148
333__SYSCALL(__NR_sched_rr_get_interval, sys_sched_rr_get_interval) 333__SYSCALL(__NR_sched_rr_get_interval, sys_sched_rr_get_interval)
334 334
335#define __NR_mlock 149 335#define __NR_mlock 149
336__SYSCALL(__NR_mlock, sys_mlock) 336__SYSCALL(__NR_mlock, sys_mlock)
337#define __NR_munlock 150 337#define __NR_munlock 150
338__SYSCALL(__NR_munlock, sys_munlock) 338__SYSCALL(__NR_munlock, sys_munlock)
339#define __NR_mlockall 151 339#define __NR_mlockall 151
340__SYSCALL(__NR_mlockall, sys_mlockall) 340__SYSCALL(__NR_mlockall, sys_mlockall)
341#define __NR_munlockall 152 341#define __NR_munlockall 152
342__SYSCALL(__NR_munlockall, sys_munlockall) 342__SYSCALL(__NR_munlockall, sys_munlockall)
343 343
344#define __NR_vhangup 153 344#define __NR_vhangup 153
345__SYSCALL(__NR_vhangup, sys_vhangup) 345__SYSCALL(__NR_vhangup, sys_vhangup)
346 346
347#define __NR_modify_ldt 154 347#define __NR_modify_ldt 154
348__SYSCALL(__NR_modify_ldt, sys_modify_ldt) 348__SYSCALL(__NR_modify_ldt, sys_modify_ldt)
349 349
350#define __NR_pivot_root 155 350#define __NR_pivot_root 155
351__SYSCALL(__NR_pivot_root, sys_pivot_root) 351__SYSCALL(__NR_pivot_root, sys_pivot_root)
352 352
353#define __NR__sysctl 156 353#define __NR__sysctl 156
354__SYSCALL(__NR__sysctl, sys_sysctl) 354__SYSCALL(__NR__sysctl, sys_sysctl)
355 355
356#define __NR_prctl 157 356#define __NR_prctl 157
357__SYSCALL(__NR_prctl, sys_prctl) 357__SYSCALL(__NR_prctl, sys_prctl)
358#define __NR_arch_prctl 158 358#define __NR_arch_prctl 158
359__SYSCALL(__NR_arch_prctl, sys_arch_prctl) 359__SYSCALL(__NR_arch_prctl, sys_arch_prctl)
360 360
361#define __NR_adjtimex 159 361#define __NR_adjtimex 159
362__SYSCALL(__NR_adjtimex, sys_adjtimex) 362__SYSCALL(__NR_adjtimex, sys_adjtimex)
363 363
364#define __NR_setrlimit 160 364#define __NR_setrlimit 160
365__SYSCALL(__NR_setrlimit, sys_setrlimit) 365__SYSCALL(__NR_setrlimit, sys_setrlimit)
366 366
367#define __NR_chroot 161 367#define __NR_chroot 161
368__SYSCALL(__NR_chroot, sys_chroot) 368__SYSCALL(__NR_chroot, sys_chroot)
369 369
370#define __NR_sync 162 370#define __NR_sync 162
371__SYSCALL(__NR_sync, sys_sync) 371__SYSCALL(__NR_sync, sys_sync)
372 372
373#define __NR_acct 163 373#define __NR_acct 163
374__SYSCALL(__NR_acct, sys_acct) 374__SYSCALL(__NR_acct, sys_acct)
375 375
376#define __NR_settimeofday 164 376#define __NR_settimeofday 164
377__SYSCALL(__NR_settimeofday, sys_settimeofday) 377__SYSCALL(__NR_settimeofday, sys_settimeofday)
378 378
379#define __NR_mount 165 379#define __NR_mount 165
380__SYSCALL(__NR_mount, sys_mount) 380__SYSCALL(__NR_mount, sys_mount)
381#define __NR_umount2 166 381#define __NR_umount2 166
382__SYSCALL(__NR_umount2, sys_umount) 382__SYSCALL(__NR_umount2, sys_umount)
383 383
384#define __NR_swapon 167 384#define __NR_swapon 167
385__SYSCALL(__NR_swapon, sys_swapon) 385__SYSCALL(__NR_swapon, sys_swapon)
386#define __NR_swapoff 168 386#define __NR_swapoff 168
387__SYSCALL(__NR_swapoff, sys_swapoff) 387__SYSCALL(__NR_swapoff, sys_swapoff)
388 388
389#define __NR_reboot 169 389#define __NR_reboot 169
390__SYSCALL(__NR_reboot, sys_reboot) 390__SYSCALL(__NR_reboot, sys_reboot)
391 391
392#define __NR_sethostname 170 392#define __NR_sethostname 170
393__SYSCALL(__NR_sethostname, sys_sethostname) 393__SYSCALL(__NR_sethostname, sys_sethostname)
394#define __NR_setdomainname 171 394#define __NR_setdomainname 171
395__SYSCALL(__NR_setdomainname, sys_setdomainname) 395__SYSCALL(__NR_setdomainname, sys_setdomainname)
396 396
397#define __NR_iopl 172 397#define __NR_iopl 172
398__SYSCALL(__NR_iopl, stub_iopl) 398__SYSCALL(__NR_iopl, stub_iopl)
399#define __NR_ioperm 173 399#define __NR_ioperm 173
400__SYSCALL(__NR_ioperm, sys_ioperm) 400__SYSCALL(__NR_ioperm, sys_ioperm)
401 401
402#define __NR_create_module 174 402#define __NR_create_module 174
403__SYSCALL(__NR_create_module, sys_ni_syscall) 403__SYSCALL(__NR_create_module, sys_ni_syscall)
404#define __NR_init_module 175 404#define __NR_init_module 175
405__SYSCALL(__NR_init_module, sys_init_module) 405__SYSCALL(__NR_init_module, sys_init_module)
406#define __NR_delete_module 176 406#define __NR_delete_module 176
407__SYSCALL(__NR_delete_module, sys_delete_module) 407__SYSCALL(__NR_delete_module, sys_delete_module)
408#define __NR_get_kernel_syms 177 408#define __NR_get_kernel_syms 177
409__SYSCALL(__NR_get_kernel_syms, sys_ni_syscall) 409__SYSCALL(__NR_get_kernel_syms, sys_ni_syscall)
410#define __NR_query_module 178 410#define __NR_query_module 178
411__SYSCALL(__NR_query_module, sys_ni_syscall) 411__SYSCALL(__NR_query_module, sys_ni_syscall)
412 412
413#define __NR_quotactl 179 413#define __NR_quotactl 179
414__SYSCALL(__NR_quotactl, sys_quotactl) 414__SYSCALL(__NR_quotactl, sys_quotactl)
415 415
416#define __NR_nfsservctl 180 416#define __NR_nfsservctl 180
417__SYSCALL(__NR_nfsservctl, sys_nfsservctl) 417__SYSCALL(__NR_nfsservctl, sys_nfsservctl)
418 418
419#define __NR_getpmsg 181 /* reserved for LiS/STREAMS */ 419/* reserved for LiS/STREAMS */
420#define __NR_getpmsg 181
420__SYSCALL(__NR_getpmsg, sys_ni_syscall) 421__SYSCALL(__NR_getpmsg, sys_ni_syscall)
421#define __NR_putpmsg 182 /* reserved for LiS/STREAMS */ 422#define __NR_putpmsg 182
422__SYSCALL(__NR_putpmsg, sys_ni_syscall) 423__SYSCALL(__NR_putpmsg, sys_ni_syscall)
423 424
424#define __NR_afs_syscall 183 /* reserved for AFS */ 425/* reserved for AFS */
426#define __NR_afs_syscall 183
425__SYSCALL(__NR_afs_syscall, sys_ni_syscall) 427__SYSCALL(__NR_afs_syscall, sys_ni_syscall)
426 428
427#define __NR_tuxcall 184 /* reserved for tux */ 429/* reserved for tux */
430#define __NR_tuxcall 184
428__SYSCALL(__NR_tuxcall, sys_ni_syscall) 431__SYSCALL(__NR_tuxcall, sys_ni_syscall)
429 432
430#define __NR_security 185 433#define __NR_security 185
431__SYSCALL(__NR_security, sys_ni_syscall) 434__SYSCALL(__NR_security, sys_ni_syscall)
432 435
433#define __NR_gettid 186 436#define __NR_gettid 186
434__SYSCALL(__NR_gettid, sys_gettid) 437__SYSCALL(__NR_gettid, sys_gettid)
435 438
436#define __NR_readahead 187 439#define __NR_readahead 187
437__SYSCALL(__NR_readahead, sys_readahead) 440__SYSCALL(__NR_readahead, sys_readahead)
438#define __NR_setxattr 188 441#define __NR_setxattr 188
439__SYSCALL(__NR_setxattr, sys_setxattr) 442__SYSCALL(__NR_setxattr, sys_setxattr)
440#define __NR_lsetxattr 189 443#define __NR_lsetxattr 189
441__SYSCALL(__NR_lsetxattr, sys_lsetxattr) 444__SYSCALL(__NR_lsetxattr, sys_lsetxattr)
442#define __NR_fsetxattr 190 445#define __NR_fsetxattr 190
443__SYSCALL(__NR_fsetxattr, sys_fsetxattr) 446__SYSCALL(__NR_fsetxattr, sys_fsetxattr)
444#define __NR_getxattr 191 447#define __NR_getxattr 191
445__SYSCALL(__NR_getxattr, sys_getxattr) 448__SYSCALL(__NR_getxattr, sys_getxattr)
446#define __NR_lgetxattr 192 449#define __NR_lgetxattr 192
447__SYSCALL(__NR_lgetxattr, sys_lgetxattr) 450__SYSCALL(__NR_lgetxattr, sys_lgetxattr)
448#define __NR_fgetxattr 193 451#define __NR_fgetxattr 193
449__SYSCALL(__NR_fgetxattr, sys_fgetxattr) 452__SYSCALL(__NR_fgetxattr, sys_fgetxattr)
450#define __NR_listxattr 194 453#define __NR_listxattr 194
451__SYSCALL(__NR_listxattr, sys_listxattr) 454__SYSCALL(__NR_listxattr, sys_listxattr)
452#define __NR_llistxattr 195 455#define __NR_llistxattr 195
453__SYSCALL(__NR_llistxattr, sys_llistxattr) 456__SYSCALL(__NR_llistxattr, sys_llistxattr)
454#define __NR_flistxattr 196 457#define __NR_flistxattr 196
455__SYSCALL(__NR_flistxattr, sys_flistxattr) 458__SYSCALL(__NR_flistxattr, sys_flistxattr)
456#define __NR_removexattr 197 459#define __NR_removexattr 197
457__SYSCALL(__NR_removexattr, sys_removexattr) 460__SYSCALL(__NR_removexattr, sys_removexattr)
458#define __NR_lremovexattr 198 461#define __NR_lremovexattr 198
459__SYSCALL(__NR_lremovexattr, sys_lremovexattr) 462__SYSCALL(__NR_lremovexattr, sys_lremovexattr)
460#define __NR_fremovexattr 199 463#define __NR_fremovexattr 199
461__SYSCALL(__NR_fremovexattr, sys_fremovexattr) 464__SYSCALL(__NR_fremovexattr, sys_fremovexattr)
462#define __NR_tkill 200 465#define __NR_tkill 200
463__SYSCALL(__NR_tkill, sys_tkill) 466__SYSCALL(__NR_tkill, sys_tkill)
464#define __NR_time 201 467#define __NR_time 201
465__SYSCALL(__NR_time, sys_time) 468__SYSCALL(__NR_time, sys_time)
466#define __NR_futex 202 469#define __NR_futex 202
467__SYSCALL(__NR_futex, sys_futex) 470__SYSCALL(__NR_futex, sys_futex)
468#define __NR_sched_setaffinity 203 471#define __NR_sched_setaffinity 203
469__SYSCALL(__NR_sched_setaffinity, sys_sched_setaffinity) 472__SYSCALL(__NR_sched_setaffinity, sys_sched_setaffinity)
470#define __NR_sched_getaffinity 204 473#define __NR_sched_getaffinity 204
471__SYSCALL(__NR_sched_getaffinity, sys_sched_getaffinity) 474__SYSCALL(__NR_sched_getaffinity, sys_sched_getaffinity)
472#define __NR_set_thread_area 205 475#define __NR_set_thread_area 205
473__SYSCALL(__NR_set_thread_area, sys_ni_syscall) /* use arch_prctl */ 476__SYSCALL(__NR_set_thread_area, sys_ni_syscall) /* use arch_prctl */
474#define __NR_io_setup 206 477#define __NR_io_setup 206
475__SYSCALL(__NR_io_setup, sys_io_setup) 478__SYSCALL(__NR_io_setup, sys_io_setup)
476#define __NR_io_destroy 207 479#define __NR_io_destroy 207
477__SYSCALL(__NR_io_destroy, sys_io_destroy) 480__SYSCALL(__NR_io_destroy, sys_io_destroy)
478#define __NR_io_getevents 208 481#define __NR_io_getevents 208
479__SYSCALL(__NR_io_getevents, sys_io_getevents) 482__SYSCALL(__NR_io_getevents, sys_io_getevents)
480#define __NR_io_submit 209 483#define __NR_io_submit 209
481__SYSCALL(__NR_io_submit, sys_io_submit) 484__SYSCALL(__NR_io_submit, sys_io_submit)
482#define __NR_io_cancel 210 485#define __NR_io_cancel 210
483__SYSCALL(__NR_io_cancel, sys_io_cancel) 486__SYSCALL(__NR_io_cancel, sys_io_cancel)
484#define __NR_get_thread_area 211 487#define __NR_get_thread_area 211
485__SYSCALL(__NR_get_thread_area, sys_ni_syscall) /* use arch_prctl */ 488__SYSCALL(__NR_get_thread_area, sys_ni_syscall) /* use arch_prctl */
486#define __NR_lookup_dcookie 212 489#define __NR_lookup_dcookie 212
487__SYSCALL(__NR_lookup_dcookie, sys_lookup_dcookie) 490__SYSCALL(__NR_lookup_dcookie, sys_lookup_dcookie)
488#define __NR_epoll_create 213 491#define __NR_epoll_create 213
489__SYSCALL(__NR_epoll_create, sys_epoll_create) 492__SYSCALL(__NR_epoll_create, sys_epoll_create)
490#define __NR_epoll_ctl_old 214 493#define __NR_epoll_ctl_old 214
491__SYSCALL(__NR_epoll_ctl_old, sys_ni_syscall) 494__SYSCALL(__NR_epoll_ctl_old, sys_ni_syscall)
492#define __NR_epoll_wait_old 215 495#define __NR_epoll_wait_old 215
493__SYSCALL(__NR_epoll_wait_old, sys_ni_syscall) 496__SYSCALL(__NR_epoll_wait_old, sys_ni_syscall)
494#define __NR_remap_file_pages 216 497#define __NR_remap_file_pages 216
495__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages) 498__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages)
496#define __NR_getdents64 217 499#define __NR_getdents64 217
497__SYSCALL(__NR_getdents64, sys_getdents64) 500__SYSCALL(__NR_getdents64, sys_getdents64)
498#define __NR_set_tid_address 218 501#define __NR_set_tid_address 218
499__SYSCALL(__NR_set_tid_address, sys_set_tid_address) 502__SYSCALL(__NR_set_tid_address, sys_set_tid_address)
500#define __NR_restart_syscall 219 503#define __NR_restart_syscall 219
501__SYSCALL(__NR_restart_syscall, sys_restart_syscall) 504__SYSCALL(__NR_restart_syscall, sys_restart_syscall)
502#define __NR_semtimedop 220 505#define __NR_semtimedop 220
503__SYSCALL(__NR_semtimedop, sys_semtimedop) 506__SYSCALL(__NR_semtimedop, sys_semtimedop)
504#define __NR_fadvise64 221 507#define __NR_fadvise64 221
505__SYSCALL(__NR_fadvise64, sys_fadvise64) 508__SYSCALL(__NR_fadvise64, sys_fadvise64)
506#define __NR_timer_create 222 509#define __NR_timer_create 222
507__SYSCALL(__NR_timer_create, sys_timer_create) 510__SYSCALL(__NR_timer_create, sys_timer_create)
508#define __NR_timer_settime 223 511#define __NR_timer_settime 223
509__SYSCALL(__NR_timer_settime, sys_timer_settime) 512__SYSCALL(__NR_timer_settime, sys_timer_settime)
510#define __NR_timer_gettime 224 513#define __NR_timer_gettime 224
511__SYSCALL(__NR_timer_gettime, sys_timer_gettime) 514__SYSCALL(__NR_timer_gettime, sys_timer_gettime)
512#define __NR_timer_getoverrun 225 515#define __NR_timer_getoverrun 225
513__SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) 516__SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun)
514#define __NR_timer_delete 226 517#define __NR_timer_delete 226
515__SYSCALL(__NR_timer_delete, sys_timer_delete) 518__SYSCALL(__NR_timer_delete, sys_timer_delete)
516#define __NR_clock_settime 227 519#define __NR_clock_settime 227
517__SYSCALL(__NR_clock_settime, sys_clock_settime) 520__SYSCALL(__NR_clock_settime, sys_clock_settime)
518#define __NR_clock_gettime 228 521#define __NR_clock_gettime 228
519__SYSCALL(__NR_clock_gettime, sys_clock_gettime) 522__SYSCALL(__NR_clock_gettime, sys_clock_gettime)
520#define __NR_clock_getres 229 523#define __NR_clock_getres 229
521__SYSCALL(__NR_clock_getres, sys_clock_getres) 524__SYSCALL(__NR_clock_getres, sys_clock_getres)
522#define __NR_clock_nanosleep 230 525#define __NR_clock_nanosleep 230
523__SYSCALL(__NR_clock_nanosleep, sys_clock_nanosleep) 526__SYSCALL(__NR_clock_nanosleep, sys_clock_nanosleep)
524#define __NR_exit_group 231 527#define __NR_exit_group 231
525__SYSCALL(__NR_exit_group, sys_exit_group) 528__SYSCALL(__NR_exit_group, sys_exit_group)
526#define __NR_epoll_wait 232 529#define __NR_epoll_wait 232
527__SYSCALL(__NR_epoll_wait, sys_epoll_wait) 530__SYSCALL(__NR_epoll_wait, sys_epoll_wait)
528#define __NR_epoll_ctl 233 531#define __NR_epoll_ctl 233
529__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) 532__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl)
530#define __NR_tgkill 234 533#define __NR_tgkill 234
531__SYSCALL(__NR_tgkill, sys_tgkill) 534__SYSCALL(__NR_tgkill, sys_tgkill)
532#define __NR_utimes 235 535#define __NR_utimes 235
533__SYSCALL(__NR_utimes, sys_utimes) 536__SYSCALL(__NR_utimes, sys_utimes)
534#define __NR_vserver 236 537#define __NR_vserver 236
535__SYSCALL(__NR_vserver, sys_ni_syscall) 538__SYSCALL(__NR_vserver, sys_ni_syscall)
536#define __NR_mbind 237 539#define __NR_mbind 237
537__SYSCALL(__NR_mbind, sys_mbind) 540__SYSCALL(__NR_mbind, sys_mbind)
538#define __NR_set_mempolicy 238 541#define __NR_set_mempolicy 238
539__SYSCALL(__NR_set_mempolicy, sys_set_mempolicy) 542__SYSCALL(__NR_set_mempolicy, sys_set_mempolicy)
540#define __NR_get_mempolicy 239 543#define __NR_get_mempolicy 239
541__SYSCALL(__NR_get_mempolicy, sys_get_mempolicy) 544__SYSCALL(__NR_get_mempolicy, sys_get_mempolicy)
542#define __NR_mq_open 240 545#define __NR_mq_open 240
543__SYSCALL(__NR_mq_open, sys_mq_open) 546__SYSCALL(__NR_mq_open, sys_mq_open)
544#define __NR_mq_unlink 241 547#define __NR_mq_unlink 241
545__SYSCALL(__NR_mq_unlink, sys_mq_unlink) 548__SYSCALL(__NR_mq_unlink, sys_mq_unlink)
546#define __NR_mq_timedsend 242 549#define __NR_mq_timedsend 242
547__SYSCALL(__NR_mq_timedsend, sys_mq_timedsend) 550__SYSCALL(__NR_mq_timedsend, sys_mq_timedsend)
548#define __NR_mq_timedreceive 243 551#define __NR_mq_timedreceive 243
549__SYSCALL(__NR_mq_timedreceive, sys_mq_timedreceive) 552__SYSCALL(__NR_mq_timedreceive, sys_mq_timedreceive)
550#define __NR_mq_notify 244 553#define __NR_mq_notify 244
551__SYSCALL(__NR_mq_notify, sys_mq_notify) 554__SYSCALL(__NR_mq_notify, sys_mq_notify)
552#define __NR_mq_getsetattr 245 555#define __NR_mq_getsetattr 245
553__SYSCALL(__NR_mq_getsetattr, sys_mq_getsetattr) 556__SYSCALL(__NR_mq_getsetattr, sys_mq_getsetattr)
554#define __NR_kexec_load 246 557#define __NR_kexec_load 246
555__SYSCALL(__NR_kexec_load, sys_kexec_load) 558__SYSCALL(__NR_kexec_load, sys_kexec_load)
556#define __NR_waitid 247 559#define __NR_waitid 247
557__SYSCALL(__NR_waitid, sys_waitid) 560__SYSCALL(__NR_waitid, sys_waitid)
558#define __NR_add_key 248 561#define __NR_add_key 248
559__SYSCALL(__NR_add_key, sys_add_key) 562__SYSCALL(__NR_add_key, sys_add_key)
560#define __NR_request_key 249 563#define __NR_request_key 249
561__SYSCALL(__NR_request_key, sys_request_key) 564__SYSCALL(__NR_request_key, sys_request_key)
562#define __NR_keyctl 250 565#define __NR_keyctl 250
563__SYSCALL(__NR_keyctl, sys_keyctl) 566__SYSCALL(__NR_keyctl, sys_keyctl)
564#define __NR_ioprio_set 251 567#define __NR_ioprio_set 251
565__SYSCALL(__NR_ioprio_set, sys_ioprio_set) 568__SYSCALL(__NR_ioprio_set, sys_ioprio_set)
566#define __NR_ioprio_get 252 569#define __NR_ioprio_get 252
567__SYSCALL(__NR_ioprio_get, sys_ioprio_get) 570__SYSCALL(__NR_ioprio_get, sys_ioprio_get)
568#define __NR_inotify_init 253 571#define __NR_inotify_init 253
569__SYSCALL(__NR_inotify_init, sys_inotify_init) 572__SYSCALL(__NR_inotify_init, sys_inotify_init)
570#define __NR_inotify_add_watch 254 573#define __NR_inotify_add_watch 254
571__SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) 574__SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch)
572#define __NR_inotify_rm_watch 255 575#define __NR_inotify_rm_watch 255
573__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) 576__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch)
574#define __NR_migrate_pages 256 577#define __NR_migrate_pages 256
575__SYSCALL(__NR_migrate_pages, sys_migrate_pages) 578__SYSCALL(__NR_migrate_pages, sys_migrate_pages)
576#define __NR_openat 257 579#define __NR_openat 257
577__SYSCALL(__NR_openat, sys_openat) 580__SYSCALL(__NR_openat, sys_openat)
578#define __NR_mkdirat 258 581#define __NR_mkdirat 258
579__SYSCALL(__NR_mkdirat, sys_mkdirat) 582__SYSCALL(__NR_mkdirat, sys_mkdirat)
580#define __NR_mknodat 259 583#define __NR_mknodat 259
581__SYSCALL(__NR_mknodat, sys_mknodat) 584__SYSCALL(__NR_mknodat, sys_mknodat)
582#define __NR_fchownat 260 585#define __NR_fchownat 260
583__SYSCALL(__NR_fchownat, sys_fchownat) 586__SYSCALL(__NR_fchownat, sys_fchownat)
584#define __NR_futimesat 261 587#define __NR_futimesat 261
585__SYSCALL(__NR_futimesat, sys_futimesat) 588__SYSCALL(__NR_futimesat, sys_futimesat)
586#define __NR_newfstatat 262 589#define __NR_newfstatat 262
587__SYSCALL(__NR_newfstatat, sys_newfstatat) 590__SYSCALL(__NR_newfstatat, sys_newfstatat)
588#define __NR_unlinkat 263 591#define __NR_unlinkat 263
589__SYSCALL(__NR_unlinkat, sys_unlinkat) 592__SYSCALL(__NR_unlinkat, sys_unlinkat)
590#define __NR_renameat 264 593#define __NR_renameat 264
591__SYSCALL(__NR_renameat, sys_renameat) 594__SYSCALL(__NR_renameat, sys_renameat)
592#define __NR_linkat 265 595#define __NR_linkat 265
593__SYSCALL(__NR_linkat, sys_linkat) 596__SYSCALL(__NR_linkat, sys_linkat)
594#define __NR_symlinkat 266 597#define __NR_symlinkat 266
595__SYSCALL(__NR_symlinkat, sys_symlinkat) 598__SYSCALL(__NR_symlinkat, sys_symlinkat)
596#define __NR_readlinkat 267 599#define __NR_readlinkat 267
597__SYSCALL(__NR_readlinkat, sys_readlinkat) 600__SYSCALL(__NR_readlinkat, sys_readlinkat)
598#define __NR_fchmodat 268 601#define __NR_fchmodat 268
599__SYSCALL(__NR_fchmodat, sys_fchmodat) 602__SYSCALL(__NR_fchmodat, sys_fchmodat)
600#define __NR_faccessat 269 603#define __NR_faccessat 269
601__SYSCALL(__NR_faccessat, sys_faccessat) 604__SYSCALL(__NR_faccessat, sys_faccessat)
602#define __NR_pselect6 270 605#define __NR_pselect6 270
603__SYSCALL(__NR_pselect6, sys_pselect6) 606__SYSCALL(__NR_pselect6, sys_pselect6)
604#define __NR_ppoll 271 607#define __NR_ppoll 271
605__SYSCALL(__NR_ppoll, sys_ppoll) 608__SYSCALL(__NR_ppoll, sys_ppoll)
606#define __NR_unshare 272 609#define __NR_unshare 272
607__SYSCALL(__NR_unshare, sys_unshare) 610__SYSCALL(__NR_unshare, sys_unshare)
608#define __NR_set_robust_list 273 611#define __NR_set_robust_list 273
609__SYSCALL(__NR_set_robust_list, sys_set_robust_list) 612__SYSCALL(__NR_set_robust_list, sys_set_robust_list)
610#define __NR_get_robust_list 274 613#define __NR_get_robust_list 274
611__SYSCALL(__NR_get_robust_list, sys_get_robust_list) 614__SYSCALL(__NR_get_robust_list, sys_get_robust_list)
612#define __NR_splice 275 615#define __NR_splice 275
613__SYSCALL(__NR_splice, sys_splice) 616__SYSCALL(__NR_splice, sys_splice)
614#define __NR_tee 276 617#define __NR_tee 276
615__SYSCALL(__NR_tee, sys_tee) 618__SYSCALL(__NR_tee, sys_tee)
616#define __NR_sync_file_range 277 619#define __NR_sync_file_range 277
617__SYSCALL(__NR_sync_file_range, sys_sync_file_range) 620__SYSCALL(__NR_sync_file_range, sys_sync_file_range)
618#define __NR_vmsplice 278 621#define __NR_vmsplice 278
619__SYSCALL(__NR_vmsplice, sys_vmsplice) 622__SYSCALL(__NR_vmsplice, sys_vmsplice)
620#define __NR_move_pages 279 623#define __NR_move_pages 279
621__SYSCALL(__NR_move_pages, sys_move_pages) 624__SYSCALL(__NR_move_pages, sys_move_pages)
622#define __NR_utimensat 280 625#define __NR_utimensat 280
623__SYSCALL(__NR_utimensat, sys_utimensat) 626__SYSCALL(__NR_utimensat, sys_utimensat)
624#define __IGNORE_getcpu /* implemented as a vsyscall */ 627#define __IGNORE_getcpu /* implemented as a vsyscall */
625#define __NR_epoll_pwait 281 628#define __NR_epoll_pwait 281
626__SYSCALL(__NR_epoll_pwait, sys_epoll_pwait) 629__SYSCALL(__NR_epoll_pwait, sys_epoll_pwait)
627#define __NR_signalfd 282 630#define __NR_signalfd 282
628__SYSCALL(__NR_signalfd, sys_signalfd) 631__SYSCALL(__NR_signalfd, sys_signalfd)
629#define __NR_timerfd 283 632#define __NR_timerfd 283
630__SYSCALL(__NR_timerfd, sys_timerfd) 633__SYSCALL(__NR_timerfd, sys_timerfd)
631#define __NR_eventfd 284 634#define __NR_eventfd 284
632__SYSCALL(__NR_eventfd, sys_eventfd) 635__SYSCALL(__NR_eventfd, sys_eventfd)
633#define __NR_fallocate 285 636#define __NR_fallocate 285
634__SYSCALL(__NR_fallocate, sys_fallocate) 637__SYSCALL(__NR_fallocate, sys_fallocate)
635 638
636#ifndef __NO_STUBS 639#ifndef __NO_STUBS
@@ -656,26 +659,9 @@ __SYSCALL(__NR_fallocate, sys_fallocate)
656#define __ARCH_WANT_SYS_RT_SIGSUSPEND 659#define __ARCH_WANT_SYS_RT_SIGSUSPEND
657#define __ARCH_WANT_SYS_TIME 660#define __ARCH_WANT_SYS_TIME
658#define __ARCH_WANT_COMPAT_SYS_TIME 661#define __ARCH_WANT_COMPAT_SYS_TIME
659
660#ifdef __KERNEL__
661#ifndef __ASSEMBLY__
662
663#include <linux/linkage.h>
664#include <linux/compiler.h>
665#include <linux/types.h>
666#include <asm/ptrace.h>
667
668asmlinkage long sys_iopl(unsigned int level, struct pt_regs *regs);
669struct sigaction;
670asmlinkage long sys_rt_sigaction(int sig,
671 const struct sigaction __user *act,
672 struct sigaction __user *oact,
673 size_t sigsetsize);
674
675#endif /* __ASSEMBLY__ */
676#endif /* __KERNEL__ */
677#endif /* __NO_STUBS */ 662#endif /* __NO_STUBS */
678 663
664#ifdef __KERNEL__
679/* 665/*
680 * "Conditional" syscalls 666 * "Conditional" syscalls
681 * 667 *
@@ -683,5 +669,6 @@ asmlinkage long sys_rt_sigaction(int sig,
683 * but it doesn't work on all toolchains, so we just do it by hand 669 * but it doesn't work on all toolchains, so we just do it by hand
684 */ 670 */
685#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 671#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
672#endif /* __KERNEL__ */
686 673
687#endif /* _ASM_X86_64_UNISTD_H_ */ 674#endif /* _ASM_X86_64_UNISTD_H_ */
diff --git a/include/asm-x86/unwind.h b/include/asm-x86/unwind.h
index 7e4d7ad55208..8b064bd9c553 100644
--- a/include/asm-x86/unwind.h
+++ b/include/asm-x86/unwind.h
@@ -1,5 +1,13 @@
1#ifdef CONFIG_X86_32 1#ifndef _ASM_X86_UNWIND_H
2# include "unwind_32.h" 2#define _ASM_X86_UNWIND_H
3#else 3
4# include "unwind_64.h" 4#define UNW_PC(frame) ((void)(frame), 0UL)
5#endif 5#define UNW_SP(frame) ((void)(frame), 0UL)
6#define UNW_FP(frame) ((void)(frame), 0UL)
7
8static inline int arch_unw_user_mode(const void *info)
9{
10 return 0;
11}
12
13#endif /* _ASM_X86_UNWIND_H */
diff --git a/include/asm-x86/unwind_32.h b/include/asm-x86/unwind_32.h
deleted file mode 100644
index 43c70c3de2f9..000000000000
--- a/include/asm-x86/unwind_32.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _ASM_I386_UNWIND_H
2#define _ASM_I386_UNWIND_H
3
4#define UNW_PC(frame) ((void)(frame), 0)
5#define UNW_SP(frame) ((void)(frame), 0)
6#define UNW_FP(frame) ((void)(frame), 0)
7
8static inline int arch_unw_user_mode(const void *info)
9{
10 return 0;
11}
12
13#endif /* _ASM_I386_UNWIND_H */
diff --git a/include/asm-x86/unwind_64.h b/include/asm-x86/unwind_64.h
deleted file mode 100644
index 02710f6a4560..000000000000
--- a/include/asm-x86/unwind_64.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_X86_64_UNWIND_H
2#define _ASM_X86_64_UNWIND_H
3
4#define UNW_PC(frame) ((void)(frame), 0UL)
5#define UNW_SP(frame) ((void)(frame), 0UL)
6
7static inline int arch_unw_user_mode(const void *info)
8{
9 return 0;
10}
11
12#endif /* _ASM_X86_64_UNWIND_H */