Virtual SMP support for the 34K.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user