* mknod /dev/vpe0 c 63 0
* mknod /dev/vpe1 c 63 1
*/
-
+#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/poll.h>
#include <linux/bootmem.h>
#include <asm/mipsregs.h>
+#include <asm/mipsmtregs.h>
#include <asm/cacheflush.h>
#include <asm/atomic.h>
#include <asm/cpu.h>
dvpe();
/* Put MVPE's into 'configuration state' */
- write_c0_mvpcontrol(read_c0_mvpcontrol() | MVPCONTROL_VPC);
+ set_c0_mvpcontrol(MVPCONTROL_VPC);
if (!list_empty(&v->tc)) {
if ((t = list_entry(v->tc.next, struct tc, tc)) == NULL) {
write_vpe_c0_cause(0);
/* take system out of configuration state */
- write_c0_mvpcontrol(read_c0_mvpcontrol() & ~MVPCONTROL_VPC);
+ clear_c0_mvpcontrol(MVPCONTROL_VPC);
/* clear interrupts enabled IE, ERL, EXL, and KSU from c0 status */
write_vpe_c0_status(read_vpe_c0_status() & ~(ST0_ERL | ST0_KSU | ST0_IE | ST0_EXL));
evpe_flags = dvpe();
/* Put MVPE's into 'configuration state' */
- write_c0_mvpcontrol(read_c0_mvpcontrol() | MVPCONTROL_VPC);
+ set_c0_mvpcontrol(MVPCONTROL_VPC);
settc(t->index);
write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() & ~VPECONF0_VPA);
v->state = VPE_STATE_UNUSED;
- write_c0_mvpcontrol(read_c0_mvpcontrol() & ~MVPCONTROL_VPC);
+ clear_c0_mvpcontrol(MVPCONTROL_VPC);
evpe(evpe_flags);
return 0;
dvpe();
/* Put MVPE's into 'configuration state' */
- write_c0_mvpcontrol(read_c0_mvpcontrol() | MVPCONTROL_VPC);
+ set_c0_mvpcontrol(MVPCONTROL_VPC);
/* dump_mtregs(); */
}
/* release config state */
- write_c0_mvpcontrol(read_c0_mvpcontrol() & ~MVPCONTROL_VPC);
+ clear_c0_mvpcontrol(MVPCONTROL_VPC);
return 0;
}