Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131464
b: refs/heads/master
c: d85cf93
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge authored and Thomas Gleixner committed Feb 12, 2009
1 parent bf64989 commit 2641430
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be03d9e8022030c16abf534e33e185bfc3d40eef
refs/heads/master: d85cf93da66977dbc645352be1b2084a659d8a0b
17 changes: 2 additions & 15 deletions trunk/arch/x86/include/asm/paravirt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1352,14 +1352,7 @@ static inline void arch_leave_lazy_cpu_mode(void)
PVOP_VCALL0(pv_cpu_ops.lazy_mode.leave);
}

static inline void arch_flush_lazy_cpu_mode(void)
{
if (unlikely(paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU)) {
arch_leave_lazy_cpu_mode();
arch_enter_lazy_cpu_mode();
}
}

void arch_flush_lazy_cpu_mode(void);

#define __HAVE_ARCH_ENTER_LAZY_MMU_MODE
static inline void arch_enter_lazy_mmu_mode(void)
Expand All @@ -1372,13 +1365,7 @@ static inline void arch_leave_lazy_mmu_mode(void)
PVOP_VCALL0(pv_mmu_ops.lazy_mode.leave);
}

static inline void arch_flush_lazy_mmu_mode(void)
{
if (unlikely(paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU)) {
arch_leave_lazy_mmu_mode();
arch_enter_lazy_mmu_mode();
}
}
void arch_flush_lazy_mmu_mode(void);

static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
unsigned long phys, pgprot_t flags)
Expand Down
24 changes: 24 additions & 0 deletions trunk/arch/x86/kernel/paravirt.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,30 @@ 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) {
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) {
arch_leave_lazy_cpu_mode();
arch_enter_lazy_cpu_mode();
}

preempt_enable();
}

struct pv_info pv_info = {
.name = "bare hardware",
.paravirt_enabled = 0,
Expand Down

0 comments on commit 2641430

Please sign in to comment.