Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86

* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
x86: fix APIC related bootup crash on Athlon XP CPUs
time: add ADJ_OFFSET_SS_READ
x86: export the symbol empty_zero_page on the 32-bit x86 architecture
x86: fix kprobes_64.c inlining borkage
pci: use pci=bfsort for HP DL385 G2, DL585 G2
x86: correctly set UTS_MACHINE for "make ARCH=x86"
lockdep: annotate do_debug() trap handler
x86: turn off iommu merge by default
x86: fix ACPI compile for LOCAL_APIC=n
x86: printk kernel version in WARN_ON and other dump_stack users
ACPI: Set max_cstate to 1 for early Opterons.
x86: fix NMI watchdog & 'stopped time' problem

+91 -10
+1 -1
arch/x86/kernel/apic_32.c
··· 789 789 * Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 And not 790 790 * needed on AMD. 791 791 */ 792 - if (modern_apic()) 792 + if (modern_apic() || boot_cpu_data.x86_vendor == X86_VENDOR_AMD) 793 793 return; 794 794 /* 795 795 * Wait for idle.
+2
arch/x86/kernel/i386_ksyms_32.c
··· 2 2 #include <asm/semaphore.h> 3 3 #include <asm/checksum.h> 4 4 #include <asm/desc.h> 5 + #include <asm/pgtable.h> 5 6 6 7 EXPORT_SYMBOL(__down_failed); 7 8 EXPORT_SYMBOL(__down_failed_interruptible); ··· 30 29 #endif 31 30 32 31 EXPORT_SYMBOL(csum_partial); 32 + EXPORT_SYMBOL(empty_zero_page);
+10 -2
arch/x86/kernel/io_apic_32.c
··· 2166 2166 { 2167 2167 int apic1, pin1, apic2, pin2; 2168 2168 int vector; 2169 + unsigned int ver; 2170 + 2171 + ver = apic_read(APIC_LVR); 2172 + ver = GET_APIC_VERSION(ver); 2169 2173 2170 2174 /* 2171 2175 * get/set the timer IRQ vector: ··· 2183 2179 * mode for the 8259A whenever interrupts are routed 2184 2180 * through I/O APICs. Also IRQ0 has to be enabled in 2185 2181 * the 8259A which implies the virtual wire has to be 2186 - * disabled in the local APIC. 2182 + * disabled in the local APIC. Finally timer interrupts 2183 + * need to be acknowledged manually in the 8259A for 2184 + * timer_interrupt() and for the i82489DX when using 2185 + * the NMI watchdog. 2187 2186 */ 2188 2187 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); 2189 2188 init_8259A(1); 2190 - timer_ack = 1; 2189 + timer_ack = !cpu_has_tsc; 2190 + timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); 2191 2191 if (timer_over_8254 > 0) 2192 2192 enable_8259A_irq(0); 2193 2193
+1 -1
arch/x86/kernel/kprobes_64.c
··· 58 58 /* 59 59 * returns non-zero if opcode modifies the interrupt flag. 60 60 */ 61 - static __always_inline int is_IF_modifier(kprobe_opcode_t *insn) 61 + static int __kprobes is_IF_modifier(kprobe_opcode_t *insn) 62 62 { 63 63 switch (*insn) { 64 64 case 0xfa: /* cli */
+7 -2
arch/x86/kernel/nmi_32.c
··· 25 25 26 26 #include <asm/smp.h> 27 27 #include <asm/nmi.h> 28 + #include <asm/timer.h> 28 29 29 30 #include "mach_traps.h" 30 31 ··· 84 83 85 84 prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); 86 85 if (!prev_nmi_count) 87 - return -1; 86 + goto error; 88 87 89 88 printk(KERN_INFO "Testing NMI watchdog ... "); 90 89 ··· 118 117 if (!atomic_read(&nmi_active)) { 119 118 kfree(prev_nmi_count); 120 119 atomic_set(&nmi_active, -1); 121 - return -1; 120 + goto error; 122 121 } 123 122 printk("OK.\n"); 124 123 ··· 129 128 130 129 kfree(prev_nmi_count); 131 130 return 0; 131 + error: 132 + timer_ack = !cpu_has_tsc; 133 + 134 + return -1; 132 135 } 133 136 /* This needs to happen later in boot so counters are working */ 134 137 late_initcall(check_nmi_watchdog);
+1 -1
arch/x86/kernel/pci-dma_64.c
··· 12 12 #include <asm/gart.h> 13 13 #include <asm/calgary.h> 14 14 15 - int iommu_merge __read_mostly = 1; 15 + int iommu_merge __read_mostly = 0; 16 16 EXPORT_SYMBOL(iommu_merge); 17 17 18 18 dma_addr_t bad_dma_address __read_mostly;
+7
arch/x86/kernel/traps_32.c
··· 283 283 { 284 284 unsigned long stack; 285 285 286 + printk("Pid: %d, comm: %.20s %s %s %.*s\n", 287 + current->pid, current->comm, print_tainted(), 288 + init_utsname()->release, 289 + (int)strcspn(init_utsname()->version, " "), 290 + init_utsname()->version); 286 291 show_trace(current, NULL, &stack); 287 292 } 288 293 ··· 832 827 { 833 828 unsigned int condition; 834 829 struct task_struct *tsk = current; 830 + 831 + trace_hardirqs_fixup(); 835 832 836 833 get_debugreg(condition, 6); 837 834
+9
arch/x86/kernel/traps_64.c
··· 31 31 #include <linux/uaccess.h> 32 32 #include <linux/bug.h> 33 33 #include <linux/kdebug.h> 34 + #include <linux/utsname.h> 34 35 35 36 #if defined(CONFIG_EDAC) 36 37 #include <linux/edac.h> ··· 401 400 void dump_stack(void) 402 401 { 403 402 unsigned long dummy; 403 + 404 + printk("Pid: %d, comm: %.20s %s %s %.*s\n", 405 + current->pid, current->comm, print_tainted(), 406 + init_utsname()->release, 407 + (int)strcspn(init_utsname()->version, " "), 408 + init_utsname()->version); 404 409 show_trace(NULL, NULL, &dummy); 405 410 } 406 411 ··· 852 845 unsigned long condition; 853 846 struct task_struct *tsk = current; 854 847 siginfo_t info; 848 + 849 + trace_hardirqs_fixup(); 855 850 856 851 get_debugreg(condition, 6); 857 852
+16
arch/x86/pci/common.c
··· 315 315 }, 316 316 }, 317 317 #endif 318 + { 319 + .callback = set_bf_sort, 320 + .ident = "HP ProLiant DL385 G2", 321 + .matches = { 322 + DMI_MATCH(DMI_SYS_VENDOR, "HP"), 323 + DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"), 324 + }, 325 + }, 326 + { 327 + .callback = set_bf_sort, 328 + .ident = "HP ProLiant DL585 G2", 329 + .matches = { 330 + DMI_MATCH(DMI_SYS_VENDOR, "HP"), 331 + DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"), 332 + }, 333 + }, 318 334 {} 319 335 }; 320 336
+1
drivers/acpi/processor_idle.c
··· 1673 1673 1674 1674 if (!first_run) { 1675 1675 dmi_check_system(processor_power_dmi_table); 1676 + max_cstate = acpi_processor_cstate_check(max_cstate); 1676 1677 if (max_cstate < ACPI_C_STATES_MAX) 1677 1678 printk(KERN_NOTICE 1678 1679 "ACPI: processor limited to max C-state %d\n",
+1
include/asm-ia64/acpi.h
··· 94 94 #define acpi_noirq 0 /* ACPI always enabled on IA64 */ 95 95 #define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */ 96 96 #define acpi_strict 1 /* no ACPI spec workarounds on IA64 */ 97 + #define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */ 97 98 static inline void disable_acpi(void) { } 98 99 99 100 const char *acpi_get_sysname (void);
+27
include/asm-x86/acpi.h
··· 1 + #ifndef _ASM_X86_ACPI_H 2 + #define _ASM_X86_ACPI_H 3 + 1 4 #ifdef CONFIG_X86_32 2 5 # include "acpi_32.h" 3 6 #else 4 7 # include "acpi_64.h" 8 + #endif 9 + 10 + #include <asm/processor.h> 11 + 12 + /* 13 + * Check if the CPU can handle C2 and deeper 14 + */ 15 + static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate) 16 + { 17 + /* 18 + * Early models (<=5) of AMD Opterons are not supposed to go into 19 + * C2 state. 20 + * 21 + * Steppings 0x0A and later are good 22 + */ 23 + if (boot_cpu_data.x86 == 0x0F && 24 + boot_cpu_data.x86_vendor == X86_VENDOR_AMD && 25 + boot_cpu_data.x86_model <= 0x05 && 26 + boot_cpu_data.x86_mask < 0x0A) 27 + return 1; 28 + else 29 + return max_cstate; 30 + } 31 + 5 32 #endif
+1
include/asm-x86/apic_32.h
··· 120 120 121 121 #else /* !CONFIG_X86_LOCAL_APIC */ 122 122 static inline void lapic_shutdown(void) { } 123 + #define local_apic_timer_c2_ok 1 123 124 124 125 #endif /* !CONFIG_X86_LOCAL_APIC */ 125 126
+1
include/linux/timex.h
··· 137 137 #define ADJ_TIMECONST 0x0020 /* pll time constant */ 138 138 #define ADJ_TICK 0x4000 /* tick value */ 139 139 #define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ 140 + #define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ 140 141 141 142 /* xntp 3.4 compatibility names */ 142 143 #define MOD_OFFSET ADJ_OFFSET
+6 -3
kernel/time/ntp.c
··· 249 249 250 250 /* Now we validate the data before disabling interrupts */ 251 251 252 - if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) 252 + if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) { 253 253 /* singleshot must not be used with any other mode bits */ 254 - if (txc->modes != ADJ_OFFSET_SINGLESHOT) 254 + if (txc->modes != ADJ_OFFSET_SINGLESHOT && 255 + txc->modes != ADJ_OFFSET_SS_READ) 255 256 return -EINVAL; 257 + } 256 258 257 259 if (txc->modes != ADJ_OFFSET_SINGLESHOT && (txc->modes & ADJ_OFFSET)) 258 260 /* adjustment Offset limited to +- .512 seconds */ ··· 374 372 leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0) 375 373 result = TIME_ERROR; 376 374 377 - if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) 375 + if ((txc->modes == ADJ_OFFSET_SINGLESHOT) || 376 + (txc->modes == ADJ_OFFSET_SS_READ)) 378 377 txc->offset = save_adjust; 379 378 else 380 379 txc->offset = ((long)shift_right(time_offset, SHIFT_UPDATE)) *