Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145814
b: refs/heads/master
c: 2829b44
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge committed Mar 30, 2009
1 parent 4b33aeb commit be00e14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 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: 224101ed69d3fbb486868e0f6e0f9fa37302efb4
refs/heads/master: 2829b449276aed45f3d649efb21e3418e39dd5d1
7 changes: 4 additions & 3 deletions trunk/arch/x86/kernel/paravirt.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,13 @@ static DEFINE_PER_CPU(enum paravirt_lazy_mode, paravirt_lazy_mode) = PARAVIRT_LA
static inline void enter_lazy(enum paravirt_lazy_mode mode)
{
BUG_ON(__get_cpu_var(paravirt_lazy_mode) != PARAVIRT_LAZY_NONE);
BUG_ON(preemptible());

__get_cpu_var(paravirt_lazy_mode) = mode;
}

static void leave_lazy(enum paravirt_lazy_mode mode)
{
BUG_ON(__get_cpu_var(paravirt_lazy_mode) != mode);
BUG_ON(preemptible());

__get_cpu_var(paravirt_lazy_mode) = PARAVIRT_LAZY_NONE;
}
Expand All @@ -272,6 +270,8 @@ void paravirt_leave_lazy_mmu(void)

void paravirt_start_context_switch(struct task_struct *prev)
{
BUG_ON(preemptible());

if (percpu_read(paravirt_lazy_mode) == PARAVIRT_LAZY_MMU) {
arch_leave_lazy_mmu_mode();
set_ti_thread_flag(task_thread_info(prev), TIF_LAZY_MMU_UPDATES);
Expand All @@ -281,6 +281,8 @@ void paravirt_start_context_switch(struct task_struct *prev)

void paravirt_end_context_switch(struct task_struct *next)
{
BUG_ON(preemptible());

leave_lazy(PARAVIRT_LAZY_CPU);

if (test_and_clear_ti_thread_flag(task_thread_info(next), TIF_LAZY_MMU_UPDATES))
Expand All @@ -300,7 +302,6 @@ 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();
}
Expand Down
8 changes: 1 addition & 7 deletions trunk/arch/x86/xen/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,6 @@ void set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags)
void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pteval)
{
/* updates to init_mm may be done without lock */
if (mm == &init_mm)
preempt_disable();

ADD_STATS(set_pte_at, 1);
// ADD_STATS(set_pte_at_pinned, xen_page_pinned(ptep));
ADD_STATS(set_pte_at_current, mm == current->mm);
Expand All @@ -443,9 +439,7 @@ void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
}
xen_set_pte(ptep, pteval);

out:
if (mm == &init_mm)
preempt_enable();
out: return;
}

pte_t xen_ptep_modify_prot_start(struct mm_struct *mm,
Expand Down

0 comments on commit be00e14

Please sign in to comment.