Commit 53787013 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Jeremy Fitzhardinge

paravirt: unstatic leave_mm

Make globally leave_mm visible, specifically so that Xen can use it to
shoot-down lazy uses of cr3.
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
parent 03f0c2f9
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <asm/mtrr.h> #include <asm/mtrr.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/mmu_context.h>
#include <mach_apic.h> #include <mach_apic.h>
/* /*
...@@ -249,13 +250,13 @@ static unsigned long flush_va; ...@@ -249,13 +250,13 @@ static unsigned long flush_va;
static DEFINE_SPINLOCK(tlbstate_lock); static DEFINE_SPINLOCK(tlbstate_lock);
/* /*
* We cannot call mmdrop() because we are in interrupt context, * We cannot call mmdrop() because we are in interrupt context,
* instead update mm->cpu_vm_mask. * instead update mm->cpu_vm_mask.
* *
* We need to reload %cr3 since the page tables may be going * We need to reload %cr3 since the page tables may be going
* away from under us.. * away from under us..
*/ */
static inline void leave_mm (unsigned long cpu) void leave_mm(unsigned long cpu)
{ {
if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK) if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK)
BUG(); BUG();
......
...@@ -32,6 +32,8 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) ...@@ -32,6 +32,8 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
#endif #endif
} }
void leave_mm(unsigned long cpu);
static inline void switch_mm(struct mm_struct *prev, static inline void switch_mm(struct mm_struct *prev,
struct mm_struct *next, struct mm_struct *next,
struct task_struct *tsk) struct task_struct *tsk)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment