Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a2edea9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 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
parents f589b86d 17d57a92
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,7 @@
#include <asm/nmi.h>
#include <asm/nmi.h>
#include <asm/hw_irq.h>
#include <asm/hw_irq.h>
#include <asm/apic.h>
#include <asm/apic.h>
#include <asm/hpet.h>
#include <linux/kdebug.h>
#include <linux/kdebug.h>
#include <asm/smp.h>
#include <asm/smp.h>


@@ -139,6 +140,9 @@ void machine_crash_shutdown(struct pt_regs *regs)
	lapic_shutdown();
	lapic_shutdown();
#if defined(CONFIG_X86_IO_APIC)
#if defined(CONFIG_X86_IO_APIC)
	disable_IO_APIC();
	disable_IO_APIC();
#endif
#ifdef CONFIG_HPET_TIMER
	hpet_disable();
#endif
#endif
	crash_save_cpu(regs, safe_smp_processor_id());
	crash_save_cpu(regs, safe_smp_processor_id());
}
}
+6 −6
Original line number Original line Diff line number Diff line
@@ -193,6 +193,12 @@ default_entry:
	jb 10b
	jb 10b
	movl %edi,(init_pg_tables_end - __PAGE_OFFSET)
	movl %edi,(init_pg_tables_end - __PAGE_OFFSET)


	/* Do an early initialization of the fixmap area */
	movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
	movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax
	addl $0x007, %eax			/* 0x007 = PRESENT+RW+USER */
	movl %eax, 4092(%edx)

	xorl %ebx,%ebx				/* This is the boot CPU (BSP) */
	xorl %ebx,%ebx				/* This is the boot CPU (BSP) */
	jmp 3f
	jmp 3f
/*
/*
@@ -208,12 +214,6 @@ default_entry:
.section .init.text,"ax",@progbits
.section .init.text,"ax",@progbits
#endif
#endif


	/* Do an early initialization of the fixmap area */
	movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
	movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax
	addl $0x007, %eax			/* 0x007 = PRESENT+RW+USER */
	movl %eax, 4092(%edx)

#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
ENTRY(startup_32_smp)
ENTRY(startup_32_smp)
	cld
	cld
+14 −0
Original line number Original line Diff line number Diff line
@@ -446,6 +446,20 @@ static __init int hpet_late_init(void)
}
}
fs_initcall(hpet_late_init);
fs_initcall(hpet_late_init);


void hpet_disable(void)
{
	if (is_hpet_capable()) {
		unsigned long cfg = hpet_readl(HPET_CFG);

		if (hpet_legacy_int_enabled) {
			cfg &= ~HPET_CFG_LEGACY;
			hpet_legacy_int_enabled = 0;
		}
		cfg &= ~HPET_CFG_ENABLE;
		hpet_writel(cfg, HPET_CFG);
	}
}

#ifdef CONFIG_HPET_EMULATE_RTC
#ifdef CONFIG_HPET_EMULATE_RTC


/* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET
/* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET
+4 −0
Original line number Original line Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/reboot.h>
#include <linux/reboot.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/apic.h>
#include <asm/apic.h>
#include <asm/hpet.h>
#include <asm/desc.h>
#include <asm/desc.h>
#include "mach_reboot.h"
#include "mach_reboot.h"
#include <asm/reboot_fixups.h>
#include <asm/reboot_fixups.h>
@@ -326,6 +327,9 @@ static void native_machine_shutdown(void)
#ifdef CONFIG_X86_IO_APIC
#ifdef CONFIG_X86_IO_APIC
	disable_IO_APIC();
	disable_IO_APIC();
#endif
#endif
#ifdef CONFIG_HPET_TIMER
	hpet_disable();
#endif
}
}


void __attribute__((weak)) mach_reboot_fixups(void)
void __attribute__((weak)) mach_reboot_fixups(void)
+4 −0
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
#include <asm/pgtable.h>
#include <asm/pgtable.h>
#include <asm/tlbflush.h>
#include <asm/tlbflush.h>
#include <asm/apic.h>
#include <asm/apic.h>
#include <asm/hpet.h>
#include <asm/gart.h>
#include <asm/gart.h>


/*
/*
@@ -113,6 +114,9 @@ void machine_shutdown(void)


	disable_IO_APIC();
	disable_IO_APIC();


#ifdef CONFIG_HPET_TIMER
	hpet_disable();
#endif
	local_irq_restore(flags);
	local_irq_restore(flags);


	pci_iommu_shutdown();
	pci_iommu_shutdown();
Loading