diff options
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/alternative.h | 2 | ||||
-rw-r--r-- | include/asm-i386/apic.h | 2 | ||||
-rw-r--r-- | include/asm-i386/apicdef.h | 1 | ||||
-rw-r--r-- | include/asm-i386/cpufeature.h | 12 | ||||
-rw-r--r-- | include/asm-i386/mce.h | 5 | ||||
-rw-r--r-- | include/asm-i386/msi.h | 10 | ||||
-rw-r--r-- | include/asm-i386/mtrr.h | 4 | ||||
-rw-r--r-- | include/asm-i386/processor.h | 14 | ||||
-rw-r--r-- | include/asm-i386/uaccess.h | 35 | ||||
-rw-r--r-- | include/asm-i386/unistd.h | 3 | ||||
-rw-r--r-- | include/asm-i386/vga.h | 2 |
11 files changed, 69 insertions, 21 deletions
diff --git a/include/asm-i386/alternative.h b/include/asm-i386/alternative.h index e201decea0c9..d79e9ee10fd7 100644 --- a/include/asm-i386/alternative.h +++ b/include/asm-i386/alternative.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <asm/types.h> | ||
7 | |||
6 | struct alt_instr { | 8 | struct alt_instr { |
7 | u8 *instr; /* original instruction */ | 9 | u8 *instr; /* original instruction */ |
8 | u8 *replacement; | 10 | u8 *replacement; |
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index cc9b940fb7e8..1d8362cb2c5d 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -138,8 +138,6 @@ void switch_ipi_to_APIC_timer(void *cpumask); | |||
138 | 138 | ||
139 | extern int timer_over_8254; | 139 | extern int timer_over_8254; |
140 | 140 | ||
141 | extern int modern_apic(void); | ||
142 | |||
143 | #else /* !CONFIG_X86_LOCAL_APIC */ | 141 | #else /* !CONFIG_X86_LOCAL_APIC */ |
144 | static inline void lapic_shutdown(void) { } | 142 | static inline void lapic_shutdown(void) { } |
145 | 143 | ||
diff --git a/include/asm-i386/apicdef.h b/include/asm-i386/apicdef.h index 5e4a35af2921..9f6995341fdc 100644 --- a/include/asm-i386/apicdef.h +++ b/include/asm-i386/apicdef.h | |||
@@ -121,7 +121,6 @@ | |||
121 | */ | 121 | */ |
122 | #define u32 unsigned int | 122 | #define u32 unsigned int |
123 | 123 | ||
124 | #define lapic ((volatile struct local_apic *)APIC_BASE) | ||
125 | 124 | ||
126 | struct local_apic { | 125 | struct local_apic { |
127 | 126 | ||
diff --git a/include/asm-i386/cpufeature.h b/include/asm-i386/cpufeature.h index b44bfc6239cb..3ecedbafa8ce 100644 --- a/include/asm-i386/cpufeature.h +++ b/include/asm-i386/cpufeature.h | |||
@@ -88,6 +88,12 @@ | |||
88 | #define X86_FEATURE_XSTORE_EN (5*32+ 3) /* on-CPU RNG enabled */ | 88 | #define X86_FEATURE_XSTORE_EN (5*32+ 3) /* on-CPU RNG enabled */ |
89 | #define X86_FEATURE_XCRYPT (5*32+ 6) /* on-CPU crypto (xcrypt insn) */ | 89 | #define X86_FEATURE_XCRYPT (5*32+ 6) /* on-CPU crypto (xcrypt insn) */ |
90 | #define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */ | 90 | #define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */ |
91 | #define X86_FEATURE_ACE2 (5*32+ 8) /* Advanced Cryptography Engine v2 */ | ||
92 | #define X86_FEATURE_ACE2_EN (5*32+ 9) /* ACE v2 enabled */ | ||
93 | #define X86_FEATURE_PHE (5*32+ 10) /* PadLock Hash Engine */ | ||
94 | #define X86_FEATURE_PHE_EN (5*32+ 11) /* PHE enabled */ | ||
95 | #define X86_FEATURE_PMM (5*32+ 12) /* PadLock Montgomery Multiplier */ | ||
96 | #define X86_FEATURE_PMM_EN (5*32+ 13) /* PMM enabled */ | ||
91 | 97 | ||
92 | /* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */ | 98 | /* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */ |
93 | #define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */ | 99 | #define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */ |
@@ -121,6 +127,12 @@ | |||
121 | #define cpu_has_xstore_enabled boot_cpu_has(X86_FEATURE_XSTORE_EN) | 127 | #define cpu_has_xstore_enabled boot_cpu_has(X86_FEATURE_XSTORE_EN) |
122 | #define cpu_has_xcrypt boot_cpu_has(X86_FEATURE_XCRYPT) | 128 | #define cpu_has_xcrypt boot_cpu_has(X86_FEATURE_XCRYPT) |
123 | #define cpu_has_xcrypt_enabled boot_cpu_has(X86_FEATURE_XCRYPT_EN) | 129 | #define cpu_has_xcrypt_enabled boot_cpu_has(X86_FEATURE_XCRYPT_EN) |
130 | #define cpu_has_ace2 boot_cpu_has(X86_FEATURE_ACE2) | ||
131 | #define cpu_has_ace2_enabled boot_cpu_has(X86_FEATURE_ACE2_EN) | ||
132 | #define cpu_has_phe boot_cpu_has(X86_FEATURE_PHE) | ||
133 | #define cpu_has_phe_enabled boot_cpu_has(X86_FEATURE_PHE_EN) | ||
134 | #define cpu_has_pmm boot_cpu_has(X86_FEATURE_PMM) | ||
135 | #define cpu_has_pmm_enabled boot_cpu_has(X86_FEATURE_PMM_EN) | ||
124 | 136 | ||
125 | #endif /* __ASM_I386_CPUFEATURE_H */ | 137 | #endif /* __ASM_I386_CPUFEATURE_H */ |
126 | 138 | ||
diff --git a/include/asm-i386/mce.h b/include/asm-i386/mce.h new file mode 100644 index 000000000000..7cc1a973bf00 --- /dev/null +++ b/include/asm-i386/mce.h | |||
@@ -0,0 +1,5 @@ | |||
1 | #ifdef CONFIG_X86_MCE | ||
2 | extern void mcheck_init(struct cpuinfo_x86 *c); | ||
3 | #else | ||
4 | #define mcheck_init(c) do {} while(0) | ||
5 | #endif | ||
diff --git a/include/asm-i386/msi.h b/include/asm-i386/msi.h index f041d4495faf..b11c4b7dfaef 100644 --- a/include/asm-i386/msi.h +++ b/include/asm-i386/msi.h | |||
@@ -9,7 +9,15 @@ | |||
9 | #include <asm/desc.h> | 9 | #include <asm/desc.h> |
10 | #include <mach_apic.h> | 10 | #include <mach_apic.h> |
11 | 11 | ||
12 | #define LAST_DEVICE_VECTOR 232 | 12 | #define LAST_DEVICE_VECTOR (FIRST_SYSTEM_VECTOR - 1) |
13 | #define MSI_TARGET_CPU_SHIFT 12 | 13 | #define MSI_TARGET_CPU_SHIFT 12 |
14 | 14 | ||
15 | extern struct msi_ops msi_apic_ops; | ||
16 | |||
17 | static inline int msi_arch_init(void) | ||
18 | { | ||
19 | msi_register(&msi_apic_ops); | ||
20 | return 0; | ||
21 | } | ||
22 | |||
15 | #endif /* ASM_MSI_H */ | 23 | #endif /* ASM_MSI_H */ |
diff --git a/include/asm-i386/mtrr.h b/include/asm-i386/mtrr.h index 5a46de08efea..07f063ae26ea 100644 --- a/include/asm-i386/mtrr.h +++ b/include/asm-i386/mtrr.h | |||
@@ -76,6 +76,8 @@ extern int mtrr_add_page (unsigned long base, unsigned long size, | |||
76 | extern int mtrr_del (int reg, unsigned long base, unsigned long size); | 76 | extern int mtrr_del (int reg, unsigned long base, unsigned long size); |
77 | extern int mtrr_del_page (int reg, unsigned long base, unsigned long size); | 77 | extern int mtrr_del_page (int reg, unsigned long base, unsigned long size); |
78 | extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi); | 78 | extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi); |
79 | extern void mtrr_ap_init(void); | ||
80 | extern void mtrr_bp_init(void); | ||
79 | # else | 81 | # else |
80 | static __inline__ int mtrr_add (unsigned long base, unsigned long size, | 82 | static __inline__ int mtrr_add (unsigned long base, unsigned long size, |
81 | unsigned int type, char increment) | 83 | unsigned int type, char increment) |
@@ -100,6 +102,8 @@ static __inline__ int mtrr_del_page (int reg, unsigned long base, | |||
100 | 102 | ||
101 | static __inline__ void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi) {;} | 103 | static __inline__ void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi) {;} |
102 | 104 | ||
105 | #define mtrr_ap_init() do {} while (0) | ||
106 | #define mtrr_bp_init() do {} while (0) | ||
103 | # endif | 107 | # endif |
104 | 108 | ||
105 | #endif | 109 | #endif |
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 4df3818e4122..0c83cf12eec9 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -728,18 +728,4 @@ extern unsigned long boot_option_idle_override; | |||
728 | extern void enable_sep_cpu(void); | 728 | extern void enable_sep_cpu(void); |
729 | extern int sysenter_setup(void); | 729 | extern int sysenter_setup(void); |
730 | 730 | ||
731 | #ifdef CONFIG_MTRR | ||
732 | extern void mtrr_ap_init(void); | ||
733 | extern void mtrr_bp_init(void); | ||
734 | #else | ||
735 | #define mtrr_ap_init() do {} while (0) | ||
736 | #define mtrr_bp_init() do {} while (0) | ||
737 | #endif | ||
738 | |||
739 | #ifdef CONFIG_X86_MCE | ||
740 | extern void mcheck_init(struct cpuinfo_x86 *c); | ||
741 | #else | ||
742 | #define mcheck_init(c) do {} while(0) | ||
743 | #endif | ||
744 | |||
745 | #endif /* __ASM_I386_PROCESSOR_H */ | 731 | #endif /* __ASM_I386_PROCESSOR_H */ |
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index 1ec65523ea5e..8462f8e0e658 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h | |||
@@ -58,7 +58,7 @@ extern struct movsl_mask { | |||
58 | __chk_user_ptr(addr); \ | 58 | __chk_user_ptr(addr); \ |
59 | asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ | 59 | asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ |
60 | :"=&r" (flag), "=r" (sum) \ | 60 | :"=&r" (flag), "=r" (sum) \ |
61 | :"1" (addr),"g" ((int)(size)),"g" (current_thread_info()->addr_limit.seg)); \ | 61 | :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \ |
62 | flag; }) | 62 | flag; }) |
63 | 63 | ||
64 | /** | 64 | /** |
@@ -390,6 +390,8 @@ unsigned long __must_check __copy_to_user_ll(void __user *to, | |||
390 | const void *from, unsigned long n); | 390 | const void *from, unsigned long n); |
391 | unsigned long __must_check __copy_from_user_ll(void *to, | 391 | unsigned long __must_check __copy_from_user_ll(void *to, |
392 | const void __user *from, unsigned long n); | 392 | const void __user *from, unsigned long n); |
393 | unsigned long __must_check __copy_from_user_ll_nocache(void *to, | ||
394 | const void __user *from, unsigned long n); | ||
393 | 395 | ||
394 | /* | 396 | /* |
395 | * Here we special-case 1, 2 and 4-byte copy_*_user invocations. On a fault | 397 | * Here we special-case 1, 2 and 4-byte copy_*_user invocations. On a fault |
@@ -478,12 +480,43 @@ __copy_from_user_inatomic(void *to, const void __user *from, unsigned long n) | |||
478 | return __copy_from_user_ll(to, from, n); | 480 | return __copy_from_user_ll(to, from, n); |
479 | } | 481 | } |
480 | 482 | ||
483 | #define ARCH_HAS_NOCACHE_UACCESS | ||
484 | |||
485 | static __always_inline unsigned long __copy_from_user_inatomic_nocache(void *to, | ||
486 | const void __user *from, unsigned long n) | ||
487 | { | ||
488 | if (__builtin_constant_p(n)) { | ||
489 | unsigned long ret; | ||
490 | |||
491 | switch (n) { | ||
492 | case 1: | ||
493 | __get_user_size(*(u8 *)to, from, 1, ret, 1); | ||
494 | return ret; | ||
495 | case 2: | ||
496 | __get_user_size(*(u16 *)to, from, 2, ret, 2); | ||
497 | return ret; | ||
498 | case 4: | ||
499 | __get_user_size(*(u32 *)to, from, 4, ret, 4); | ||
500 | return ret; | ||
501 | } | ||
502 | } | ||
503 | return __copy_from_user_ll_nocache(to, from, n); | ||
504 | } | ||
505 | |||
481 | static __always_inline unsigned long | 506 | static __always_inline unsigned long |
482 | __copy_from_user(void *to, const void __user *from, unsigned long n) | 507 | __copy_from_user(void *to, const void __user *from, unsigned long n) |
483 | { | 508 | { |
484 | might_sleep(); | 509 | might_sleep(); |
485 | return __copy_from_user_inatomic(to, from, n); | 510 | return __copy_from_user_inatomic(to, from, n); |
486 | } | 511 | } |
512 | |||
513 | static __always_inline unsigned long | ||
514 | __copy_from_user_nocache(void *to, const void __user *from, unsigned long n) | ||
515 | { | ||
516 | might_sleep(); | ||
517 | return __copy_from_user_inatomic_nocache(to, from, n); | ||
518 | } | ||
519 | |||
487 | unsigned long __must_check copy_to_user(void __user *to, | 520 | unsigned long __must_check copy_to_user(void __user *to, |
488 | const void *from, unsigned long n); | 521 | const void *from, unsigned long n); |
489 | unsigned long __must_check copy_from_user(void *to, | 522 | unsigned long __must_check copy_from_user(void *to, |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index de2ccc149e34..fc1c8ddae149 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -322,10 +322,11 @@ | |||
322 | #define __NR_sync_file_range 314 | 322 | #define __NR_sync_file_range 314 |
323 | #define __NR_tee 315 | 323 | #define __NR_tee 315 |
324 | #define __NR_vmsplice 316 | 324 | #define __NR_vmsplice 316 |
325 | #define __NR_move_pages 317 | ||
325 | 326 | ||
326 | #ifdef __KERNEL__ | 327 | #ifdef __KERNEL__ |
327 | 328 | ||
328 | #define NR_syscalls 317 | 329 | #define NR_syscalls 318 |
329 | 330 | ||
330 | /* | 331 | /* |
331 | * user-visible error numbers are in the range -1 - -128: see | 332 | * user-visible error numbers are in the range -1 - -128: see |
diff --git a/include/asm-i386/vga.h b/include/asm-i386/vga.h index ef0c0e50cc95..0ecf68ac03aa 100644 --- a/include/asm-i386/vga.h +++ b/include/asm-i386/vga.h | |||
@@ -12,7 +12,7 @@ | |||
12 | * access the videoram directly without any black magic. | 12 | * access the videoram directly without any black magic. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #define VGA_MAP_MEM(x) (unsigned long)phys_to_virt(x) | 15 | #define VGA_MAP_MEM(x,s) (unsigned long)phys_to_virt(x) |
16 | 16 | ||
17 | #define vga_readb(x) (*(x)) | 17 | #define vga_readb(x) (*(x)) |
18 | #define vga_writeb(x,y) (*(y) = (x)) | 18 | #define vga_writeb(x,y) (*(y) = (x)) |