diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-09 18:41:02 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-09 18:41:02 -0500 |
commit | 92e2d508464b6293ad274fb606f766a458894142 (patch) | |
tree | 39bf383364530e5cdeacb205d32d69a4b78e253d /arch/x86/kernel | |
parent | 5d96218b4a5ee0c5ff0ac87f3ba90cfa86ca0ca1 (diff) | |
parent | d315760ffa261c15ff92699ac6f514112543d7ca (diff) |
Merge branch 'x86/urgent' into core/percpu
Conflicts:
arch/x86/kernel/acpi/boot.c
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 23 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/intel.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/io_apic.c | 20 | ||||
-rw-r--r-- | arch/x86/kernel/process.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 9 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/traps.c | 15 | ||||
-rw-r--r-- | arch/x86/kernel/vmi_32.c | 11 |
8 files changed, 75 insertions, 14 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 4cb5964f1499..c193ec3c695e 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -973,6 +973,29 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) | |||
973 | nr_ioapics++; | 973 | nr_ioapics++; |
974 | } | 974 | } |
975 | 975 | ||
976 | int __init acpi_probe_gsi(void) | ||
977 | { | ||
978 | int idx; | ||
979 | int gsi; | ||
980 | int max_gsi = 0; | ||
981 | |||
982 | if (acpi_disabled) | ||
983 | return 0; | ||
984 | |||
985 | if (!acpi_ioapic) | ||
986 | return 0; | ||
987 | |||
988 | max_gsi = 0; | ||
989 | for (idx = 0; idx < nr_ioapics; idx++) { | ||
990 | gsi = mp_ioapic_routing[idx].gsi_end; | ||
991 | |||
992 | if (gsi > max_gsi) | ||
993 | max_gsi = gsi; | ||
994 | } | ||
995 | |||
996 | return max_gsi + 1; | ||
997 | } | ||
998 | |||
976 | static void assign_to_mp_irq(struct mpc_intsrc *m, | 999 | static void assign_to_mp_irq(struct mpc_intsrc *m, |
977 | struct mpc_intsrc *mp_irq) | 1000 | struct mpc_intsrc *mp_irq) |
978 | { | 1001 | { |
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 430e5c38a544..24ff26a38ade 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -291,6 +291,9 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
291 | ds_init_intel(c); | 291 | ds_init_intel(c); |
292 | } | 292 | } |
293 | 293 | ||
294 | if (c->x86 == 6 && c->x86_model == 29 && cpu_has_clflush) | ||
295 | set_cpu_cap(c, X86_FEATURE_CLFLUSH_MONITOR); | ||
296 | |||
294 | #ifdef CONFIG_X86_64 | 297 | #ifdef CONFIG_X86_64 |
295 | if (c->x86 == 15) | 298 | if (c->x86 == 15) |
296 | c->x86_cache_alignment = c->x86_clflush_size * 2; | 299 | c->x86_cache_alignment = c->x86_clflush_size * 2; |
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c index c0498daf01c3..0480d06a12a4 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -3812,14 +3812,24 @@ int __init io_apic_get_redir_entries (int ioapic) | |||
3812 | 3812 | ||
3813 | void __init probe_nr_irqs_gsi(void) | 3813 | void __init probe_nr_irqs_gsi(void) |
3814 | { | 3814 | { |
3815 | int idx; | ||
3816 | int nr = 0; | 3815 | int nr = 0; |
3817 | 3816 | ||
3818 | for (idx = 0; idx < nr_ioapics; idx++) | 3817 | nr = acpi_probe_gsi(); |
3819 | nr += io_apic_get_redir_entries(idx) + 1; | 3818 | if (nr > nr_irqs_gsi) { |
3820 | |||
3821 | if (nr > nr_irqs_gsi) | ||
3822 | nr_irqs_gsi = nr; | 3819 | nr_irqs_gsi = nr; |
3820 | } else { | ||
3821 | /* for acpi=off or acpi is not compiled in */ | ||
3822 | int idx; | ||
3823 | |||
3824 | nr = 0; | ||
3825 | for (idx = 0; idx < nr_ioapics; idx++) | ||
3826 | nr += io_apic_get_redir_entries(idx) + 1; | ||
3827 | |||
3828 | if (nr > nr_irqs_gsi) | ||
3829 | nr_irqs_gsi = nr; | ||
3830 | } | ||
3831 | |||
3832 | printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi); | ||
3823 | } | 3833 | } |
3824 | 3834 | ||
3825 | #ifdef CONFIG_SPARSE_IRQ | 3835 | #ifdef CONFIG_SPARSE_IRQ |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index e68bb9e30864..6d12f7e37f8c 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -180,6 +180,9 @@ void mwait_idle_with_hints(unsigned long ax, unsigned long cx) | |||
180 | 180 | ||
181 | trace_power_start(&it, POWER_CSTATE, (ax>>4)+1); | 181 | trace_power_start(&it, POWER_CSTATE, (ax>>4)+1); |
182 | if (!need_resched()) { | 182 | if (!need_resched()) { |
183 | if (cpu_has(¤t_cpu_data, X86_FEATURE_CLFLUSH_MONITOR)) | ||
184 | clflush((void *)¤t_thread_info()->flags); | ||
185 | |||
183 | __monitor((void *)¤t_thread_info()->flags, 0, 0); | 186 | __monitor((void *)¤t_thread_info()->flags, 0, 0); |
184 | smp_mb(); | 187 | smp_mb(); |
185 | if (!need_resched()) | 188 | if (!need_resched()) |
@@ -194,6 +197,9 @@ static void mwait_idle(void) | |||
194 | struct power_trace it; | 197 | struct power_trace it; |
195 | if (!need_resched()) { | 198 | if (!need_resched()) { |
196 | trace_power_start(&it, POWER_CSTATE, 1); | 199 | trace_power_start(&it, POWER_CSTATE, 1); |
200 | if (cpu_has(¤t_cpu_data, X86_FEATURE_CLFLUSH_MONITOR)) | ||
201 | clflush((void *)¤t_thread_info()->flags); | ||
202 | |||
197 | __monitor((void *)¤t_thread_info()->flags, 0, 0); | 203 | __monitor((void *)¤t_thread_info()->flags, 0, 0); |
198 | smp_mb(); | 204 | smp_mb(); |
199 | if (!need_resched()) | 205 | if (!need_resched()) |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index c422eebb0c58..8eb169e45584 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/uaccess.h> | 41 | #include <linux/uaccess.h> |
42 | #include <linux/io.h> | 42 | #include <linux/io.h> |
43 | #include <linux/ftrace.h> | 43 | #include <linux/ftrace.h> |
44 | #include <linux/dmi.h> | ||
44 | 45 | ||
45 | #include <asm/pgtable.h> | 46 | #include <asm/pgtable.h> |
46 | #include <asm/system.h> | 47 | #include <asm/system.h> |
@@ -168,14 +169,18 @@ void __show_regs(struct pt_regs *regs, int all) | |||
168 | unsigned long d0, d1, d2, d3, d6, d7; | 169 | unsigned long d0, d1, d2, d3, d6, d7; |
169 | unsigned int fsindex, gsindex; | 170 | unsigned int fsindex, gsindex; |
170 | unsigned int ds, cs, es; | 171 | unsigned int ds, cs, es; |
172 | const char *board; | ||
171 | 173 | ||
172 | printk("\n"); | 174 | printk("\n"); |
173 | print_modules(); | 175 | print_modules(); |
174 | printk(KERN_INFO "Pid: %d, comm: %.20s %s %s %.*s\n", | 176 | board = dmi_get_system_info(DMI_PRODUCT_NAME); |
177 | if (!board) | ||
178 | board = ""; | ||
179 | printk(KERN_INFO "Pid: %d, comm: %.20s %s %s %.*s %s\n", | ||
175 | current->pid, current->comm, print_tainted(), | 180 | current->pid, current->comm, print_tainted(), |
176 | init_utsname()->release, | 181 | init_utsname()->release, |
177 | (int)strcspn(init_utsname()->version, " "), | 182 | (int)strcspn(init_utsname()->version, " "), |
178 | init_utsname()->version); | 183 | init_utsname()->version, board); |
179 | printk(KERN_INFO "RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->ip); | 184 | printk(KERN_INFO "RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->ip); |
180 | printk_address(regs->ip, 1); | 185 | printk_address(regs->ip, 1); |
181 | printk(KERN_INFO "RSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, | 186 | printk(KERN_INFO "RSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index f41c4486c270..d5d6693b706d 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -607,7 +607,7 @@ struct x86_quirks *x86_quirks __initdata = &default_x86_quirks; | |||
607 | static int __init dmi_low_memory_corruption(const struct dmi_system_id *d) | 607 | static int __init dmi_low_memory_corruption(const struct dmi_system_id *d) |
608 | { | 608 | { |
609 | printk(KERN_NOTICE | 609 | printk(KERN_NOTICE |
610 | "%s detected: BIOS may corrupt low RAM, working it around.\n", | 610 | "%s detected: BIOS may corrupt low RAM, working around it.\n", |
611 | d->ident); | 611 | d->ident); |
612 | 612 | ||
613 | e820_update_range(0, 0x10000, E820_RAM, E820_RESERVED); | 613 | e820_update_range(0, 0x10000, E820_RAM, E820_RESERVED); |
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index ed5aee5f3fcc..3b7b2e190201 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -895,7 +895,7 @@ asmlinkage void math_state_restore(void) | |||
895 | EXPORT_SYMBOL_GPL(math_state_restore); | 895 | EXPORT_SYMBOL_GPL(math_state_restore); |
896 | 896 | ||
897 | #ifndef CONFIG_MATH_EMULATION | 897 | #ifndef CONFIG_MATH_EMULATION |
898 | asmlinkage void math_emulate(long arg) | 898 | void math_emulate(struct math_emu_info *info) |
899 | { | 899 | { |
900 | printk(KERN_EMERG | 900 | printk(KERN_EMERG |
901 | "math-emulation not enabled and no coprocessor found.\n"); | 901 | "math-emulation not enabled and no coprocessor found.\n"); |
@@ -905,16 +905,19 @@ asmlinkage void math_emulate(long arg) | |||
905 | } | 905 | } |
906 | #endif /* CONFIG_MATH_EMULATION */ | 906 | #endif /* CONFIG_MATH_EMULATION */ |
907 | 907 | ||
908 | dotraplinkage void __kprobes | 908 | dotraplinkage void __kprobes do_device_not_available(struct pt_regs regs) |
909 | do_device_not_available(struct pt_regs *regs, long error) | ||
910 | { | 909 | { |
911 | #ifdef CONFIG_X86_32 | 910 | #ifdef CONFIG_X86_32 |
912 | if (read_cr0() & X86_CR0_EM) { | 911 | if (read_cr0() & X86_CR0_EM) { |
913 | conditional_sti(regs); | 912 | struct math_emu_info info = { }; |
914 | math_emulate(0); | 913 | |
914 | conditional_sti(®s); | ||
915 | |||
916 | info.regs = ®s; | ||
917 | math_emulate(&info); | ||
915 | } else { | 918 | } else { |
916 | math_state_restore(); /* interrupts still off */ | 919 | math_state_restore(); /* interrupts still off */ |
917 | conditional_sti(regs); | 920 | conditional_sti(®s); |
918 | } | 921 | } |
919 | #else | 922 | #else |
920 | math_state_restore(); | 923 | math_state_restore(); |
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c index eb9e7347928e..f052c84ecbe4 100644 --- a/arch/x86/kernel/vmi_32.c +++ b/arch/x86/kernel/vmi_32.c | |||
@@ -321,6 +321,16 @@ static void vmi_release_pmd(unsigned long pfn) | |||
321 | } | 321 | } |
322 | 322 | ||
323 | /* | 323 | /* |
324 | * We use the pgd_free hook for releasing the pgd page: | ||
325 | */ | ||
326 | static void vmi_pgd_free(struct mm_struct *mm, pgd_t *pgd) | ||
327 | { | ||
328 | unsigned long pfn = __pa(pgd) >> PAGE_SHIFT; | ||
329 | |||
330 | vmi_ops.release_page(pfn, VMI_PAGE_L2); | ||
331 | } | ||
332 | |||
333 | /* | ||
324 | * Helper macros for MMU update flags. We can defer updates until a flush | 334 | * Helper macros for MMU update flags. We can defer updates until a flush |
325 | * or page invalidation only if the update is to the current address space | 335 | * or page invalidation only if the update is to the current address space |
326 | * (otherwise, there is no flush). We must check against init_mm, since | 336 | * (otherwise, there is no flush). We must check against init_mm, since |
@@ -763,6 +773,7 @@ static inline int __init activate_vmi(void) | |||
763 | if (vmi_ops.release_page) { | 773 | if (vmi_ops.release_page) { |
764 | pv_mmu_ops.release_pte = vmi_release_pte; | 774 | pv_mmu_ops.release_pte = vmi_release_pte; |
765 | pv_mmu_ops.release_pmd = vmi_release_pmd; | 775 | pv_mmu_ops.release_pmd = vmi_release_pmd; |
776 | pv_mmu_ops.pgd_free = vmi_pgd_free; | ||
766 | } | 777 | } |
767 | 778 | ||
768 | /* Set linear is needed in all cases */ | 779 | /* Set linear is needed in all cases */ |