From 340ee4b98c0543b5632cac975a7449a2d28762d8 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 17 Aug 2005 17:44:08 +0000 Subject: Virtual SMP support for the 34K. Signed-off-by: Ralf Baechle --- arch/mips/kernel/vpe.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'arch/mips/kernel/vpe.c') diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 6bf42ba08f09..97fefcc9dbe7 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c @@ -32,7 +32,7 @@ * mknod /dev/vpe0 c 63 0 * mknod /dev/vpe1 c 63 1 */ - +#include #include #include #include @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -697,7 +698,7 @@ int vpe_run(vpe_t * v) 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) { @@ -760,7 +761,7 @@ int vpe_run(vpe_t * v) 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)); @@ -1134,7 +1135,7 @@ int vpe_free(vpe_handle vpe) 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); @@ -1145,7 +1146,7 @@ int vpe_free(vpe_handle vpe) v->state = VPE_STATE_UNUSED; - write_c0_mvpcontrol(read_c0_mvpcontrol() & ~MVPCONTROL_VPC); + clear_c0_mvpcontrol(MVPCONTROL_VPC); evpe(evpe_flags); return 0; @@ -1191,7 +1192,7 @@ static int __init vpe_module_init(void) dvpe(); /* Put MVPE's into 'configuration state' */ - write_c0_mvpcontrol(read_c0_mvpcontrol() | MVPCONTROL_VPC); + set_c0_mvpcontrol(MVPCONTROL_VPC); /* dump_mtregs(); */ @@ -1270,7 +1271,7 @@ static int __init vpe_module_init(void) } /* release config state */ - write_c0_mvpcontrol(read_c0_mvpcontrol() & ~MVPCONTROL_VPC); + clear_c0_mvpcontrol(MVPCONTROL_VPC); return 0; } -- cgit v1.2.3