Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356272
b: refs/heads/master
c: 086fc8f
h: refs/heads/master
v: v3
  • Loading branch information
Fenghua Yu authored and H. Peter Anvin committed Jan 31, 2013
1 parent 55c214c commit 8c90985
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 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: e666dfa273db1b12711eaec91facac5fec2ec851
refs/heads/master: 086fc8f8037bf16f55f82c66b26a8b834f7349ec
18 changes: 12 additions & 6 deletions trunk/arch/x86/include/asm/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,20 @@ static inline void __native_flush_tlb(void)
native_write_cr3(native_read_cr3());
}

static inline void __native_flush_tlb_global_irq_disabled(void)
{
unsigned long cr4;

cr4 = native_read_cr4();
/* clear PGE */
native_write_cr4(cr4 & ~X86_CR4_PGE);
/* write old PGE again and flush TLBs */
native_write_cr4(cr4);
}

static inline void __native_flush_tlb_global(void)
{
unsigned long flags;
unsigned long cr4;

/*
* Read-modify-write to CR4 - protect it from preemption and
Expand All @@ -32,11 +42,7 @@ static inline void __native_flush_tlb_global(void)
*/
raw_local_irq_save(flags);

cr4 = native_read_cr4();
/* clear PGE */
native_write_cr4(cr4 & ~X86_CR4_PGE);
/* write old PGE again and flush TLBs */
native_write_cr4(cr4);
__native_flush_tlb_global_irq_disabled();

raw_local_irq_restore(flags);
}
Expand Down

0 comments on commit 8c90985

Please sign in to comment.