diff options
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/Kconfig | 16 | ||||
-rw-r--r-- | arch/x86_64/defconfig | 40 | ||||
-rw-r--r-- | arch/x86_64/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/aperture.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/apic.c | 1 | ||||
-rw-r--r-- | arch/x86_64/kernel/entry.S | 30 | ||||
-rw-r--r-- | arch/x86_64/kernel/head.S | 7 | ||||
-rw-r--r-- | arch/x86_64/kernel/io_apic.c | 42 | ||||
-rw-r--r-- | arch/x86_64/kernel/machine_kexec.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/mpparse.c | 4 | ||||
-rw-r--r-- | arch/x86_64/kernel/nmi.c | 19 | ||||
-rw-r--r-- | arch/x86_64/kernel/pci-gart.c | 22 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup.c | 6 | ||||
-rw-r--r-- | arch/x86_64/kernel/smpboot.c | 4 | ||||
-rw-r--r-- | arch/x86_64/kernel/time.c | 25 | ||||
-rw-r--r-- | arch/x86_64/mm/k8topology.c | 2 | ||||
-rw-r--r-- | arch/x86_64/mm/numa.c | 2 | ||||
-rw-r--r-- | arch/x86_64/mm/srat.c | 5 |
18 files changed, 133 insertions, 98 deletions
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 2f9deca31cc9..e18eb79bf855 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -354,21 +354,6 @@ config HPET_TIMER | |||
354 | as it is off-chip. You can find the HPET spec at | 354 | as it is off-chip. You can find the HPET spec at |
355 | <http://www.intel.com/hardwaredesign/hpetspec.htm>. | 355 | <http://www.intel.com/hardwaredesign/hpetspec.htm>. |
356 | 356 | ||
357 | config X86_PM_TIMER | ||
358 | bool "PM timer" if EMBEDDED | ||
359 | depends on ACPI | ||
360 | default y | ||
361 | help | ||
362 | Support the ACPI PM timer for time keeping. This is slow, | ||
363 | but is useful on some chipsets without HPET on systems with more | ||
364 | than one CPU. On a single processor or single socket multi core | ||
365 | system it is normally not required. | ||
366 | When the PM timer is active 64bit vsyscalls are disabled | ||
367 | and should not be enabled (/proc/sys/kernel/vsyscall64 should | ||
368 | not be changed). | ||
369 | The kernel selects the PM timer only as a last resort, so it is | ||
370 | useful to enable just in case. | ||
371 | |||
372 | config HPET_EMULATE_RTC | 357 | config HPET_EMULATE_RTC |
373 | bool "Provide RTC interrupt" | 358 | bool "Provide RTC interrupt" |
374 | depends on HPET_TIMER && RTC=y | 359 | depends on HPET_TIMER && RTC=y |
@@ -592,6 +577,7 @@ source "arch/x86_64/oprofile/Kconfig" | |||
592 | 577 | ||
593 | config KPROBES | 578 | config KPROBES |
594 | bool "Kprobes (EXPERIMENTAL)" | 579 | bool "Kprobes (EXPERIMENTAL)" |
580 | depends on EXPERIMENTAL && MODULES | ||
595 | help | 581 | help |
596 | Kprobes allows you to trap at almost any kernel address and | 582 | Kprobes allows you to trap at almost any kernel address and |
597 | execute a callback function. register_kprobe() establishes | 583 | execute a callback function. register_kprobe() establishes |
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index 56832929a543..ce4de61ed85d 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.16-rc1-git2 | 3 | # Linux kernel version: 2.6.16-rc3-git9 |
4 | # Thu Jan 19 10:05:21 2006 | 4 | # Sat Feb 18 00:27:03 2006 |
5 | # | 5 | # |
6 | CONFIG_X86_64=y | 6 | CONFIG_X86_64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -21,7 +21,6 @@ CONFIG_DMI=y | |||
21 | # Code maturity level options | 21 | # Code maturity level options |
22 | # | 22 | # |
23 | CONFIG_EXPERIMENTAL=y | 23 | CONFIG_EXPERIMENTAL=y |
24 | CONFIG_CLEAN_COMPILE=y | ||
25 | CONFIG_LOCK_KERNEL=y | 24 | CONFIG_LOCK_KERNEL=y |
26 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 25 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
27 | 26 | ||
@@ -267,6 +266,7 @@ CONFIG_NET=y | |||
267 | # | 266 | # |
268 | # Networking options | 267 | # Networking options |
269 | # | 268 | # |
269 | # CONFIG_NETDEBUG is not set | ||
270 | CONFIG_PACKET=y | 270 | CONFIG_PACKET=y |
271 | # CONFIG_PACKET_MMAP is not set | 271 | # CONFIG_PACKET_MMAP is not set |
272 | CONFIG_UNIX=y | 272 | CONFIG_UNIX=y |
@@ -446,7 +446,6 @@ CONFIG_BLK_DEV_PIIX=y | |||
446 | # CONFIG_BLK_DEV_NS87415 is not set | 446 | # CONFIG_BLK_DEV_NS87415 is not set |
447 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | 447 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set |
448 | CONFIG_BLK_DEV_PDC202XX_NEW=y | 448 | CONFIG_BLK_DEV_PDC202XX_NEW=y |
449 | # CONFIG_PDC202XX_FORCE is not set | ||
450 | # CONFIG_BLK_DEV_SVWKS is not set | 449 | # CONFIG_BLK_DEV_SVWKS is not set |
451 | # CONFIG_BLK_DEV_SIIMAGE is not set | 450 | # CONFIG_BLK_DEV_SIIMAGE is not set |
452 | # CONFIG_BLK_DEV_SIS5513 is not set | 451 | # CONFIG_BLK_DEV_SIS5513 is not set |
@@ -573,7 +572,33 @@ CONFIG_FUSION_MAX_SGE=128 | |||
573 | # | 572 | # |
574 | # IEEE 1394 (FireWire) support | 573 | # IEEE 1394 (FireWire) support |
575 | # | 574 | # |
576 | # CONFIG_IEEE1394 is not set | 575 | CONFIG_IEEE1394=y |
576 | |||
577 | # | ||
578 | # Subsystem Options | ||
579 | # | ||
580 | # CONFIG_IEEE1394_VERBOSEDEBUG is not set | ||
581 | # CONFIG_IEEE1394_OUI_DB is not set | ||
582 | # CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set | ||
583 | # CONFIG_IEEE1394_EXPORT_FULL_API is not set | ||
584 | |||
585 | # | ||
586 | # Device Drivers | ||
587 | # | ||
588 | |||
589 | # | ||
590 | # Texas Instruments PCILynx requires I2C | ||
591 | # | ||
592 | CONFIG_IEEE1394_OHCI1394=y | ||
593 | |||
594 | # | ||
595 | # Protocol Drivers | ||
596 | # | ||
597 | # CONFIG_IEEE1394_VIDEO1394 is not set | ||
598 | # CONFIG_IEEE1394_SBP2 is not set | ||
599 | # CONFIG_IEEE1394_ETH1394 is not set | ||
600 | # CONFIG_IEEE1394_DV1394 is not set | ||
601 | CONFIG_IEEE1394_RAWIO=y | ||
577 | 602 | ||
578 | # | 603 | # |
579 | # I2O device support | 604 | # I2O device support |
@@ -772,6 +797,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | |||
772 | # | 797 | # |
773 | CONFIG_SERIAL_CORE=y | 798 | CONFIG_SERIAL_CORE=y |
774 | CONFIG_SERIAL_CORE_CONSOLE=y | 799 | CONFIG_SERIAL_CORE_CONSOLE=y |
800 | # CONFIG_SERIAL_JSM is not set | ||
775 | CONFIG_UNIX98_PTYS=y | 801 | CONFIG_UNIX98_PTYS=y |
776 | CONFIG_LEGACY_PTYS=y | 802 | CONFIG_LEGACY_PTYS=y |
777 | CONFIG_LEGACY_PTY_COUNT=256 | 803 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -871,6 +897,7 @@ CONFIG_HPET_MMAP=y | |||
871 | # | 897 | # |
872 | CONFIG_HWMON=y | 898 | CONFIG_HWMON=y |
873 | # CONFIG_HWMON_VID is not set | 899 | # CONFIG_HWMON_VID is not set |
900 | # CONFIG_SENSORS_F71805F is not set | ||
874 | # CONFIG_SENSORS_HDAPS is not set | 901 | # CONFIG_SENSORS_HDAPS is not set |
875 | # CONFIG_HWMON_DEBUG_CHIP is not set | 902 | # CONFIG_HWMON_DEBUG_CHIP is not set |
876 | 903 | ||
@@ -1101,7 +1128,6 @@ CONFIG_USB_MON=y | |||
1101 | # EDAC - error detection and reporting (RAS) | 1128 | # EDAC - error detection and reporting (RAS) |
1102 | # | 1129 | # |
1103 | # CONFIG_EDAC is not set | 1130 | # CONFIG_EDAC is not set |
1104 | # CONFIG_EDAC_POLL is not set | ||
1105 | 1131 | ||
1106 | # | 1132 | # |
1107 | # Firmware Drivers | 1133 | # Firmware Drivers |
@@ -1296,9 +1322,7 @@ CONFIG_DEBUG_FS=y | |||
1296 | # CONFIG_DEBUG_VM is not set | 1322 | # CONFIG_DEBUG_VM is not set |
1297 | # CONFIG_FRAME_POINTER is not set | 1323 | # CONFIG_FRAME_POINTER is not set |
1298 | # CONFIG_FORCED_INLINING is not set | 1324 | # CONFIG_FORCED_INLINING is not set |
1299 | # CONFIG_UNWIND_INFO is not set | ||
1300 | # CONFIG_RCU_TORTURE_TEST is not set | 1325 | # CONFIG_RCU_TORTURE_TEST is not set |
1301 | CONFIG_INIT_DEBUG=y | ||
1302 | # CONFIG_DEBUG_RODATA is not set | 1326 | # CONFIG_DEBUG_RODATA is not set |
1303 | # CONFIG_IOMMU_DEBUG is not set | 1327 | # CONFIG_IOMMU_DEBUG is not set |
1304 | 1328 | ||
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile index 72fe60c20d39..a098a11e7755 100644 --- a/arch/x86_64/kernel/Makefile +++ b/arch/x86_64/kernel/Makefile | |||
@@ -43,7 +43,7 @@ CFLAGS_vsyscall.o := $(PROFILING) -g0 | |||
43 | 43 | ||
44 | bootflag-y += ../../i386/kernel/bootflag.o | 44 | bootflag-y += ../../i386/kernel/bootflag.o |
45 | cpuid-$(subst m,y,$(CONFIG_X86_CPUID)) += ../../i386/kernel/cpuid.o | 45 | cpuid-$(subst m,y,$(CONFIG_X86_CPUID)) += ../../i386/kernel/cpuid.o |
46 | topology-y += ../../i386/mach-default/topology.o | 46 | topology-y += ../../i386/kernel/topology.o |
47 | microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o | 47 | microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o |
48 | intel_cacheinfo-y += ../../i386/kernel/cpu/intel_cacheinfo.o | 48 | intel_cacheinfo-y += ../../i386/kernel/cpu/intel_cacheinfo.o |
49 | quirks-y += ../../i386/kernel/quirks.o | 49 | quirks-y += ../../i386/kernel/quirks.o |
diff --git a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c index e4e2b7d01f89..a0f955b9995f 100644 --- a/arch/x86_64/kernel/aperture.c +++ b/arch/x86_64/kernel/aperture.c | |||
@@ -248,7 +248,7 @@ void __init iommu_hole_init(void) | |||
248 | /* Got the aperture from the AGP bridge */ | 248 | /* Got the aperture from the AGP bridge */ |
249 | } else if (swiotlb && !valid_agp) { | 249 | } else if (swiotlb && !valid_agp) { |
250 | /* Do nothing */ | 250 | /* Do nothing */ |
251 | } else if ((!no_iommu && end_pfn >= MAX_DMA32_PFN) || | 251 | } else if ((!no_iommu && end_pfn > MAX_DMA32_PFN) || |
252 | force_iommu || | 252 | force_iommu || |
253 | valid_agp || | 253 | valid_agp || |
254 | fallback_aper_force) { | 254 | fallback_aper_force) { |
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index 7a0a3e8d5d72..e5b14c57eaa0 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c | |||
@@ -1152,6 +1152,7 @@ __setup("noapicmaintimer", setup_noapicmaintimer); | |||
1152 | static __init int setup_apicpmtimer(char *s) | 1152 | static __init int setup_apicpmtimer(char *s) |
1153 | { | 1153 | { |
1154 | apic_calibrate_pmtmr = 1; | 1154 | apic_calibrate_pmtmr = 1; |
1155 | notsc_setup(NULL); | ||
1155 | return setup_apicmaintimer(NULL); | 1156 | return setup_apicmaintimer(NULL); |
1156 | } | 1157 | } |
1157 | __setup("apicpmtimer", setup_apicpmtimer); | 1158 | __setup("apicpmtimer", setup_apicpmtimer); |
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index b150c87a08c6..22cb6ee074b9 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -178,6 +178,12 @@ rff_trace: | |||
178 | * Interrupts are off on entry. | 178 | * Interrupts are off on entry. |
179 | * Only called from user space. | 179 | * Only called from user space. |
180 | * | 180 | * |
181 | * EM64T CPUs have somewhat weird error reporting for non canonical RIPs in SYSRET. | ||
182 | * We can't handle any exceptions there because the exception handler would | ||
183 | * end up running on the user stack which is unsafe. To avoid problems | ||
184 | * any code that might end up with a user touched pt_regs should return | ||
185 | * using int_ret_from_syscall. | ||
186 | * | ||
181 | * XXX if we had a free scratch register we could save the RSP into the stack frame | 187 | * XXX if we had a free scratch register we could save the RSP into the stack frame |
182 | * and report it properly in ps. Unfortunately we haven't. | 188 | * and report it properly in ps. Unfortunately we haven't. |
183 | */ | 189 | */ |
@@ -254,7 +260,9 @@ sysret_signal: | |||
254 | xorl %esi,%esi # oldset -> arg2 | 260 | xorl %esi,%esi # oldset -> arg2 |
255 | call ptregscall_common | 261 | call ptregscall_common |
256 | 1: movl $_TIF_NEED_RESCHED,%edi | 262 | 1: movl $_TIF_NEED_RESCHED,%edi |
257 | jmp sysret_check | 263 | /* Stack frame might have been changed. The IRET path does |
264 | some additional checks to handle this */ | ||
265 | jmp int_with_check | ||
258 | 266 | ||
259 | badsys: | 267 | badsys: |
260 | movq $-ENOSYS,RAX-ARGOFFSET(%rsp) | 268 | movq $-ENOSYS,RAX-ARGOFFSET(%rsp) |
@@ -280,7 +288,8 @@ tracesys: | |||
280 | call syscall_trace_leave | 288 | call syscall_trace_leave |
281 | RESTORE_TOP_OF_STACK %rbx | 289 | RESTORE_TOP_OF_STACK %rbx |
282 | RESTORE_REST | 290 | RESTORE_REST |
283 | jmp ret_from_sys_call | 291 | /* Stack frame might have been changed. Use the more careful IRET path */ |
292 | jmp int_ret_from_sys_call | ||
284 | CFI_ENDPROC | 293 | CFI_ENDPROC |
285 | 294 | ||
286 | /* | 295 | /* |
@@ -408,25 +417,9 @@ ENTRY(stub_execve) | |||
408 | CFI_ADJUST_CFA_OFFSET -8 | 417 | CFI_ADJUST_CFA_OFFSET -8 |
409 | CFI_REGISTER rip, r11 | 418 | CFI_REGISTER rip, r11 |
410 | SAVE_REST | 419 | SAVE_REST |
411 | movq %r11, %r15 | ||
412 | CFI_REGISTER rip, r15 | ||
413 | FIXUP_TOP_OF_STACK %r11 | 420 | FIXUP_TOP_OF_STACK %r11 |
414 | call sys_execve | 421 | call sys_execve |
415 | GET_THREAD_INFO(%rcx) | ||
416 | bt $TIF_IA32,threadinfo_flags(%rcx) | ||
417 | CFI_REMEMBER_STATE | ||
418 | jc exec_32bit | ||
419 | RESTORE_TOP_OF_STACK %r11 | 422 | RESTORE_TOP_OF_STACK %r11 |
420 | movq %r15, %r11 | ||
421 | CFI_REGISTER rip, r11 | ||
422 | RESTORE_REST | ||
423 | pushq %r11 | ||
424 | CFI_ADJUST_CFA_OFFSET 8 | ||
425 | CFI_REL_OFFSET rip, 0 | ||
426 | ret | ||
427 | |||
428 | exec_32bit: | ||
429 | CFI_RESTORE_STATE | ||
430 | movq %rax,RAX(%rsp) | 423 | movq %rax,RAX(%rsp) |
431 | RESTORE_REST | 424 | RESTORE_REST |
432 | jmp int_ret_from_sys_call | 425 | jmp int_ret_from_sys_call |
@@ -554,6 +547,7 @@ iret_label: | |||
554 | /* running with kernel gs */ | 547 | /* running with kernel gs */ |
555 | bad_iret: | 548 | bad_iret: |
556 | movq $-9999,%rdi /* better code? */ | 549 | movq $-9999,%rdi /* better code? */ |
550 | sti | ||
557 | jmp do_exit | 551 | jmp do_exit |
558 | .previous | 552 | .previous |
559 | 553 | ||
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 692c737feddb..02fc7fa0ea28 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S | |||
@@ -213,6 +213,11 @@ ENTRY(early_idt_handler) | |||
213 | cmpl $2,early_recursion_flag(%rip) | 213 | cmpl $2,early_recursion_flag(%rip) |
214 | jz 1f | 214 | jz 1f |
215 | call dump_stack | 215 | call dump_stack |
216 | #ifdef CONFIG_KALLSYMS | ||
217 | leaq early_idt_ripmsg(%rip),%rdi | ||
218 | movq 8(%rsp),%rsi # get rip again | ||
219 | call __print_symbol | ||
220 | #endif | ||
216 | 1: hlt | 221 | 1: hlt |
217 | jmp 1b | 222 | jmp 1b |
218 | early_recursion_flag: | 223 | early_recursion_flag: |
@@ -220,6 +225,8 @@ early_recursion_flag: | |||
220 | 225 | ||
221 | early_idt_msg: | 226 | early_idt_msg: |
222 | .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n" | 227 | .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n" |
228 | early_idt_ripmsg: | ||
229 | .asciz "RIP %s\n" | ||
223 | 230 | ||
224 | .code32 | 231 | .code32 |
225 | ENTRY(no_long_mode) | 232 | ENTRY(no_long_mode) |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 4282d72b2a26..ffed464e6b12 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -30,6 +30,9 @@ | |||
30 | #include <linux/mc146818rtc.h> | 30 | #include <linux/mc146818rtc.h> |
31 | #include <linux/acpi.h> | 31 | #include <linux/acpi.h> |
32 | #include <linux/sysdev.h> | 32 | #include <linux/sysdev.h> |
33 | #ifdef CONFIG_ACPI | ||
34 | #include <acpi/acpi_bus.h> | ||
35 | #endif | ||
33 | 36 | ||
34 | #include <asm/io.h> | 37 | #include <asm/io.h> |
35 | #include <asm/smp.h> | 38 | #include <asm/smp.h> |
@@ -47,6 +50,8 @@ static int no_timer_check; | |||
47 | 50 | ||
48 | int disable_timer_pin_1 __initdata; | 51 | int disable_timer_pin_1 __initdata; |
49 | 52 | ||
53 | int timer_over_8254 __initdata = 1; | ||
54 | |||
50 | /* Where if anywhere is the i8259 connect in external int mode */ | 55 | /* Where if anywhere is the i8259 connect in external int mode */ |
51 | static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; | 56 | static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; |
52 | 57 | ||
@@ -248,6 +253,20 @@ static int __init enable_ioapic_setup(char *str) | |||
248 | __setup("noapic", disable_ioapic_setup); | 253 | __setup("noapic", disable_ioapic_setup); |
249 | __setup("apic", enable_ioapic_setup); | 254 | __setup("apic", enable_ioapic_setup); |
250 | 255 | ||
256 | static int __init setup_disable_8254_timer(char *s) | ||
257 | { | ||
258 | timer_over_8254 = -1; | ||
259 | return 1; | ||
260 | } | ||
261 | static int __init setup_enable_8254_timer(char *s) | ||
262 | { | ||
263 | timer_over_8254 = 2; | ||
264 | return 1; | ||
265 | } | ||
266 | |||
267 | __setup("disable_8254_timer", setup_disable_8254_timer); | ||
268 | __setup("enable_8254_timer", setup_enable_8254_timer); | ||
269 | |||
251 | #include <asm/pci-direct.h> | 270 | #include <asm/pci-direct.h> |
252 | #include <linux/pci_ids.h> | 271 | #include <linux/pci_ids.h> |
253 | #include <linux/pci.h> | 272 | #include <linux/pci.h> |
@@ -260,6 +279,8 @@ __setup("apic", enable_ioapic_setup); | |||
260 | 279 | ||
261 | And another hack to disable the IOMMU on VIA chipsets. | 280 | And another hack to disable the IOMMU on VIA chipsets. |
262 | 281 | ||
282 | ... and others. Really should move this somewhere else. | ||
283 | |||
263 | Kludge-O-Rama. */ | 284 | Kludge-O-Rama. */ |
264 | void __init check_ioapic(void) | 285 | void __init check_ioapic(void) |
265 | { | 286 | { |
@@ -304,16 +325,20 @@ void __init check_ioapic(void) | |||
304 | #endif | 325 | #endif |
305 | /* RED-PEN skip them on mptables too? */ | 326 | /* RED-PEN skip them on mptables too? */ |
306 | return; | 327 | return; |
328 | |||
329 | /* This should be actually default, but | ||
330 | for 2.6.16 let's do it for ATI only where | ||
331 | it's really needed. */ | ||
307 | case PCI_VENDOR_ID_ATI: | 332 | case PCI_VENDOR_ID_ATI: |
308 | if (apic_runs_main_timer != 0) | 333 | if (timer_over_8254 == 1) { |
309 | break; | 334 | timer_over_8254 = 0; |
310 | printk(KERN_INFO | 335 | printk(KERN_INFO |
311 | "ATI board detected. Using APIC/PM timer.\n"); | 336 | "ATI board detected. Disabling timer routing over 8254.\n"); |
312 | apic_runs_main_timer = 1; | 337 | } |
313 | nohpet = 1; | ||
314 | return; | 338 | return; |
315 | } | 339 | } |
316 | 340 | ||
341 | |||
317 | /* No multi-function device? */ | 342 | /* No multi-function device? */ |
318 | type = read_pci_config_byte(num,slot,func, | 343 | type = read_pci_config_byte(num,slot,func, |
319 | PCI_HEADER_TYPE); | 344 | PCI_HEADER_TYPE); |
@@ -1757,6 +1782,8 @@ static inline void unlock_ExtINT_logic(void) | |||
1757 | * a wide range of boards and BIOS bugs. Fortunately only the timer IRQ | 1782 | * a wide range of boards and BIOS bugs. Fortunately only the timer IRQ |
1758 | * is so screwy. Thanks to Brian Perkins for testing/hacking this beast | 1783 | * is so screwy. Thanks to Brian Perkins for testing/hacking this beast |
1759 | * fanatically on his truly buggy board. | 1784 | * fanatically on his truly buggy board. |
1785 | * | ||
1786 | * FIXME: really need to revamp this for modern platforms only. | ||
1760 | */ | 1787 | */ |
1761 | static inline void check_timer(void) | 1788 | static inline void check_timer(void) |
1762 | { | 1789 | { |
@@ -1779,7 +1806,8 @@ static inline void check_timer(void) | |||
1779 | */ | 1806 | */ |
1780 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); | 1807 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); |
1781 | init_8259A(1); | 1808 | init_8259A(1); |
1782 | enable_8259A_irq(0); | 1809 | if (timer_over_8254 > 0) |
1810 | enable_8259A_irq(0); | ||
1783 | 1811 | ||
1784 | pin1 = find_isa_irq_pin(0, mp_INT); | 1812 | pin1 = find_isa_irq_pin(0, mp_INT); |
1785 | apic1 = find_isa_irq_apic(0, mp_INT); | 1813 | apic1 = find_isa_irq_apic(0, mp_INT); |
@@ -1834,7 +1862,7 @@ static inline void check_timer(void) | |||
1834 | } | 1862 | } |
1835 | printk(" failed.\n"); | 1863 | printk(" failed.\n"); |
1836 | 1864 | ||
1837 | if (nmi_watchdog) { | 1865 | if (nmi_watchdog == NMI_IO_APIC) { |
1838 | printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); | 1866 | printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); |
1839 | nmi_watchdog = 0; | 1867 | nmi_watchdog = 0; |
1840 | } | 1868 | } |
diff --git a/arch/x86_64/kernel/machine_kexec.c b/arch/x86_64/kernel/machine_kexec.c index 89fab51e20f4..25ac8a3faae6 100644 --- a/arch/x86_64/kernel/machine_kexec.c +++ b/arch/x86_64/kernel/machine_kexec.c | |||
@@ -140,7 +140,7 @@ static void load_segments(void) | |||
140 | "\tmovl %0,%%ss\n" | 140 | "\tmovl %0,%%ss\n" |
141 | "\tmovl %0,%%fs\n" | 141 | "\tmovl %0,%%fs\n" |
142 | "\tmovl %0,%%gs\n" | 142 | "\tmovl %0,%%gs\n" |
143 | : : "a" (__KERNEL_DS) | 143 | : : "a" (__KERNEL_DS) : "memory" |
144 | ); | 144 | ); |
145 | } | 145 | } |
146 | 146 | ||
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index dc49bfb6db0a..9013a90b5c2e 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c | |||
@@ -288,9 +288,9 @@ static int __init smp_read_mpc(struct mp_config_table *mpc) | |||
288 | 288 | ||
289 | memcpy(str,mpc->mpc_productid,12); | 289 | memcpy(str,mpc->mpc_productid,12); |
290 | str[12]=0; | 290 | str[12]=0; |
291 | printk(KERN_INFO "Product ID: %s ",str); | 291 | printk("Product ID: %s ",str); |
292 | 292 | ||
293 | printk(KERN_INFO "APIC at: 0x%X\n",mpc->mpc_lapic); | 293 | printk("APIC at: 0x%X\n",mpc->mpc_lapic); |
294 | 294 | ||
295 | /* save the local APIC address, it might be non-default */ | 295 | /* save the local APIC address, it might be non-default */ |
296 | if (!acpi_lapic) | 296 | if (!acpi_lapic) |
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 8be407a1f62d..5bf17e41cd2d 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -236,6 +236,7 @@ static void enable_lapic_nmi_watchdog(void) | |||
236 | { | 236 | { |
237 | if (nmi_active < 0) { | 237 | if (nmi_active < 0) { |
238 | nmi_watchdog = NMI_LOCAL_APIC; | 238 | nmi_watchdog = NMI_LOCAL_APIC; |
239 | touch_nmi_watchdog(); | ||
239 | setup_apic_nmi_watchdog(); | 240 | setup_apic_nmi_watchdog(); |
240 | } | 241 | } |
241 | } | 242 | } |
@@ -456,15 +457,17 @@ static DEFINE_PER_CPU(int, nmi_touch); | |||
456 | 457 | ||
457 | void touch_nmi_watchdog (void) | 458 | void touch_nmi_watchdog (void) |
458 | { | 459 | { |
459 | int i; | 460 | if (nmi_watchdog > 0) { |
461 | unsigned cpu; | ||
460 | 462 | ||
461 | /* | 463 | /* |
462 | * Tell other CPUs to reset their alert counters. We cannot | 464 | * Tell other CPUs to reset their alert counters. We cannot |
463 | * do it ourselves because the alert count increase is not | 465 | * do it ourselves because the alert count increase is not |
464 | * atomic. | 466 | * atomic. |
465 | */ | 467 | */ |
466 | for (i = 0; i < NR_CPUS; i++) | 468 | for_each_present_cpu (cpu) |
467 | per_cpu(nmi_touch, i) = 1; | 469 | per_cpu(nmi_touch, cpu) = 1; |
470 | } | ||
468 | 471 | ||
469 | touch_softlockup_watchdog(); | 472 | touch_softlockup_watchdog(); |
470 | } | 473 | } |
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index dd0718dc178b..0c3f052ba6ce 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c | |||
@@ -228,11 +228,6 @@ static inline int need_iommu(struct device *dev, unsigned long addr, size_t size | |||
228 | int mmu = high; | 228 | int mmu = high; |
229 | if (force_iommu) | 229 | if (force_iommu) |
230 | mmu = 1; | 230 | mmu = 1; |
231 | if (no_iommu) { | ||
232 | if (high) | ||
233 | panic("PCI-DMA: high address but no IOMMU.\n"); | ||
234 | mmu = 0; | ||
235 | } | ||
236 | return mmu; | 231 | return mmu; |
237 | } | 232 | } |
238 | 233 | ||
@@ -241,11 +236,6 @@ static inline int nonforced_iommu(struct device *dev, unsigned long addr, size_t | |||
241 | u64 mask = *dev->dma_mask; | 236 | u64 mask = *dev->dma_mask; |
242 | int high = addr + size >= mask; | 237 | int high = addr + size >= mask; |
243 | int mmu = high; | 238 | int mmu = high; |
244 | if (no_iommu) { | ||
245 | if (high) | ||
246 | panic("PCI-DMA: high address but no IOMMU.\n"); | ||
247 | mmu = 0; | ||
248 | } | ||
249 | return mmu; | 239 | return mmu; |
250 | } | 240 | } |
251 | 241 | ||
@@ -310,7 +300,7 @@ void gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int di | |||
310 | 300 | ||
311 | for (i = 0; i < nents; i++) { | 301 | for (i = 0; i < nents; i++) { |
312 | struct scatterlist *s = &sg[i]; | 302 | struct scatterlist *s = &sg[i]; |
313 | if (!s->dma_length) | 303 | if (!s->dma_length || !s->length) |
314 | break; | 304 | break; |
315 | dma_unmap_single(dev, s->dma_address, s->dma_length, dir); | 305 | dma_unmap_single(dev, s->dma_address, s->dma_length, dir); |
316 | } | 306 | } |
@@ -364,6 +354,7 @@ static int __dma_map_cont(struct scatterlist *sg, int start, int stopat, | |||
364 | 354 | ||
365 | BUG_ON(i > start && s->offset); | 355 | BUG_ON(i > start && s->offset); |
366 | if (i == start) { | 356 | if (i == start) { |
357 | *sout = *s; | ||
367 | sout->dma_address = iommu_bus_base; | 358 | sout->dma_address = iommu_bus_base; |
368 | sout->dma_address += iommu_page*PAGE_SIZE + s->offset; | 359 | sout->dma_address += iommu_page*PAGE_SIZE + s->offset; |
369 | sout->dma_length = s->length; | 360 | sout->dma_length = s->length; |
@@ -390,6 +381,7 @@ static inline int dma_map_cont(struct scatterlist *sg, int start, int stopat, | |||
390 | { | 381 | { |
391 | if (!need) { | 382 | if (!need) { |
392 | BUG_ON(stopat - start != 1); | 383 | BUG_ON(stopat - start != 1); |
384 | *sout = sg[start]; | ||
393 | sout->dma_length = sg[start].length; | 385 | sout->dma_length = sg[start].length; |
394 | return 0; | 386 | return 0; |
395 | } | 387 | } |
@@ -632,17 +624,13 @@ static int __init pci_iommu_init(void) | |||
632 | (agp_copy_info(agp_bridge, &info) < 0); | 624 | (agp_copy_info(agp_bridge, &info) < 0); |
633 | #endif | 625 | #endif |
634 | 626 | ||
635 | if (swiotlb) { | 627 | if (swiotlb) |
636 | no_iommu = 1; | ||
637 | return -1; | 628 | return -1; |
638 | } | 629 | |
639 | |||
640 | if (no_iommu || | 630 | if (no_iommu || |
641 | (!force_iommu && end_pfn <= MAX_DMA32_PFN) || | 631 | (!force_iommu && end_pfn <= MAX_DMA32_PFN) || |
642 | !iommu_aperture || | 632 | !iommu_aperture || |
643 | (no_agp && init_k8_gatt(&info) < 0)) { | 633 | (no_agp && init_k8_gatt(&info) < 0)) { |
644 | no_iommu = 1; | ||
645 | no_iommu_init(); | ||
646 | printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); | 634 | printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); |
647 | if (end_pfn > MAX_DMA32_PFN) { | 635 | if (end_pfn > MAX_DMA32_PFN) { |
648 | printk(KERN_ERR "WARNING more than 4GB of memory " | 636 | printk(KERN_ERR "WARNING more than 4GB of memory " |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 9435ab7d6fb8..aa55e3cec665 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -423,6 +423,12 @@ static __init void parse_cmdline_early (char ** cmdline_p) | |||
423 | else if(!memcmp(from, "elfcorehdr=", 11)) | 423 | else if(!memcmp(from, "elfcorehdr=", 11)) |
424 | elfcorehdr_addr = memparse(from+11, &from); | 424 | elfcorehdr_addr = memparse(from+11, &from); |
425 | #endif | 425 | #endif |
426 | |||
427 | #ifdef CONFIG_HOTPLUG_CPU | ||
428 | else if (!memcmp(from, "additional_cpus=", 16)) | ||
429 | setup_additional_cpus(from+16); | ||
430 | #endif | ||
431 | |||
426 | next_char: | 432 | next_char: |
427 | c = *(from++); | 433 | c = *(from++); |
428 | if (!c) | 434 | if (!c) |
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 67e4e28f4df8..66e98659d077 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
@@ -1152,8 +1152,6 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
1152 | setup_ioapic_dest(); | 1152 | setup_ioapic_dest(); |
1153 | #endif | 1153 | #endif |
1154 | 1154 | ||
1155 | time_init_gtod(); | ||
1156 | |||
1157 | check_nmi_watchdog(); | 1155 | check_nmi_watchdog(); |
1158 | } | 1156 | } |
1159 | 1157 | ||
@@ -1244,7 +1242,7 @@ void __cpu_die(unsigned int cpu) | |||
1244 | printk(KERN_ERR "CPU %u didn't die...\n", cpu); | 1242 | printk(KERN_ERR "CPU %u didn't die...\n", cpu); |
1245 | } | 1243 | } |
1246 | 1244 | ||
1247 | static __init int setup_additional_cpus(char *s) | 1245 | __init int setup_additional_cpus(char *s) |
1248 | { | 1246 | { |
1249 | return get_option(&s, &additional_cpus); | 1247 | return get_option(&s, &additional_cpus); |
1250 | } | 1248 | } |
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 3c58c30506a1..3080f84bf7b7 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -48,6 +48,8 @@ static void cpufreq_delayed_get(void); | |||
48 | extern void i8254_timer_resume(void); | 48 | extern void i8254_timer_resume(void); |
49 | extern int using_apic_timer; | 49 | extern int using_apic_timer; |
50 | 50 | ||
51 | static char *time_init_gtod(void); | ||
52 | |||
51 | DEFINE_SPINLOCK(rtc_lock); | 53 | DEFINE_SPINLOCK(rtc_lock); |
52 | DEFINE_SPINLOCK(i8253_lock); | 54 | DEFINE_SPINLOCK(i8253_lock); |
53 | 55 | ||
@@ -901,6 +903,7 @@ static struct irqaction irq0 = { | |||
901 | void __init time_init(void) | 903 | void __init time_init(void) |
902 | { | 904 | { |
903 | char *timename; | 905 | char *timename; |
906 | char *gtod; | ||
904 | 907 | ||
905 | #ifdef HPET_HACK_ENABLE_DANGEROUS | 908 | #ifdef HPET_HACK_ENABLE_DANGEROUS |
906 | if (!vxtime.hpet_address) { | 909 | if (!vxtime.hpet_address) { |
@@ -945,21 +948,19 @@ void __init time_init(void) | |||
945 | timename = "PIT"; | 948 | timename = "PIT"; |
946 | } | 949 | } |
947 | 950 | ||
948 | printk(KERN_INFO "time.c: Using %ld.%06ld MHz %s timer.\n", | 951 | vxtime.mode = VXTIME_TSC; |
949 | vxtime_hz / 1000000, vxtime_hz % 1000000, timename); | 952 | gtod = time_init_gtod(); |
953 | |||
954 | printk(KERN_INFO "time.c: Using %ld.%06ld MHz WALL %s GTOD %s timer.\n", | ||
955 | vxtime_hz / 1000000, vxtime_hz % 1000000, timename, gtod); | ||
950 | printk(KERN_INFO "time.c: Detected %d.%03d MHz processor.\n", | 956 | printk(KERN_INFO "time.c: Detected %d.%03d MHz processor.\n", |
951 | cpu_khz / 1000, cpu_khz % 1000); | 957 | cpu_khz / 1000, cpu_khz % 1000); |
952 | vxtime.mode = VXTIME_TSC; | ||
953 | vxtime.quot = (1000000L << 32) / vxtime_hz; | 958 | vxtime.quot = (1000000L << 32) / vxtime_hz; |
954 | vxtime.tsc_quot = (1000L << 32) / cpu_khz; | 959 | vxtime.tsc_quot = (1000L << 32) / cpu_khz; |
955 | vxtime.last_tsc = get_cycles_sync(); | 960 | vxtime.last_tsc = get_cycles_sync(); |
956 | setup_irq(0, &irq0); | 961 | setup_irq(0, &irq0); |
957 | 962 | ||
958 | set_cyc2ns_scale(cpu_khz); | 963 | set_cyc2ns_scale(cpu_khz); |
959 | |||
960 | #ifndef CONFIG_SMP | ||
961 | time_init_gtod(); | ||
962 | #endif | ||
963 | } | 964 | } |
964 | 965 | ||
965 | /* | 966 | /* |
@@ -981,9 +982,9 @@ __cpuinit int unsynchronized_tsc(void) | |||
981 | } | 982 | } |
982 | 983 | ||
983 | /* | 984 | /* |
984 | * Decide after all CPUs are booted what mode gettimeofday should use. | 985 | * Decide what mode gettimeofday should use. |
985 | */ | 986 | */ |
986 | void __init time_init_gtod(void) | 987 | __init static char *time_init_gtod(void) |
987 | { | 988 | { |
988 | char *timetype; | 989 | char *timetype; |
989 | 990 | ||
@@ -1011,8 +1012,7 @@ void __init time_init_gtod(void) | |||
1011 | timetype = hpet_use_timer ? "HPET/TSC" : "PIT/TSC"; | 1012 | timetype = hpet_use_timer ? "HPET/TSC" : "PIT/TSC"; |
1012 | vxtime.mode = VXTIME_TSC; | 1013 | vxtime.mode = VXTIME_TSC; |
1013 | } | 1014 | } |
1014 | 1015 | return timetype; | |
1015 | printk(KERN_INFO "time.c: Using %s based timekeeping.\n", timetype); | ||
1016 | } | 1016 | } |
1017 | 1017 | ||
1018 | __setup("report_lost_ticks", time_setup); | 1018 | __setup("report_lost_ticks", time_setup); |
@@ -1327,8 +1327,7 @@ static int __init nohpet_setup(char *s) | |||
1327 | 1327 | ||
1328 | __setup("nohpet", nohpet_setup); | 1328 | __setup("nohpet", nohpet_setup); |
1329 | 1329 | ||
1330 | 1330 | int __init notsc_setup(char *s) | |
1331 | static int __init notsc_setup(char *s) | ||
1332 | { | 1331 | { |
1333 | notsc = 1; | 1332 | notsc = 1; |
1334 | return 0; | 1333 | return 0; |
diff --git a/arch/x86_64/mm/k8topology.c b/arch/x86_64/mm/k8topology.c index a5663e0bb01c..dd60e71fdba6 100644 --- a/arch/x86_64/mm/k8topology.c +++ b/arch/x86_64/mm/k8topology.c | |||
@@ -155,7 +155,7 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) | |||
155 | if (!found) | 155 | if (!found) |
156 | return -1; | 156 | return -1; |
157 | 157 | ||
158 | memnode_shift = compute_hash_shift(nodes, numnodes); | 158 | memnode_shift = compute_hash_shift(nodes, 8); |
159 | if (memnode_shift < 0) { | 159 | if (memnode_shift < 0) { |
160 | printk(KERN_ERR "No NUMA node hash function found. Contact maintainer\n"); | 160 | printk(KERN_ERR "No NUMA node hash function found. Contact maintainer\n"); |
161 | return -1; | 161 | return -1; |
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c index 6ef9f9a76235..22e51beee8d3 100644 --- a/arch/x86_64/mm/numa.c +++ b/arch/x86_64/mm/numa.c | |||
@@ -351,7 +351,7 @@ void __init init_cpu_to_node(void) | |||
351 | continue; | 351 | continue; |
352 | if (apicid_to_node[apicid] == NUMA_NO_NODE) | 352 | if (apicid_to_node[apicid] == NUMA_NO_NODE) |
353 | continue; | 353 | continue; |
354 | cpu_to_node[i] = apicid_to_node[apicid]; | 354 | numa_set_node(i,apicid_to_node[apicid]); |
355 | } | 355 | } |
356 | } | 356 | } |
357 | 357 | ||
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c index cd25300726fc..482c25767369 100644 --- a/arch/x86_64/mm/srat.c +++ b/arch/x86_64/mm/srat.c | |||
@@ -228,7 +228,8 @@ static int nodes_cover_memory(void) | |||
228 | } | 228 | } |
229 | 229 | ||
230 | e820ram = end_pfn - e820_hole_size(0, end_pfn); | 230 | e820ram = end_pfn - e820_hole_size(0, end_pfn); |
231 | if (pxmram < e820ram) { | 231 | /* We seem to lose 3 pages somewhere. Allow a bit of slack. */ |
232 | if ((long)(e820ram - pxmram) >= 1*1024*1024) { | ||
232 | printk(KERN_ERR | 233 | printk(KERN_ERR |
233 | "SRAT: PXMs only cover %luMB of your %luMB e820 RAM. Not used.\n", | 234 | "SRAT: PXMs only cover %luMB of your %luMB e820 RAM. Not used.\n", |
234 | (pxmram << PAGE_SHIFT) >> 20, | 235 | (pxmram << PAGE_SHIFT) >> 20, |
@@ -270,7 +271,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
270 | return -1; | 271 | return -1; |
271 | } | 272 | } |
272 | 273 | ||
273 | memnode_shift = compute_hash_shift(nodes, nodes_weight(nodes_parsed)); | 274 | memnode_shift = compute_hash_shift(nodes, MAX_NUMNODES); |
274 | if (memnode_shift < 0) { | 275 | if (memnode_shift < 0) { |
275 | printk(KERN_ERR | 276 | printk(KERN_ERR |
276 | "SRAT: No NUMA node hash function found. Contact maintainer\n"); | 277 | "SRAT: No NUMA node hash function found. Contact maintainer\n"); |