diff options
-rw-r--r-- | arch/x86/include/asm/efi.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/fixmap_64.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/i387.h | 8 | ||||
-rw-r--r-- | arch/x86/kernel/ds.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/efi.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/efi_64.c | 21 | ||||
-rw-r--r-- | arch/x86/kernel/i387.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/reboot.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 5 | ||||
-rw-r--r-- | arch/x86/math-emu/fpu_aux.c | 31 |
10 files changed, 49 insertions, 42 deletions
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index ca5ffb2856b6..edc90f23e708 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h | |||
@@ -37,8 +37,6 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...); | |||
37 | 37 | ||
38 | #else /* !CONFIG_X86_32 */ | 38 | #else /* !CONFIG_X86_32 */ |
39 | 39 | ||
40 | #define MAX_EFI_IO_PAGES 100 | ||
41 | |||
42 | extern u64 efi_call0(void *fp); | 40 | extern u64 efi_call0(void *fp); |
43 | extern u64 efi_call1(void *fp, u64 arg1); | 41 | extern u64 efi_call1(void *fp, u64 arg1); |
44 | extern u64 efi_call2(void *fp, u64 arg1, u64 arg2); | 42 | extern u64 efi_call2(void *fp, u64 arg1, u64 arg2); |
diff --git a/arch/x86/include/asm/fixmap_64.h b/arch/x86/include/asm/fixmap_64.h index 00a30ab9b1a5..8be740977db8 100644 --- a/arch/x86/include/asm/fixmap_64.h +++ b/arch/x86/include/asm/fixmap_64.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <asm/apicdef.h> | 16 | #include <asm/apicdef.h> |
17 | #include <asm/page.h> | 17 | #include <asm/page.h> |
18 | #include <asm/vsyscall.h> | 18 | #include <asm/vsyscall.h> |
19 | #include <asm/efi.h> | ||
20 | 19 | ||
21 | /* | 20 | /* |
22 | * Here we define all the compile-time 'special' virtual | 21 | * Here we define all the compile-time 'special' virtual |
@@ -43,9 +42,6 @@ enum fixed_addresses { | |||
43 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ | 42 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ |
44 | FIX_IO_APIC_BASE_0, | 43 | FIX_IO_APIC_BASE_0, |
45 | FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS - 1, | 44 | 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 | 45 | #ifdef CONFIG_PARAVIRT |
50 | FIX_PARAVIRT_BOOTMAP, | 46 | FIX_PARAVIRT_BOOTMAP, |
51 | #endif | 47 | #endif |
diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h index 48f0004db8c9..71c9e5183982 100644 --- a/arch/x86/include/asm/i387.h +++ b/arch/x86/include/asm/i387.h | |||
@@ -172,7 +172,13 @@ static inline void __save_init_fpu(struct task_struct *tsk) | |||
172 | 172 | ||
173 | #else /* CONFIG_X86_32 */ | 173 | #else /* CONFIG_X86_32 */ |
174 | 174 | ||
175 | extern void finit(void); | 175 | #ifdef CONFIG_MATH_EMULATION |
176 | extern void finit_task(struct task_struct *tsk); | ||
177 | #else | ||
178 | static inline void finit_task(struct task_struct *tsk) | ||
179 | { | ||
180 | } | ||
181 | #endif | ||
176 | 182 | ||
177 | static inline void tolerant_fwait(void) | 183 | static inline void tolerant_fwait(void) |
178 | { | 184 | { |
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c index 169a120587be..87b67e3a765a 100644 --- a/arch/x86/kernel/ds.c +++ b/arch/x86/kernel/ds.c | |||
@@ -729,7 +729,7 @@ struct pebs_tracer *ds_request_pebs(struct task_struct *task, | |||
729 | 729 | ||
730 | spin_unlock_irqrestore(&ds_lock, irq); | 730 | spin_unlock_irqrestore(&ds_lock, irq); |
731 | 731 | ||
732 | ds_write_config(tracer->ds.context, &tracer->trace.ds, ds_bts); | 732 | ds_write_config(tracer->ds.context, &tracer->trace.ds, ds_pebs); |
733 | ds_resume_pebs(tracer); | 733 | ds_resume_pebs(tracer); |
734 | 734 | ||
735 | return tracer; | 735 | return tracer; |
@@ -1029,5 +1029,4 @@ void ds_copy_thread(struct task_struct *tsk, struct task_struct *father) | |||
1029 | 1029 | ||
1030 | void ds_exit_thread(struct task_struct *tsk) | 1030 | void ds_exit_thread(struct task_struct *tsk) |
1031 | { | 1031 | { |
1032 | WARN_ON(tsk->thread.ds_ctx); | ||
1033 | } | 1032 | } |
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c index 1119d247fe11..eb1ef3b67dd5 100644 --- a/arch/x86/kernel/efi.c +++ b/arch/x86/kernel/efi.c | |||
@@ -467,7 +467,7 @@ void __init efi_enter_virtual_mode(void) | |||
467 | efi_memory_desc_t *md; | 467 | efi_memory_desc_t *md; |
468 | efi_status_t status; | 468 | efi_status_t status; |
469 | unsigned long size; | 469 | unsigned long size; |
470 | u64 end, systab, addr, npages; | 470 | u64 end, systab, addr, npages, end_pfn; |
471 | void *p, *va; | 471 | void *p, *va; |
472 | 472 | ||
473 | efi.systab = NULL; | 473 | efi.systab = NULL; |
@@ -479,7 +479,10 @@ void __init efi_enter_virtual_mode(void) | |||
479 | size = md->num_pages << EFI_PAGE_SHIFT; | 479 | size = md->num_pages << EFI_PAGE_SHIFT; |
480 | end = md->phys_addr + size; | 480 | end = md->phys_addr + size; |
481 | 481 | ||
482 | if (PFN_UP(end) <= max_low_pfn_mapped) | 482 | end_pfn = PFN_UP(end); |
483 | if (end_pfn <= max_low_pfn_mapped | ||
484 | || (end_pfn > (1UL << (32 - PAGE_SHIFT)) | ||
485 | && end_pfn <= max_pfn_mapped)) | ||
483 | va = __va(md->phys_addr); | 486 | va = __va(md->phys_addr); |
484 | else | 487 | else |
485 | va = efi_ioremap(md->phys_addr, size); | 488 | va = efi_ioremap(md->phys_addr, size); |
diff --git a/arch/x86/kernel/efi_64.c b/arch/x86/kernel/efi_64.c index 652c5287215f..cb783b92c50c 100644 --- a/arch/x86/kernel/efi_64.c +++ b/arch/x86/kernel/efi_64.c | |||
@@ -99,24 +99,11 @@ void __init efi_call_phys_epilog(void) | |||
99 | 99 | ||
100 | void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size) | 100 | void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size) |
101 | { | 101 | { |
102 | static unsigned pages_mapped __initdata; | 102 | unsigned long last_map_pfn; |
103 | unsigned i, pages; | ||
104 | unsigned long offset; | ||
105 | 103 | ||
106 | pages = PFN_UP(phys_addr + size) - PFN_DOWN(phys_addr); | 104 | last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size); |
107 | offset = phys_addr & ~PAGE_MASK; | 105 | if ((last_map_pfn << PAGE_SHIFT) < phys_addr + size) |
108 | phys_addr &= PAGE_MASK; | ||
109 | |||
110 | if (pages_mapped + pages > MAX_EFI_IO_PAGES) | ||
111 | return NULL; | 106 | return NULL; |
112 | 107 | ||
113 | for (i = 0; i < pages; i++) { | 108 | return (void __iomem *)__va(phys_addr); |
114 | __set_fixmap(FIX_EFI_IO_MAP_FIRST_PAGE - pages_mapped, | ||
115 | phys_addr, PAGE_KERNEL); | ||
116 | phys_addr += PAGE_SIZE; | ||
117 | pages_mapped++; | ||
118 | } | ||
119 | |||
120 | return (void __iomem *)__fix_to_virt(FIX_EFI_IO_MAP_FIRST_PAGE - \ | ||
121 | (pages_mapped - pages)) + offset; | ||
122 | } | 109 | } |
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index b0f61f0dcd0a..f2f8540a7f3d 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c | |||
@@ -136,7 +136,7 @@ int init_fpu(struct task_struct *tsk) | |||
136 | #ifdef CONFIG_X86_32 | 136 | #ifdef CONFIG_X86_32 |
137 | if (!HAVE_HWFP) { | 137 | if (!HAVE_HWFP) { |
138 | memset(tsk->thread.xstate, 0, xstate_size); | 138 | memset(tsk->thread.xstate, 0, xstate_size); |
139 | finit(); | 139 | finit_task(tsk); |
140 | set_stopped_child_used_math(tsk); | 140 | set_stopped_child_used_math(tsk); |
141 | return 0; | 141 | return 0; |
142 | } | 142 | } |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 2b46eb41643b..4526b3a75ed2 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -217,6 +217,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
217 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq"), | 217 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq"), |
218 | }, | 218 | }, |
219 | }, | 219 | }, |
220 | { /* Handle problems with rebooting on Dell XPS710 */ | ||
221 | .callback = set_bios_reboot, | ||
222 | .ident = "Dell XPS710", | ||
223 | .matches = { | ||
224 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
225 | DMI_MATCH(DMI_PRODUCT_NAME, "Dell XPS710"), | ||
226 | }, | ||
227 | }, | ||
220 | { } | 228 | { } |
221 | }; | 229 | }; |
222 | 230 | ||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index c461f6d69074..6a8811a69324 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -770,6 +770,9 @@ void __init setup_arch(char **cmdline_p) | |||
770 | 770 | ||
771 | finish_e820_parsing(); | 771 | finish_e820_parsing(); |
772 | 772 | ||
773 | if (efi_enabled) | ||
774 | efi_init(); | ||
775 | |||
773 | dmi_scan_machine(); | 776 | dmi_scan_machine(); |
774 | 777 | ||
775 | dmi_check_system(bad_bios_dmi_table); | 778 | dmi_check_system(bad_bios_dmi_table); |
@@ -789,8 +792,6 @@ void __init setup_arch(char **cmdline_p) | |||
789 | insert_resource(&iomem_resource, &data_resource); | 792 | insert_resource(&iomem_resource, &data_resource); |
790 | insert_resource(&iomem_resource, &bss_resource); | 793 | insert_resource(&iomem_resource, &bss_resource); |
791 | 794 | ||
792 | if (efi_enabled) | ||
793 | efi_init(); | ||
794 | 795 | ||
795 | #ifdef CONFIG_X86_32 | 796 | #ifdef CONFIG_X86_32 |
796 | if (ppro_with_ram_bug()) { | 797 | if (ppro_with_ram_bug()) { |
diff --git a/arch/x86/math-emu/fpu_aux.c b/arch/x86/math-emu/fpu_aux.c index 491e737ce547..aa0987088774 100644 --- a/arch/x86/math-emu/fpu_aux.c +++ b/arch/x86/math-emu/fpu_aux.c | |||
@@ -30,20 +30,29 @@ static void fclex(void) | |||
30 | } | 30 | } |
31 | 31 | ||
32 | /* Needs to be externally visible */ | 32 | /* Needs to be externally visible */ |
33 | void finit(void) | 33 | void finit_task(struct task_struct *tsk) |
34 | { | 34 | { |
35 | control_word = 0x037f; | 35 | struct i387_soft_struct *soft = &tsk->thread.xstate->soft; |
36 | partial_status = 0; | 36 | struct address *oaddr, *iaddr; |
37 | top = 0; /* We don't keep top in the status word internally. */ | 37 | soft->cwd = 0x037f; |
38 | fpu_tag_word = 0xffff; | 38 | soft->swd = 0; |
39 | soft->ftop = 0; /* We don't keep top in the status word internally. */ | ||
40 | soft->twd = 0xffff; | ||
39 | /* The behaviour is different from that detailed in | 41 | /* The behaviour is different from that detailed in |
40 | Section 15.1.6 of the Intel manual */ | 42 | Section 15.1.6 of the Intel manual */ |
41 | operand_address.offset = 0; | 43 | oaddr = (struct address *)&soft->foo; |
42 | operand_address.selector = 0; | 44 | oaddr->offset = 0; |
43 | instruction_address.offset = 0; | 45 | oaddr->selector = 0; |
44 | instruction_address.selector = 0; | 46 | iaddr = (struct address *)&soft->fip; |
45 | instruction_address.opcode = 0; | 47 | iaddr->offset = 0; |
46 | no_ip_update = 1; | 48 | iaddr->selector = 0; |
49 | iaddr->opcode = 0; | ||
50 | soft->no_update = 1; | ||
51 | } | ||
52 | |||
53 | void finit(void) | ||
54 | { | ||
55 | finit_task(current); | ||
47 | } | 56 | } |
48 | 57 | ||
49 | /* | 58 | /* |