diff options
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/Kbuild | 1 | ||||
-rw-r--r-- | include/asm-x86/futex.h | 7 | ||||
-rw-r--r-- | include/asm-x86/kprobes.h | 1 | ||||
-rw-r--r-- | include/asm-x86/lguest.h | 11 | ||||
-rw-r--r-- | include/asm-x86/nops.h | 66 | ||||
-rw-r--r-- | include/asm-x86/page_64.h | 8 | ||||
-rw-r--r-- | include/asm-x86/pgtable_32.h | 5 | ||||
-rw-r--r-- | include/asm-x86/ptrace-abi.h | 8 |
8 files changed, 76 insertions, 31 deletions
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild index b04a7ff46df1..3b8160a2b47e 100644 --- a/include/asm-x86/Kbuild +++ b/include/asm-x86/Kbuild | |||
@@ -16,7 +16,6 @@ unifdef-y += ist.h | |||
16 | unifdef-y += mce.h | 16 | unifdef-y += mce.h |
17 | unifdef-y += msr.h | 17 | unifdef-y += msr.h |
18 | unifdef-y += mtrr.h | 18 | unifdef-y += mtrr.h |
19 | unifdef-y += page.h | ||
20 | unifdef-y += posix_types_32.h | 19 | unifdef-y += posix_types_32.h |
21 | unifdef-y += posix_types_64.h | 20 | unifdef-y += posix_types_64.h |
22 | unifdef-y += ptrace.h | 21 | unifdef-y += ptrace.h |
diff --git a/include/asm-x86/futex.h b/include/asm-x86/futex.h index cd9f894dd2d7..c9952ea9f698 100644 --- a/include/asm-x86/futex.h +++ b/include/asm-x86/futex.h | |||
@@ -102,6 +102,13 @@ futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | |||
102 | static inline int | 102 | static inline int |
103 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | 103 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) |
104 | { | 104 | { |
105 | |||
106 | #if defined(CONFIG_X86_32) && !defined(CONFIG_X86_BSWAP) | ||
107 | /* Real i386 machines have no cmpxchg instruction */ | ||
108 | if (boot_cpu_data.x86 == 3) | ||
109 | return -ENOSYS; | ||
110 | #endif | ||
111 | |||
105 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | 112 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) |
106 | return -EFAULT; | 113 | return -EFAULT; |
107 | 114 | ||
diff --git a/include/asm-x86/kprobes.h b/include/asm-x86/kprobes.h index 143476a3cb52..61ad7b5d142e 100644 --- a/include/asm-x86/kprobes.h +++ b/include/asm-x86/kprobes.h | |||
@@ -42,7 +42,6 @@ typedef u8 kprobe_opcode_t; | |||
42 | : (((unsigned long)current_thread_info()) + THREAD_SIZE \ | 42 | : (((unsigned long)current_thread_info()) + THREAD_SIZE \ |
43 | - (unsigned long)(ADDR))) | 43 | - (unsigned long)(ADDR))) |
44 | 44 | ||
45 | #define ARCH_SUPPORTS_KRETPROBES | ||
46 | #define flush_insn_slot(p) do { } while (0) | 45 | #define flush_insn_slot(p) do { } while (0) |
47 | 46 | ||
48 | extern const int kretprobe_blacklist_size; | 47 | extern const int kretprobe_blacklist_size; |
diff --git a/include/asm-x86/lguest.h b/include/asm-x86/lguest.h index 4d9367b72976..9b17571e9bc3 100644 --- a/include/asm-x86/lguest.h +++ b/include/asm-x86/lguest.h | |||
@@ -23,6 +23,17 @@ | |||
23 | /* Found in switcher.S */ | 23 | /* Found in switcher.S */ |
24 | extern unsigned long default_idt_entries[]; | 24 | extern unsigned long default_idt_entries[]; |
25 | 25 | ||
26 | /* Declarations for definitions in lguest_guest.S */ | ||
27 | extern char lguest_noirq_start[], lguest_noirq_end[]; | ||
28 | extern const char lgstart_cli[], lgend_cli[]; | ||
29 | extern const char lgstart_sti[], lgend_sti[]; | ||
30 | extern const char lgstart_popf[], lgend_popf[]; | ||
31 | extern const char lgstart_pushf[], lgend_pushf[]; | ||
32 | extern const char lgstart_iret[], lgend_iret[]; | ||
33 | |||
34 | extern void lguest_iret(void); | ||
35 | extern void lguest_init(void); | ||
36 | |||
26 | struct lguest_regs | 37 | struct lguest_regs |
27 | { | 38 | { |
28 | /* Manually saved part. */ | 39 | /* Manually saved part. */ |
diff --git a/include/asm-x86/nops.h b/include/asm-x86/nops.h index fec025c7f58c..e3b2bce0aff8 100644 --- a/include/asm-x86/nops.h +++ b/include/asm-x86/nops.h | |||
@@ -3,17 +3,29 @@ | |||
3 | 3 | ||
4 | /* Define nops for use with alternative() */ | 4 | /* Define nops for use with alternative() */ |
5 | 5 | ||
6 | /* generic versions from gas */ | 6 | /* generic versions from gas |
7 | #define GENERIC_NOP1 ".byte 0x90\n" | 7 | 1: nop |
8 | #define GENERIC_NOP2 ".byte 0x89,0xf6\n" | 8 | 2: movl %esi,%esi |
9 | #define GENERIC_NOP3 ".byte 0x8d,0x76,0x00\n" | 9 | 3: leal 0x00(%esi),%esi |
10 | #define GENERIC_NOP4 ".byte 0x8d,0x74,0x26,0x00\n" | 10 | 4: leal 0x00(,%esi,1),%esi |
11 | #define GENERIC_NOP5 GENERIC_NOP1 GENERIC_NOP4 | 11 | 6: leal 0x00000000(%esi),%esi |
12 | #define GENERIC_NOP6 ".byte 0x8d,0xb6,0x00,0x00,0x00,0x00\n" | 12 | 7: leal 0x00000000(,%esi,1),%esi |
13 | #define GENERIC_NOP7 ".byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00\n" | 13 | */ |
14 | #define GENERIC_NOP8 GENERIC_NOP1 GENERIC_NOP7 | 14 | #define GENERIC_NOP1 ".byte 0x90\n" |
15 | #define GENERIC_NOP2 ".byte 0x89,0xf6\n" | ||
16 | #define GENERIC_NOP3 ".byte 0x8d,0x76,0x00\n" | ||
17 | #define GENERIC_NOP4 ".byte 0x8d,0x74,0x26,0x00\n" | ||
18 | #define GENERIC_NOP5 GENERIC_NOP1 GENERIC_NOP4 | ||
19 | #define GENERIC_NOP6 ".byte 0x8d,0xb6,0x00,0x00,0x00,0x00\n" | ||
20 | #define GENERIC_NOP7 ".byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00\n" | ||
21 | #define GENERIC_NOP8 GENERIC_NOP1 GENERIC_NOP7 | ||
15 | 22 | ||
16 | /* Opteron 64bit nops */ | 23 | /* Opteron 64bit nops |
24 | 1: nop | ||
25 | 2: osp nop | ||
26 | 3: osp osp nop | ||
27 | 4: osp osp osp nop | ||
28 | */ | ||
17 | #define K8_NOP1 GENERIC_NOP1 | 29 | #define K8_NOP1 GENERIC_NOP1 |
18 | #define K8_NOP2 ".byte 0x66,0x90\n" | 30 | #define K8_NOP2 ".byte 0x66,0x90\n" |
19 | #define K8_NOP3 ".byte 0x66,0x66,0x90\n" | 31 | #define K8_NOP3 ".byte 0x66,0x66,0x90\n" |
@@ -23,19 +35,35 @@ | |||
23 | #define K8_NOP7 K8_NOP4 K8_NOP3 | 35 | #define K8_NOP7 K8_NOP4 K8_NOP3 |
24 | #define K8_NOP8 K8_NOP4 K8_NOP4 | 36 | #define K8_NOP8 K8_NOP4 K8_NOP4 |
25 | 37 | ||
26 | /* K7 nops */ | 38 | /* K7 nops |
27 | /* uses eax dependencies (arbitary choice) */ | 39 | uses eax dependencies (arbitary choice) |
28 | #define K7_NOP1 GENERIC_NOP1 | 40 | 1: nop |
41 | 2: movl %eax,%eax | ||
42 | 3: leal (,%eax,1),%eax | ||
43 | 4: leal 0x00(,%eax,1),%eax | ||
44 | 6: leal 0x00000000(%eax),%eax | ||
45 | 7: leal 0x00000000(,%eax,1),%eax | ||
46 | */ | ||
47 | #define K7_NOP1 GENERIC_NOP1 | ||
29 | #define K7_NOP2 ".byte 0x8b,0xc0\n" | 48 | #define K7_NOP2 ".byte 0x8b,0xc0\n" |
30 | #define K7_NOP3 ".byte 0x8d,0x04,0x20\n" | 49 | #define K7_NOP3 ".byte 0x8d,0x04,0x20\n" |
31 | #define K7_NOP4 ".byte 0x8d,0x44,0x20,0x00\n" | 50 | #define K7_NOP4 ".byte 0x8d,0x44,0x20,0x00\n" |
32 | #define K7_NOP5 K7_NOP4 ASM_NOP1 | 51 | #define K7_NOP5 K7_NOP4 ASM_NOP1 |
33 | #define K7_NOP6 ".byte 0x8d,0x80,0,0,0,0\n" | 52 | #define K7_NOP6 ".byte 0x8d,0x80,0,0,0,0\n" |
34 | #define K7_NOP7 ".byte 0x8D,0x04,0x05,0,0,0,0\n" | 53 | #define K7_NOP7 ".byte 0x8D,0x04,0x05,0,0,0,0\n" |
35 | #define K7_NOP8 K7_NOP7 ASM_NOP1 | 54 | #define K7_NOP8 K7_NOP7 ASM_NOP1 |
36 | 55 | ||
37 | /* P6 nops */ | 56 | /* P6 nops |
38 | /* uses eax dependencies (Intel-recommended choice) */ | 57 | uses eax dependencies (Intel-recommended choice) |
58 | 1: nop | ||
59 | 2: osp nop | ||
60 | 3: nopl (%eax) | ||
61 | 4: nopl 0x00(%eax) | ||
62 | 5: nopl 0x00(%eax,%eax,1) | ||
63 | 6: osp nopl 0x00(%eax,%eax,1) | ||
64 | 7: nopl 0x00000000(%eax) | ||
65 | 8: nopl 0x00000000(%eax,%eax,1) | ||
66 | */ | ||
39 | #define P6_NOP1 GENERIC_NOP1 | 67 | #define P6_NOP1 GENERIC_NOP1 |
40 | #define P6_NOP2 ".byte 0x66,0x90\n" | 68 | #define P6_NOP2 ".byte 0x66,0x90\n" |
41 | #define P6_NOP3 ".byte 0x0f,0x1f,0x00\n" | 69 | #define P6_NOP3 ".byte 0x0f,0x1f,0x00\n" |
@@ -63,9 +91,7 @@ | |||
63 | #define ASM_NOP6 K7_NOP6 | 91 | #define ASM_NOP6 K7_NOP6 |
64 | #define ASM_NOP7 K7_NOP7 | 92 | #define ASM_NOP7 K7_NOP7 |
65 | #define ASM_NOP8 K7_NOP8 | 93 | #define ASM_NOP8 K7_NOP8 |
66 | #elif defined(CONFIG_M686) || defined(CONFIG_MPENTIUMII) || \ | 94 | #elif defined(CONFIG_X86_P6_NOP) |
67 | defined(CONFIG_MPENTIUMIII) || defined(CONFIG_MPENTIUMM) || \ | ||
68 | defined(CONFIG_MCORE2) || defined(CONFIG_PENTIUM4) | ||
69 | #define ASM_NOP1 P6_NOP1 | 95 | #define ASM_NOP1 P6_NOP1 |
70 | #define ASM_NOP2 P6_NOP2 | 96 | #define ASM_NOP2 P6_NOP2 |
71 | #define ASM_NOP3 P6_NOP3 | 97 | #define ASM_NOP3 P6_NOP3 |
diff --git a/include/asm-x86/page_64.h b/include/asm-x86/page_64.h index f7393bc516ef..143546073b95 100644 --- a/include/asm-x86/page_64.h +++ b/include/asm-x86/page_64.h | |||
@@ -47,8 +47,12 @@ | |||
47 | #define __PHYSICAL_MASK_SHIFT 46 | 47 | #define __PHYSICAL_MASK_SHIFT 46 |
48 | #define __VIRTUAL_MASK_SHIFT 48 | 48 | #define __VIRTUAL_MASK_SHIFT 48 |
49 | 49 | ||
50 | #define KERNEL_TEXT_SIZE (40*1024*1024) | 50 | /* |
51 | #define KERNEL_TEXT_START _AC(0xffffffff80000000, UL) | 51 | * Kernel image size is limited to 128 MB (see level2_kernel_pgt in |
52 | * arch/x86/kernel/head_64.S), and it is mapped here: | ||
53 | */ | ||
54 | #define KERNEL_IMAGE_SIZE (128*1024*1024) | ||
55 | #define KERNEL_IMAGE_START _AC(0xffffffff80000000, UL) | ||
52 | 56 | ||
53 | #ifndef __ASSEMBLY__ | 57 | #ifndef __ASSEMBLY__ |
54 | void clear_page(void *page); | 58 | void clear_page(void *page); |
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index a842c7222b1e..4e6a0fca0b47 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -26,10 +26,9 @@ struct mm_struct; | |||
26 | struct vm_area_struct; | 26 | struct vm_area_struct; |
27 | 27 | ||
28 | extern pgd_t swapper_pg_dir[1024]; | 28 | extern pgd_t swapper_pg_dir[1024]; |
29 | extern struct kmem_cache *pmd_cache; | ||
30 | void check_pgt_cache(void); | ||
31 | 29 | ||
32 | static inline void pgtable_cache_init(void) {} | 30 | static inline void pgtable_cache_init(void) { } |
31 | static inline void check_pgt_cache(void) { } | ||
33 | void paging_init(void); | 32 | void paging_init(void); |
34 | 33 | ||
35 | 34 | ||
diff --git a/include/asm-x86/ptrace-abi.h b/include/asm-x86/ptrace-abi.h index 81a8ee4c55fc..f224eb3c3157 100644 --- a/include/asm-x86/ptrace-abi.h +++ b/include/asm-x86/ptrace-abi.h | |||
@@ -89,13 +89,13 @@ | |||
89 | */ | 89 | */ |
90 | struct ptrace_bts_config { | 90 | struct ptrace_bts_config { |
91 | /* requested or actual size of BTS buffer in bytes */ | 91 | /* requested or actual size of BTS buffer in bytes */ |
92 | u32 size; | 92 | __u32 size; |
93 | /* bitmask of below flags */ | 93 | /* bitmask of below flags */ |
94 | u32 flags; | 94 | __u32 flags; |
95 | /* buffer overflow signal */ | 95 | /* buffer overflow signal */ |
96 | u32 signal; | 96 | __u32 signal; |
97 | /* actual size of bts_struct in bytes */ | 97 | /* actual size of bts_struct in bytes */ |
98 | u32 bts_size; | 98 | __u32 bts_size; |
99 | }; | 99 | }; |
100 | #endif | 100 | #endif |
101 | 101 | ||