Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73858
b: refs/heads/master
c: 7c3a622
h: refs/heads/master
v: v3
  • Loading branch information
Nigel Stephens authored and Ralf Baechle committed Nov 15, 2007
1 parent 95b11a9 commit 8bed1a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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: 8dfa741f146b39eb59ef2094e03f47079ca99eb0
refs/heads/master: 7c3a622d9c8e88117a8d647756827852dd8c8432
14 changes: 10 additions & 4 deletions trunk/arch/mips/kernel/vpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ static void cleanup_tc(struct tc *tc)
write_tc_c0_tcstatus(tmp);

write_tc_c0_tchalt(TCHALT_H);
mips_ihb();

/* bind it to anything other than VPE1 */
// write_tc_c0_tcbind(read_tc_c0_tcbind() & ~TCBIND_CURVPE); // | TCBIND_CURVPE
Expand Down Expand Up @@ -1235,9 +1236,12 @@ int vpe_free(vpe_handle vpe)
settc(t->index);
write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() & ~VPECONF0_VPA);

/* mark the TC unallocated and halt'ed */
write_tc_c0_tcstatus(read_tc_c0_tcstatus() & ~TCSTATUS_A);
/* halt the TC */
write_tc_c0_tchalt(TCHALT_H);
mips_ihb();

/* mark the TC unallocated */
write_tc_c0_tcstatus(read_tc_c0_tcstatus() & ~TCSTATUS_A);

v->state = VPE_STATE_UNUSED;

Expand Down Expand Up @@ -1533,14 +1537,16 @@ static int __init vpe_module_init(void)
t->pvpe = get_vpe(0); /* set the parent vpe */
}

/* halt the TC */
write_tc_c0_tchalt(TCHALT_H);
mips_ihb();

tmp = read_tc_c0_tcstatus();

/* mark not activated and not dynamically allocatable */
tmp &= ~(TCSTATUS_A | TCSTATUS_DA);
tmp |= TCSTATUS_IXMT; /* interrupt exempt */
write_tc_c0_tcstatus(tmp);

write_tc_c0_tchalt(TCHALT_H);
}
}

Expand Down

0 comments on commit 8bed1a7

Please sign in to comment.