History

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 x86-32 early fixmap initialization. x86: disable hpet legacy replacement for kdump x86: disable hpet on shutdown

Linus Torvalds committed 18 years ago

Commit 1a2edea2 parents f589b86 17d57a96 files · +33 −6Browse files

Unified · Split

6 files
  1. arch/x86/kernel/crash.c +4 −0
  2. arch/x86/kernel/head_32.S +6 −6
  3. arch/x86/kernel/hpet.c +14 −0
  4. arch/x86/kernel/reboot_32.c +4 −0
  5. arch/x86/kernel/reboot_64.c +4 −0
  6. include/asm-x86/hpet.h +1 −0
arch/x86/kernel/crash.c+4−0
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222 #include <asm/nmi.h>
2323 #include <asm/hw_irq.h>
2424 #include <asm/apic.h>
25+#include <asm/hpet.h>
2526 #include <linux/kdebug.h>
2627 #include <asm/smp.h>
2728
@@ -139,6 +140,9 @@ void machine_crash_shutdown(struct pt_regs *regs) · 111 unmodified lines
139140 lapic_shutdown();
140141 #if defined(CONFIG_X86_IO_APIC)
141142 disable_IO_APIC();
143+#endif
144+#ifdef CONFIG_HPET_TIMER
145+ hpet_disable();
142146 #endif
143147 crash_save_cpu(regs, safe_smp_processor_id());
144148 }
arch/x86/kernel/head_32.S+6−6
@@ -193,6 +193,12 @@ default_entry: · 192 unmodified lines
193193 jb 10b
194194 movl %edi,(init_pg_tables_end - __PAGE_OFFSET)
195195
196+ /* Do an early initialization of the fixmap area */
197+ movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
198+ movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax
199+ addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */
200+ movl %eax, 4092(%edx)
201+
196202 xorl %ebx,%ebx /* This is the boot CPU (BSP) */
197203 jmp 3f
198204 /*
@@ -208,12 +214,6 @@ default_entry: · 9 unmodified lines
208214 .section .init.text,"ax",@progbits
209215 #endif
210216
211− /* Do an early initialization of the fixmap area */
212− movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
213− movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax
214− addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */
215− movl %eax, 4092(%edx)
216−
217217 #ifdef CONFIG_SMP
218218 ENTRY(startup_32_smp)
219219 cld
arch/x86/kernel/hpet.c+14−0
@@ -446,6 +446,20 @@ static __init int hpet_late_init(void) · 445 unmodified lines
446446 }
447447 fs_initcall(hpet_late_init);
448448
449+void hpet_disable(void)
450+{
451+ if (is_hpet_capable()) {
452+ unsigned long cfg = hpet_readl(HPET_CFG);
453+
454+ if (hpet_legacy_int_enabled) {
455+ cfg &= ~HPET_CFG_LEGACY;
456+ hpet_legacy_int_enabled = 0;
457+ }
458+ cfg &= ~HPET_CFG_ENABLE;
459+ hpet_writel(cfg, HPET_CFG);
460+ }
461+}
462+
449463 #ifdef CONFIG_HPET_EMULATE_RTC
450464
451465 /* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET
arch/x86/kernel/reboot_32.c+4−0
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #include <linux/reboot.h>
1212 #include <asm/uaccess.h>
1313 #include <asm/apic.h>
14+#include <asm/hpet.h>
1415 #include <asm/desc.h>
1516 #include "mach_reboot.h"
1617 #include <asm/reboot_fixups.h>
@@ -326,6 +327,9 @@ static void native_machine_shutdown(void) · 309 unmodified lines
326327 #ifdef CONFIG_X86_IO_APIC
327328 disable_IO_APIC();
328329 #endif
330+#ifdef CONFIG_HPET_TIMER
331+ hpet_disable();
332+#endif
329333 }
330334
331335 void __attribute__((weak)) mach_reboot_fixups(void)
arch/x86/kernel/reboot_64.c+4−0
@@ -17,6 +17,7 @@ · 16 unmodified lines
1717 #include <asm/pgtable.h>
1818 #include <asm/tlbflush.h>
1919 #include <asm/apic.h>
20+#include <asm/hpet.h>
2021 #include <asm/gart.h>
2122
2223 /*
@@ -113,6 +114,9 @@ void machine_shutdown(void) · 90 unmodified lines
113114
114115 disable_IO_APIC();
115116
117+#ifdef CONFIG_HPET_TIMER
118+ hpet_disable();
119+#endif
116120 local_irq_restore(flags);
117121
118122 pci_iommu_shutdown();
include/asm-x86/hpet.h+1−0
@@ -61,6 +61,7 @@ extern unsigned long force_hpet_address; · 60 unmodified lines
6161 extern int hpet_force_user;
6262 extern int is_hpet_enabled(void);
6363 extern int hpet_enable(void);
64+extern void hpet_disable(void);
6465 extern unsigned long hpet_readl(unsigned long a);
6566 extern void force_hpet_resume(void);
6667