summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/vpe.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-08-17 17:44:08 +0000
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 19:32:10 +0100
commit340ee4b98c0543b5632cac975a7449a2d28762d8 (patch)
tree94b7315d53d6eadd145c8691f0a9925f5ae389f5 /arch/mips/kernel/vpe.c
parentd03d0a57754cb820d318d2234c60b728eb38a94d (diff)
Virtual SMP support for the 34K.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/vpe.c')
-rw-r--r--arch/mips/kernel/vpe.c15
1 files changed, 8 insertions, 7 deletions
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 <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/fs.h>
@@ -49,6 +49,7 @@
#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>
@@ -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;
}