diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-19 09:00:35 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-19 09:00:35 +0100 |
commit | 72c26c9a26ea7f2f3d14f162c2ebb07805f724ea (patch) | |
tree | bf1b4bc0b69f96c79474f9edb9cf0e811c95f2dc /arch/x86/kernel/paravirt.c | |
parent | 37bd824a35a60abc73e5fa8816bd5f50c913d69b (diff) | |
parent | ba95fd47d177d46743ad94055908d22840370e06 (diff) |
Merge branch 'linus' into tracing/blktrace
Conflicts:
block/blktrace.c
Semantic merge:
kernel/trace/blktrace.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/paravirt.c')
-rw-r--r-- | arch/x86/kernel/paravirt.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index e4c8fb60887..c6520a4e85d 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c @@ -268,6 +268,32 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void) return __get_cpu_var(paravirt_lazy_mode); } +void arch_flush_lazy_mmu_mode(void) +{ + preempt_disable(); + + if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU) { + WARN_ON(preempt_count() == 1); + arch_leave_lazy_mmu_mode(); + arch_enter_lazy_mmu_mode(); + } + + preempt_enable(); +} + +void arch_flush_lazy_cpu_mode(void) +{ + preempt_disable(); + + if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU) { + WARN_ON(preempt_count() == 1); + arch_leave_lazy_cpu_mode(); + arch_enter_lazy_cpu_mode(); + } + + preempt_enable(); +} + struct pv_info pv_info = { .name = "bare hardware", .paravirt_enabled = 0, |