diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-03 20:29:19 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-03 20:29:19 -0500 |
commit | 91d75e209bd59695f0708d66964d928d45b3b2f3 (patch) | |
tree | 32cab1359d951e4193bebb181a0f0319824a2b95 /arch/x86/include/asm | |
parent | 9976b39b5031bbf76f715893cf080b6a17683881 (diff) | |
parent | 8b0e5860cb099d7958d13b00ffbc35ad02735700 (diff) |
Merge branch 'x86/core' into core/percpu
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/apic.h | 26 | ||||
-rw-r--r-- | arch/x86/include/asm/boot.h | 16 | ||||
-rw-r--r-- | arch/x86/include/asm/fixmap.h | 149 | ||||
-rw-r--r-- | arch/x86/include/asm/fixmap_32.h | 115 | ||||
-rw-r--r-- | arch/x86/include/asm/fixmap_64.h | 79 | ||||
-rw-r--r-- | arch/x86/include/asm/iomap.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/numa_32.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/pat.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/processor.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/seccomp_32.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/seccomp_64.h | 8 | ||||
-rw-r--r-- | arch/x86/include/asm/setup.h | 7 | ||||
-rw-r--r-- | arch/x86/include/asm/system.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/uaccess_64.h | 26 | ||||
-rw-r--r-- | arch/x86/include/asm/uv/uv.h | 3 |
15 files changed, 209 insertions, 247 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index a6208dc74633..4ef949c1972e 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -75,7 +75,14 @@ static inline void default_inquire_remote_apic(int apicid) | |||
75 | #define setup_secondary_clock setup_secondary_APIC_clock | 75 | #define setup_secondary_clock setup_secondary_APIC_clock |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #ifdef CONFIG_X86_VSMP | ||
78 | extern int is_vsmp_box(void); | 79 | extern int is_vsmp_box(void); |
80 | #else | ||
81 | static inline int is_vsmp_box(void) | ||
82 | { | ||
83 | return 0; | ||
84 | } | ||
85 | #endif | ||
79 | extern void xapic_wait_icr_idle(void); | 86 | extern void xapic_wait_icr_idle(void); |
80 | extern u32 safe_xapic_wait_icr_idle(void); | 87 | extern u32 safe_xapic_wait_icr_idle(void); |
81 | extern void xapic_icr_write(u32, u32); | 88 | extern void xapic_icr_write(u32, u32); |
@@ -306,7 +313,7 @@ struct apic { | |||
306 | void (*send_IPI_self)(int vector); | 313 | void (*send_IPI_self)(int vector); |
307 | 314 | ||
308 | /* wakeup_secondary_cpu */ | 315 | /* wakeup_secondary_cpu */ |
309 | int (*wakeup_cpu)(int apicid, unsigned long start_eip); | 316 | int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip); |
310 | 317 | ||
311 | int trampoline_phys_low; | 318 | int trampoline_phys_low; |
312 | int trampoline_phys_high; | 319 | int trampoline_phys_high; |
@@ -324,8 +331,21 @@ struct apic { | |||
324 | u32 (*safe_wait_icr_idle)(void); | 331 | u32 (*safe_wait_icr_idle)(void); |
325 | }; | 332 | }; |
326 | 333 | ||
334 | /* | ||
335 | * Pointer to the local APIC driver in use on this system (there's | ||
336 | * always just one such driver in use - the kernel decides via an | ||
337 | * early probing process which one it picks - and then sticks to it): | ||
338 | */ | ||
327 | extern struct apic *apic; | 339 | extern struct apic *apic; |
328 | 340 | ||
341 | /* | ||
342 | * APIC functionality to boot other CPUs - only used on SMP: | ||
343 | */ | ||
344 | #ifdef CONFIG_SMP | ||
345 | extern atomic_t init_deasserted; | ||
346 | extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip); | ||
347 | #endif | ||
348 | |||
329 | static inline u32 apic_read(u32 reg) | 349 | static inline u32 apic_read(u32 reg) |
330 | { | 350 | { |
331 | return apic->read(reg); | 351 | return apic->read(reg); |
@@ -384,9 +404,7 @@ static inline unsigned default_get_apic_id(unsigned long x) | |||
384 | #define DEFAULT_TRAMPOLINE_PHYS_LOW 0x467 | 404 | #define DEFAULT_TRAMPOLINE_PHYS_LOW 0x467 |
385 | #define DEFAULT_TRAMPOLINE_PHYS_HIGH 0x469 | 405 | #define DEFAULT_TRAMPOLINE_PHYS_HIGH 0x469 |
386 | 406 | ||
387 | #ifdef CONFIG_X86_32 | 407 | #ifdef CONFIG_X86_64 |
388 | extern void es7000_update_apic_to_cluster(void); | ||
389 | #else | ||
390 | extern struct apic apic_flat; | 408 | extern struct apic apic_flat; |
391 | extern struct apic apic_physflat; | 409 | extern struct apic apic_physflat; |
392 | extern struct apic apic_x2apic_cluster; | 410 | extern struct apic apic_x2apic_cluster; |
diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h index dd61616cb73d..6526cf08b0e4 100644 --- a/arch/x86/include/asm/boot.h +++ b/arch/x86/include/asm/boot.h | |||
@@ -10,17 +10,31 @@ | |||
10 | #define EXTENDED_VGA 0xfffe /* 80x50 mode */ | 10 | #define EXTENDED_VGA 0xfffe /* 80x50 mode */ |
11 | #define ASK_VGA 0xfffd /* ask for it at bootup */ | 11 | #define ASK_VGA 0xfffd /* ask for it at bootup */ |
12 | 12 | ||
13 | #ifdef __KERNEL__ | ||
14 | |||
13 | /* Physical address where kernel should be loaded. */ | 15 | /* Physical address where kernel should be loaded. */ |
14 | #define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \ | 16 | #define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \ |
15 | + (CONFIG_PHYSICAL_ALIGN - 1)) \ | 17 | + (CONFIG_PHYSICAL_ALIGN - 1)) \ |
16 | & ~(CONFIG_PHYSICAL_ALIGN - 1)) | 18 | & ~(CONFIG_PHYSICAL_ALIGN - 1)) |
17 | 19 | ||
20 | #ifdef CONFIG_KERNEL_BZIP2 | ||
21 | #define BOOT_HEAP_SIZE 0x400000 | ||
22 | #else /* !CONFIG_KERNEL_BZIP2 */ | ||
23 | |||
18 | #ifdef CONFIG_X86_64 | 24 | #ifdef CONFIG_X86_64 |
19 | #define BOOT_HEAP_SIZE 0x7000 | 25 | #define BOOT_HEAP_SIZE 0x7000 |
20 | #define BOOT_STACK_SIZE 0x4000 | ||
21 | #else | 26 | #else |
22 | #define BOOT_HEAP_SIZE 0x4000 | 27 | #define BOOT_HEAP_SIZE 0x4000 |
28 | #endif | ||
29 | |||
30 | #endif /* !CONFIG_KERNEL_BZIP2 */ | ||
31 | |||
32 | #ifdef CONFIG_X86_64 | ||
33 | #define BOOT_STACK_SIZE 0x4000 | ||
34 | #else | ||
23 | #define BOOT_STACK_SIZE 0x1000 | 35 | #define BOOT_STACK_SIZE 0x1000 |
24 | #endif | 36 | #endif |
25 | 37 | ||
38 | #endif /* __KERNEL__ */ | ||
39 | |||
26 | #endif /* _ASM_X86_BOOT_H */ | 40 | #endif /* _ASM_X86_BOOT_H */ |
diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h index 23696d44a0af..dca8f03da5b2 100644 --- a/arch/x86/include/asm/fixmap.h +++ b/arch/x86/include/asm/fixmap.h | |||
@@ -1,11 +1,155 @@ | |||
1 | /* | ||
2 | * fixmap.h: compile-time virtual memory allocation | ||
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) 1998 Ingo Molnar | ||
9 | * | ||
10 | * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 | ||
11 | * x86_32 and x86_64 integration by Gustavo F. Padovan, February 2009 | ||
12 | */ | ||
13 | |||
1 | #ifndef _ASM_X86_FIXMAP_H | 14 | #ifndef _ASM_X86_FIXMAP_H |
2 | #define _ASM_X86_FIXMAP_H | 15 | #define _ASM_X86_FIXMAP_H |
3 | 16 | ||
17 | #ifndef __ASSEMBLY__ | ||
18 | #include <linux/kernel.h> | ||
19 | #include <asm/acpi.h> | ||
20 | #include <asm/apicdef.h> | ||
21 | #include <asm/page.h> | ||
22 | #ifdef CONFIG_X86_32 | ||
23 | #include <linux/threads.h> | ||
24 | #include <asm/kmap_types.h> | ||
25 | #else | ||
26 | #include <asm/vsyscall.h> | ||
27 | #ifdef CONFIG_EFI | ||
28 | #include <asm/efi.h> | ||
29 | #endif | ||
30 | #endif | ||
31 | |||
32 | /* | ||
33 | * We can't declare FIXADDR_TOP as variable for x86_64 because vsyscall | ||
34 | * uses fixmaps that relies on FIXADDR_TOP for proper address calculation. | ||
35 | * Because of this, FIXADDR_TOP x86 integration was left as later work. | ||
36 | */ | ||
37 | #ifdef CONFIG_X86_32 | ||
38 | /* used by vmalloc.c, vsyscall.lds.S. | ||
39 | * | ||
40 | * Leave one empty page between vmalloc'ed areas and | ||
41 | * the start of the fixmap. | ||
42 | */ | ||
43 | extern unsigned long __FIXADDR_TOP; | ||
44 | #define FIXADDR_TOP ((unsigned long)__FIXADDR_TOP) | ||
45 | |||
46 | #define FIXADDR_USER_START __fix_to_virt(FIX_VDSO) | ||
47 | #define FIXADDR_USER_END __fix_to_virt(FIX_VDSO - 1) | ||
48 | #else | ||
49 | #define FIXADDR_TOP (VSYSCALL_END-PAGE_SIZE) | ||
50 | |||
51 | /* Only covers 32bit vsyscalls currently. Need another set for 64bit. */ | ||
52 | #define FIXADDR_USER_START ((unsigned long)VSYSCALL32_VSYSCALL) | ||
53 | #define FIXADDR_USER_END (FIXADDR_USER_START + PAGE_SIZE) | ||
54 | #endif | ||
55 | |||
56 | |||
57 | /* | ||
58 | * Here we define all the compile-time 'special' virtual | ||
59 | * addresses. The point is to have a constant address at | ||
60 | * compile time, but to set the physical address only | ||
61 | * in the boot process. | ||
62 | * for x86_32: We allocate these special addresses | ||
63 | * from the end of virtual memory (0xfffff000) backwards. | ||
64 | * Also this lets us do fail-safe vmalloc(), we | ||
65 | * can guarantee that these special addresses and | ||
66 | * vmalloc()-ed addresses never overlap. | ||
67 | * | ||
68 | * These 'compile-time allocated' memory buffers are | ||
69 | * fixed-size 4k pages (or larger if used with an increment | ||
70 | * higher than 1). Use set_fixmap(idx,phys) to associate | ||
71 | * physical memory with fixmap indices. | ||
72 | * | ||
73 | * TLB entries of such buffers will not be flushed across | ||
74 | * task switches. | ||
75 | */ | ||
76 | enum fixed_addresses { | ||
4 | #ifdef CONFIG_X86_32 | 77 | #ifdef CONFIG_X86_32 |
5 | # include "fixmap_32.h" | 78 | FIX_HOLE, |
79 | FIX_VDSO, | ||
6 | #else | 80 | #else |
7 | # include "fixmap_64.h" | 81 | VSYSCALL_LAST_PAGE, |
82 | VSYSCALL_FIRST_PAGE = VSYSCALL_LAST_PAGE | ||
83 | + ((VSYSCALL_END-VSYSCALL_START) >> PAGE_SHIFT) - 1, | ||
84 | VSYSCALL_HPET, | ||
8 | #endif | 85 | #endif |
86 | FIX_DBGP_BASE, | ||
87 | FIX_EARLYCON_MEM_BASE, | ||
88 | #ifdef CONFIG_X86_LOCAL_APIC | ||
89 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ | ||
90 | #endif | ||
91 | #ifdef CONFIG_X86_IO_APIC | ||
92 | FIX_IO_APIC_BASE_0, | ||
93 | FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS - 1, | ||
94 | #endif | ||
95 | #ifdef CONFIG_X86_64 | ||
96 | #ifdef CONFIG_EFI | ||
97 | FIX_EFI_IO_MAP_LAST_PAGE, | ||
98 | FIX_EFI_IO_MAP_FIRST_PAGE = FIX_EFI_IO_MAP_LAST_PAGE | ||
99 | + MAX_EFI_IO_PAGES - 1, | ||
100 | #endif | ||
101 | #endif | ||
102 | #ifdef CONFIG_X86_VISWS_APIC | ||
103 | FIX_CO_CPU, /* Cobalt timer */ | ||
104 | FIX_CO_APIC, /* Cobalt APIC Redirection Table */ | ||
105 | FIX_LI_PCIA, /* Lithium PCI Bridge A */ | ||
106 | FIX_LI_PCIB, /* Lithium PCI Bridge B */ | ||
107 | #endif | ||
108 | #ifdef CONFIG_X86_F00F_BUG | ||
109 | FIX_F00F_IDT, /* Virtual mapping for IDT */ | ||
110 | #endif | ||
111 | #ifdef CONFIG_X86_CYCLONE_TIMER | ||
112 | FIX_CYCLONE_TIMER, /*cyclone timer register*/ | ||
113 | #endif | ||
114 | #ifdef CONFIG_X86_32 | ||
115 | FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ | ||
116 | FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, | ||
117 | #ifdef CONFIG_PCI_MMCONFIG | ||
118 | FIX_PCIE_MCFG, | ||
119 | #endif | ||
120 | #endif | ||
121 | #ifdef CONFIG_PARAVIRT | ||
122 | FIX_PARAVIRT_BOOTMAP, | ||
123 | #endif | ||
124 | __end_of_permanent_fixed_addresses, | ||
125 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT | ||
126 | FIX_OHCI1394_BASE, | ||
127 | #endif | ||
128 | /* | ||
129 | * 256 temporary boot-time mappings, used by early_ioremap(), | ||
130 | * before ioremap() is functional. | ||
131 | * | ||
132 | * We round it up to the next 256 pages boundary so that we | ||
133 | * can have a single pgd entry and a single pte table: | ||
134 | */ | ||
135 | #define NR_FIX_BTMAPS 64 | ||
136 | #define FIX_BTMAPS_SLOTS 4 | ||
137 | FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 - | ||
138 | (__end_of_permanent_fixed_addresses & 255), | ||
139 | FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1, | ||
140 | #ifdef CONFIG_X86_32 | ||
141 | FIX_WP_TEST, | ||
142 | #endif | ||
143 | __end_of_fixed_addresses | ||
144 | }; | ||
145 | |||
146 | |||
147 | extern void reserve_top_address(unsigned long reserve); | ||
148 | |||
149 | #define FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT) | ||
150 | #define FIXADDR_BOOT_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) | ||
151 | #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) | ||
152 | #define FIXADDR_BOOT_START (FIXADDR_TOP - FIXADDR_BOOT_SIZE) | ||
9 | 153 | ||
10 | extern int fixmaps_set; | 154 | extern int fixmaps_set; |
11 | 155 | ||
@@ -69,4 +213,5 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr) | |||
69 | BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); | 213 | BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); |
70 | return __virt_to_fix(vaddr); | 214 | return __virt_to_fix(vaddr); |
71 | } | 215 | } |
216 | #endif /* !__ASSEMBLY__ */ | ||
72 | #endif /* _ASM_X86_FIXMAP_H */ | 217 | #endif /* _ASM_X86_FIXMAP_H */ |
diff --git a/arch/x86/include/asm/fixmap_32.h b/arch/x86/include/asm/fixmap_32.h deleted file mode 100644 index 047d9bab2b31..000000000000 --- a/arch/x86/include/asm/fixmap_32.h +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | /* | ||
2 | * fixmap.h: compile-time virtual memory allocation | ||
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) 1998 Ingo Molnar | ||
9 | * | ||
10 | * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 | ||
11 | */ | ||
12 | |||
13 | #ifndef _ASM_X86_FIXMAP_32_H | ||
14 | #define _ASM_X86_FIXMAP_32_H | ||
15 | |||
16 | |||
17 | /* used by vmalloc.c, vsyscall.lds.S. | ||
18 | * | ||
19 | * Leave one empty page between vmalloc'ed areas and | ||
20 | * the start of the fixmap. | ||
21 | */ | ||
22 | extern unsigned long __FIXADDR_TOP; | ||
23 | #define FIXADDR_USER_START __fix_to_virt(FIX_VDSO) | ||
24 | #define FIXADDR_USER_END __fix_to_virt(FIX_VDSO - 1) | ||
25 | |||
26 | #ifndef __ASSEMBLY__ | ||
27 | #include <linux/kernel.h> | ||
28 | #include <asm/acpi.h> | ||
29 | #include <asm/apicdef.h> | ||
30 | #include <asm/page.h> | ||
31 | #include <linux/threads.h> | ||
32 | #include <asm/kmap_types.h> | ||
33 | |||
34 | /* | ||
35 | * Here we define all the compile-time 'special' virtual | ||
36 | * addresses. The point is to have a constant address at | ||
37 | * compile time, but to set the physical address only | ||
38 | * in the boot process. We allocate these special addresses | ||
39 | * from the end of virtual memory (0xfffff000) backwards. | ||
40 | * Also this lets us do fail-safe vmalloc(), we | ||
41 | * can guarantee that these special addresses and | ||
42 | * vmalloc()-ed addresses never overlap. | ||
43 | * | ||
44 | * these 'compile-time allocated' memory buffers are | ||
45 | * fixed-size 4k pages. (or larger if used with an increment | ||
46 | * highger than 1) use fixmap_set(idx,phys) to associate | ||
47 | * physical memory with fixmap indices. | ||
48 | * | ||
49 | * TLB entries of such buffers will not be flushed across | ||
50 | * task switches. | ||
51 | */ | ||
52 | enum fixed_addresses { | ||
53 | FIX_HOLE, | ||
54 | FIX_VDSO, | ||
55 | FIX_DBGP_BASE, | ||
56 | FIX_EARLYCON_MEM_BASE, | ||
57 | #ifdef CONFIG_X86_LOCAL_APIC | ||
58 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ | ||
59 | #endif | ||
60 | #ifdef CONFIG_X86_IO_APIC | ||
61 | FIX_IO_APIC_BASE_0, | ||
62 | FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS-1, | ||
63 | #endif | ||
64 | #ifdef CONFIG_X86_VISWS_APIC | ||
65 | FIX_CO_CPU, /* Cobalt timer */ | ||
66 | FIX_CO_APIC, /* Cobalt APIC Redirection Table */ | ||
67 | FIX_LI_PCIA, /* Lithium PCI Bridge A */ | ||
68 | FIX_LI_PCIB, /* Lithium PCI Bridge B */ | ||
69 | #endif | ||
70 | #ifdef CONFIG_X86_F00F_BUG | ||
71 | FIX_F00F_IDT, /* Virtual mapping for IDT */ | ||
72 | #endif | ||
73 | #ifdef CONFIG_X86_CYCLONE_TIMER | ||
74 | FIX_CYCLONE_TIMER, /*cyclone timer register*/ | ||
75 | #endif | ||
76 | FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ | ||
77 | FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, | ||
78 | #ifdef CONFIG_PCI_MMCONFIG | ||
79 | FIX_PCIE_MCFG, | ||
80 | #endif | ||
81 | #ifdef CONFIG_PARAVIRT | ||
82 | FIX_PARAVIRT_BOOTMAP, | ||
83 | #endif | ||
84 | __end_of_permanent_fixed_addresses, | ||
85 | /* | ||
86 | * 256 temporary boot-time mappings, used by early_ioremap(), | ||
87 | * before ioremap() is functional. | ||
88 | * | ||
89 | * We round it up to the next 256 pages boundary so that we | ||
90 | * can have a single pgd entry and a single pte table: | ||
91 | */ | ||
92 | #define NR_FIX_BTMAPS 64 | ||
93 | #define FIX_BTMAPS_SLOTS 4 | ||
94 | FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 - | ||
95 | (__end_of_permanent_fixed_addresses & 255), | ||
96 | FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1, | ||
97 | FIX_WP_TEST, | ||
98 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT | ||
99 | FIX_OHCI1394_BASE, | ||
100 | #endif | ||
101 | __end_of_fixed_addresses | ||
102 | }; | ||
103 | |||
104 | extern void reserve_top_address(unsigned long reserve); | ||
105 | |||
106 | |||
107 | #define FIXADDR_TOP ((unsigned long)__FIXADDR_TOP) | ||
108 | |||
109 | #define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT) | ||
110 | #define __FIXADDR_BOOT_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) | ||
111 | #define FIXADDR_START (FIXADDR_TOP - __FIXADDR_SIZE) | ||
112 | #define FIXADDR_BOOT_START (FIXADDR_TOP - __FIXADDR_BOOT_SIZE) | ||
113 | |||
114 | #endif /* !__ASSEMBLY__ */ | ||
115 | #endif /* _ASM_X86_FIXMAP_32_H */ | ||
diff --git a/arch/x86/include/asm/fixmap_64.h b/arch/x86/include/asm/fixmap_64.h deleted file mode 100644 index 298d9ba3faeb..000000000000 --- a/arch/x86/include/asm/fixmap_64.h +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * fixmap.h: compile-time virtual memory allocation | ||
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) 1998 Ingo Molnar | ||
9 | */ | ||
10 | |||
11 | #ifndef _ASM_X86_FIXMAP_64_H | ||
12 | #define _ASM_X86_FIXMAP_64_H | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <asm/acpi.h> | ||
16 | #include <asm/apicdef.h> | ||
17 | #include <asm/page.h> | ||
18 | #include <asm/vsyscall.h> | ||
19 | #include <asm/efi.h> | ||
20 | |||
21 | /* | ||
22 | * Here we define all the compile-time 'special' virtual | ||
23 | * addresses. The point is to have a constant address at | ||
24 | * compile time, but to set the physical address only | ||
25 | * in the boot process. | ||
26 | * | ||
27 | * These 'compile-time allocated' memory buffers are | ||
28 | * fixed-size 4k pages (or larger if used with an increment | ||
29 | * higher than 1). Use set_fixmap(idx,phys) to associate | ||
30 | * physical memory with fixmap indices. | ||
31 | * | ||
32 | * TLB entries of such buffers will not be flushed across | ||
33 | * task switches. | ||
34 | */ | ||
35 | |||
36 | enum fixed_addresses { | ||
37 | VSYSCALL_LAST_PAGE, | ||
38 | VSYSCALL_FIRST_PAGE = VSYSCALL_LAST_PAGE | ||
39 | + ((VSYSCALL_END-VSYSCALL_START) >> PAGE_SHIFT) - 1, | ||
40 | VSYSCALL_HPET, | ||
41 | FIX_DBGP_BASE, | ||
42 | FIX_EARLYCON_MEM_BASE, | ||
43 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ | ||
44 | FIX_IO_APIC_BASE_0, | ||
45 | FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS - 1, | ||
46 | FIX_EFI_IO_MAP_LAST_PAGE, | ||
47 | FIX_EFI_IO_MAP_FIRST_PAGE = FIX_EFI_IO_MAP_LAST_PAGE | ||
48 | + MAX_EFI_IO_PAGES - 1, | ||
49 | #ifdef CONFIG_PARAVIRT | ||
50 | FIX_PARAVIRT_BOOTMAP, | ||
51 | #endif | ||
52 | __end_of_permanent_fixed_addresses, | ||
53 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT | ||
54 | FIX_OHCI1394_BASE, | ||
55 | #endif | ||
56 | /* | ||
57 | * 256 temporary boot-time mappings, used by early_ioremap(), | ||
58 | * before ioremap() is functional. | ||
59 | * | ||
60 | * We round it up to the next 256 pages boundary so that we | ||
61 | * can have a single pgd entry and a single pte table: | ||
62 | */ | ||
63 | #define NR_FIX_BTMAPS 64 | ||
64 | #define FIX_BTMAPS_SLOTS 4 | ||
65 | FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 - | ||
66 | (__end_of_permanent_fixed_addresses & 255), | ||
67 | FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1, | ||
68 | __end_of_fixed_addresses | ||
69 | }; | ||
70 | |||
71 | #define FIXADDR_TOP (VSYSCALL_END-PAGE_SIZE) | ||
72 | #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) | ||
73 | #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) | ||
74 | |||
75 | /* Only covers 32bit vsyscalls currently. Need another set for 64bit. */ | ||
76 | #define FIXADDR_USER_START ((unsigned long)VSYSCALL32_VSYSCALL) | ||
77 | #define FIXADDR_USER_END (FIXADDR_USER_START + PAGE_SIZE) | ||
78 | |||
79 | #endif /* _ASM_X86_FIXMAP_64_H */ | ||
diff --git a/arch/x86/include/asm/iomap.h b/arch/x86/include/asm/iomap.h index c1f06289b14b..86af26091d6c 100644 --- a/arch/x86/include/asm/iomap.h +++ b/arch/x86/include/asm/iomap.h | |||
@@ -23,6 +23,9 @@ | |||
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
25 | 25 | ||
26 | int | ||
27 | is_io_mapping_possible(resource_size_t base, unsigned long size); | ||
28 | |||
26 | void * | 29 | void * |
27 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot); | 30 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot); |
28 | 31 | ||
diff --git a/arch/x86/include/asm/numa_32.h b/arch/x86/include/asm/numa_32.h index e9f5db796244..a37229011b56 100644 --- a/arch/x86/include/asm/numa_32.h +++ b/arch/x86/include/asm/numa_32.h | |||
@@ -4,8 +4,12 @@ | |||
4 | extern int pxm_to_nid(int pxm); | 4 | extern int pxm_to_nid(int pxm); |
5 | extern void numa_remove_cpu(int cpu); | 5 | extern void numa_remove_cpu(int cpu); |
6 | 6 | ||
7 | #ifdef CONFIG_NUMA | 7 | #ifdef CONFIG_HIGHMEM |
8 | extern void set_highmem_pages_init(void); | 8 | extern void set_highmem_pages_init(void); |
9 | #else | ||
10 | static inline void set_highmem_pages_init(void) | ||
11 | { | ||
12 | } | ||
9 | #endif | 13 | #endif |
10 | 14 | ||
11 | #endif /* _ASM_X86_NUMA_32_H */ | 15 | #endif /* _ASM_X86_NUMA_32_H */ |
diff --git a/arch/x86/include/asm/pat.h b/arch/x86/include/asm/pat.h index 9709fdff6615..b0e70056838e 100644 --- a/arch/x86/include/asm/pat.h +++ b/arch/x86/include/asm/pat.h | |||
@@ -15,4 +15,7 @@ extern int reserve_memtype(u64 start, u64 end, | |||
15 | unsigned long req_type, unsigned long *ret_type); | 15 | unsigned long req_type, unsigned long *ret_type); |
16 | extern int free_memtype(u64 start, u64 end); | 16 | extern int free_memtype(u64 start, u64 end); |
17 | 17 | ||
18 | extern int kernel_map_sync_memtype(u64 base, unsigned long size, | ||
19 | unsigned long flag); | ||
20 | |||
18 | #endif /* _ASM_X86_PAT_H */ | 21 | #endif /* _ASM_X86_PAT_H */ |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index c7a98f738210..76139506c3e4 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -248,7 +248,6 @@ struct x86_hw_tss { | |||
248 | #define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long)) | 248 | #define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long)) |
249 | #define IO_BITMAP_OFFSET offsetof(struct tss_struct, io_bitmap) | 249 | #define IO_BITMAP_OFFSET offsetof(struct tss_struct, io_bitmap) |
250 | #define INVALID_IO_BITMAP_OFFSET 0x8000 | 250 | #define INVALID_IO_BITMAP_OFFSET 0x8000 |
251 | #define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000 | ||
252 | 251 | ||
253 | struct tss_struct { | 252 | struct tss_struct { |
254 | /* | 253 | /* |
@@ -263,11 +262,6 @@ struct tss_struct { | |||
263 | * be within the limit. | 262 | * be within the limit. |
264 | */ | 263 | */ |
265 | unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; | 264 | unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; |
266 | /* | ||
267 | * Cache the current maximum and the last task that used the bitmap: | ||
268 | */ | ||
269 | unsigned long io_bitmap_max; | ||
270 | struct thread_struct *io_bitmap_owner; | ||
271 | 265 | ||
272 | /* | 266 | /* |
273 | * .. and then another 0x100 bytes for the emergency kernel stack: | 267 | * .. and then another 0x100 bytes for the emergency kernel stack: |
diff --git a/arch/x86/include/asm/seccomp_32.h b/arch/x86/include/asm/seccomp_32.h index a6ad87b352c4..b811d6f5780c 100644 --- a/arch/x86/include/asm/seccomp_32.h +++ b/arch/x86/include/asm/seccomp_32.h | |||
@@ -1,12 +1,6 @@ | |||
1 | #ifndef _ASM_X86_SECCOMP_32_H | 1 | #ifndef _ASM_X86_SECCOMP_32_H |
2 | #define _ASM_X86_SECCOMP_32_H | 2 | #define _ASM_X86_SECCOMP_32_H |
3 | 3 | ||
4 | #include <linux/thread_info.h> | ||
5 | |||
6 | #ifdef TIF_32BIT | ||
7 | #error "unexpected TIF_32BIT on i386" | ||
8 | #endif | ||
9 | |||
10 | #include <linux/unistd.h> | 4 | #include <linux/unistd.h> |
11 | 5 | ||
12 | #define __NR_seccomp_read __NR_read | 6 | #define __NR_seccomp_read __NR_read |
diff --git a/arch/x86/include/asm/seccomp_64.h b/arch/x86/include/asm/seccomp_64.h index 4171bb794e9e..84ec1bd161a5 100644 --- a/arch/x86/include/asm/seccomp_64.h +++ b/arch/x86/include/asm/seccomp_64.h | |||
@@ -1,14 +1,6 @@ | |||
1 | #ifndef _ASM_X86_SECCOMP_64_H | 1 | #ifndef _ASM_X86_SECCOMP_64_H |
2 | #define _ASM_X86_SECCOMP_64_H | 2 | #define _ASM_X86_SECCOMP_64_H |
3 | 3 | ||
4 | #include <linux/thread_info.h> | ||
5 | |||
6 | #ifdef TIF_32BIT | ||
7 | #error "unexpected TIF_32BIT on x86_64" | ||
8 | #else | ||
9 | #define TIF_32BIT TIF_IA32 | ||
10 | #endif | ||
11 | |||
12 | #include <linux/unistd.h> | 4 | #include <linux/unistd.h> |
13 | #include <asm/ia32_unistd.h> | 5 | #include <asm/ia32_unistd.h> |
14 | 6 | ||
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h index 66801cb72f69..05c6f6b11fd5 100644 --- a/arch/x86/include/asm/setup.h +++ b/arch/x86/include/asm/setup.h | |||
@@ -31,7 +31,6 @@ struct x86_quirks { | |||
31 | void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable, | 31 | void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable, |
32 | unsigned short oemsize); | 32 | unsigned short oemsize); |
33 | int (*setup_ioapic_ids)(void); | 33 | int (*setup_ioapic_ids)(void); |
34 | int (*update_apic)(void); | ||
35 | }; | 34 | }; |
36 | 35 | ||
37 | extern void x86_quirk_pre_intr_init(void); | 36 | extern void x86_quirk_pre_intr_init(void); |
@@ -65,7 +64,11 @@ extern void x86_quirk_time_init(void); | |||
65 | #include <asm/bootparam.h> | 64 | #include <asm/bootparam.h> |
66 | 65 | ||
67 | /* Interrupt control for vSMPowered x86_64 systems */ | 66 | /* Interrupt control for vSMPowered x86_64 systems */ |
67 | #ifdef CONFIG_X86_VSMP | ||
68 | void vsmp_init(void); | 68 | void vsmp_init(void); |
69 | #else | ||
70 | static inline void vsmp_init(void) { } | ||
71 | #endif | ||
69 | 72 | ||
70 | void setup_bios_corruption_check(void); | 73 | void setup_bios_corruption_check(void); |
71 | 74 | ||
@@ -77,8 +80,6 @@ static inline void visws_early_detect(void) { } | |||
77 | static inline int is_visws_box(void) { return 0; } | 80 | static inline int is_visws_box(void) { return 0; } |
78 | #endif | 81 | #endif |
79 | 82 | ||
80 | extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip); | ||
81 | extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip); | ||
82 | extern struct x86_quirks *x86_quirks; | 83 | extern struct x86_quirks *x86_quirks; |
83 | extern unsigned long saved_video_mode; | 84 | extern unsigned long saved_video_mode; |
84 | 85 | ||
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h index c00bfdbdd456..643c59b4bc6e 100644 --- a/arch/x86/include/asm/system.h +++ b/arch/x86/include/asm/system.h | |||
@@ -20,6 +20,9 @@ | |||
20 | struct task_struct; /* one of the stranger aspects of C forward declarations */ | 20 | struct task_struct; /* one of the stranger aspects of C forward declarations */ |
21 | struct task_struct *__switch_to(struct task_struct *prev, | 21 | struct task_struct *__switch_to(struct task_struct *prev, |
22 | struct task_struct *next); | 22 | struct task_struct *next); |
23 | struct tss_struct; | ||
24 | void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p, | ||
25 | struct tss_struct *tss); | ||
23 | 26 | ||
24 | #ifdef CONFIG_X86_32 | 27 | #ifdef CONFIG_X86_32 |
25 | 28 | ||
diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h index 987a2c10fe20..8cc687326eb8 100644 --- a/arch/x86/include/asm/uaccess_64.h +++ b/arch/x86/include/asm/uaccess_64.h | |||
@@ -188,30 +188,18 @@ __copy_to_user_inatomic(void __user *dst, const void *src, unsigned size) | |||
188 | extern long __copy_user_nocache(void *dst, const void __user *src, | 188 | extern long __copy_user_nocache(void *dst, const void __user *src, |
189 | unsigned size, int zerorest); | 189 | unsigned size, int zerorest); |
190 | 190 | ||
191 | static inline int __copy_from_user_nocache(void *dst, const void __user *src, | 191 | static inline int |
192 | unsigned size) | 192 | __copy_from_user_nocache(void *dst, const void __user *src, unsigned size) |
193 | { | 193 | { |
194 | might_sleep(); | 194 | might_sleep(); |
195 | /* | 195 | return __copy_user_nocache(dst, src, size, 1); |
196 | * In practice this limit means that large file write()s | ||
197 | * which get chunked to 4K copies get handled via | ||
198 | * non-temporal stores here. Smaller writes get handled | ||
199 | * via regular __copy_from_user(): | ||
200 | */ | ||
201 | if (likely(size >= PAGE_SIZE)) | ||
202 | return __copy_user_nocache(dst, src, size, 1); | ||
203 | else | ||
204 | return __copy_from_user(dst, src, size); | ||
205 | } | 196 | } |
206 | 197 | ||
207 | static inline int __copy_from_user_inatomic_nocache(void *dst, | 198 | static inline int |
208 | const void __user *src, | 199 | __copy_from_user_inatomic_nocache(void *dst, const void __user *src, |
209 | unsigned size) | 200 | unsigned size) |
210 | { | 201 | { |
211 | if (likely(size >= PAGE_SIZE)) | 202 | return __copy_user_nocache(dst, src, size, 0); |
212 | return __copy_user_nocache(dst, src, size, 0); | ||
213 | else | ||
214 | return __copy_from_user_inatomic(dst, src, size); | ||
215 | } | 203 | } |
216 | 204 | ||
217 | unsigned long | 205 | unsigned long |
diff --git a/arch/x86/include/asm/uv/uv.h b/arch/x86/include/asm/uv/uv.h index 8242bf965812..c0a01b5d985b 100644 --- a/arch/x86/include/asm/uv/uv.h +++ b/arch/x86/include/asm/uv/uv.h | |||
@@ -12,7 +12,6 @@ extern enum uv_system_type get_uv_system_type(void); | |||
12 | extern int is_uv_system(void); | 12 | extern int is_uv_system(void); |
13 | extern void uv_cpu_init(void); | 13 | extern void uv_cpu_init(void); |
14 | extern void uv_system_init(void); | 14 | extern void uv_system_init(void); |
15 | extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip); | ||
16 | extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, | 15 | extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, |
17 | struct mm_struct *mm, | 16 | struct mm_struct *mm, |
18 | unsigned long va, | 17 | unsigned long va, |
@@ -24,8 +23,6 @@ static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; } | |||
24 | static inline int is_uv_system(void) { return 0; } | 23 | static inline int is_uv_system(void) { return 0; } |
25 | static inline void uv_cpu_init(void) { } | 24 | static inline void uv_cpu_init(void) { } |
26 | static inline void uv_system_init(void) { } | 25 | static inline void uv_system_init(void) { } |
27 | static inline int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip) | ||
28 | { return 1; } | ||
29 | static inline const struct cpumask * | 26 | static inline const struct cpumask * |
30 | uv_flush_tlb_others(const struct cpumask *cpumask, struct mm_struct *mm, | 27 | uv_flush_tlb_others(const struct cpumask *cpumask, struct mm_struct *mm, |
31 | unsigned long va, unsigned int cpu) | 28 | unsigned long va, unsigned int cpu) |