Skip to content

Commit

Permalink
CRIS: Dont flush kernel protected pages when modifying $pid.
Browse files Browse the repository at this point in the history
Signed-off-by: Edgar E. Iglesias <[email protected]>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6161 c046a42c-6fe2-441c-8c8c-71466251a162
  • Loading branch information
edgar_igl committed Jan 4, 2009
1 parent bf91ada commit 80e1b26
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions target-cris/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void cris_mmu_flush_pid(CPUState *env, uint32_t pid)
unsigned int idx;
uint32_t lo, hi;
uint32_t tlb_vpn;
int tlb_pid, tlb_g, tlb_v, tlb_k;
int tlb_pid, tlb_g, tlb_v;
unsigned int set;
unsigned int mmu;

Expand All @@ -311,11 +311,8 @@ void cris_mmu_flush_pid(CPUState *env, uint32_t pid)
tlb_pid = EXTRACT_FIELD(hi, 0, 7);
tlb_g = EXTRACT_FIELD(lo, 4, 4);
tlb_v = EXTRACT_FIELD(lo, 3, 3);
tlb_k = EXTRACT_FIELD(lo, 2, 2);

/* Kernel protected areas need to be flushed
as well. */
if (tlb_v && !tlb_g && (tlb_pid == pid || tlb_k)) {
if (tlb_v && !tlb_g && (tlb_pid == pid)) {
vaddr = tlb_vpn << TARGET_PAGE_BITS;
D(fprintf(logfile,
"flush pid=%x vaddr=%x\n",
Expand Down

0 comments on commit 80e1b26

Please sign in to comment.