diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-09-08 11:24:16 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-09-08 11:24:16 -0300 |
commit | 376027f2a3888ef3dec73ee41f85d90e51162d78 (patch) | |
tree | ac9a9030d31cadc92fdc4145a3d9bf379064721f /arch/x86/kernel/tsc.c | |
parent | e5fd91f1ef340da553f7a79da9540c3db711c937 (diff) |
Add TuxOnIce support
Diffstat (limited to 'arch/x86/kernel/tsc.c')
-rw-r--r-- | arch/x86/kernel/tsc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 7437b41f6..1b513e093 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -12,6 +12,7 @@ #include <linux/percpu.h> #include <linux/timex.h> #include <linux/static_key.h> +#include <linux/mm.h> #include <asm/hpet.h> #include <asm/timer.h> @@ -195,6 +196,10 @@ static void cyc2ns_init(int cpu) c2n->head = c2n->data; c2n->tail = c2n->data; + + // Don't let TuxOnIce make data RO - a secondary CPU will cause a triple fault + // if it loads microcode, which then does a printk, which may end up invoking cycles_2_ns + SetPageTOI_Untracked(virt_to_page(c2n)); } static inline unsigned long long cycles_2_ns(unsigned long long cyc) |