diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-08-17 13:44:08 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:32:10 -0400 |
commit | 340ee4b98c0543b5632cac975a7449a2d28762d8 (patch) | |
tree | 94b7315d53d6eadd145c8691f0a9925f5ae389f5 /arch/mips/kernel/vpe.c | |
parent | d03d0a57754cb820d318d2234c60b728eb38a94d (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.c | 15 |
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 @@ | |||
32 | * mknod /dev/vpe0 c 63 0 | 32 | * mknod /dev/vpe0 c 63 0 |
33 | * mknod /dev/vpe1 c 63 1 | 33 | * mknod /dev/vpe1 c 63 1 |
34 | */ | 34 | */ |
35 | 35 | #include <linux/config.h> | |
36 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/fs.h> | 38 | #include <linux/fs.h> |
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/poll.h> | 49 | #include <linux/poll.h> |
50 | #include <linux/bootmem.h> | 50 | #include <linux/bootmem.h> |
51 | #include <asm/mipsregs.h> | 51 | #include <asm/mipsregs.h> |
52 | #include <asm/mipsmtregs.h> | ||
52 | #include <asm/cacheflush.h> | 53 | #include <asm/cacheflush.h> |
53 | #include <asm/atomic.h> | 54 | #include <asm/atomic.h> |
54 | #include <asm/cpu.h> | 55 | #include <asm/cpu.h> |
@@ -697,7 +698,7 @@ int vpe_run(vpe_t * v) | |||
697 | dvpe(); | 698 | dvpe(); |
698 | 699 | ||
699 | /* Put MVPE's into 'configuration state' */ | 700 | /* Put MVPE's into 'configuration state' */ |
700 | write_c0_mvpcontrol(read_c0_mvpcontrol() | MVPCONTROL_VPC); | 701 | set_c0_mvpcontrol(MVPCONTROL_VPC); |
701 | 702 | ||
702 | if (!list_empty(&v->tc)) { | 703 | if (!list_empty(&v->tc)) { |
703 | if ((t = list_entry(v->tc.next, struct tc, tc)) == NULL) { | 704 | if ((t = list_entry(v->tc.next, struct tc, tc)) == NULL) { |
@@ -760,7 +761,7 @@ int vpe_run(vpe_t * v) | |||
760 | write_vpe_c0_cause(0); | 761 | write_vpe_c0_cause(0); |
761 | 762 | ||
762 | /* take system out of configuration state */ | 763 | /* take system out of configuration state */ |
763 | write_c0_mvpcontrol(read_c0_mvpcontrol() & ~MVPCONTROL_VPC); | 764 | clear_c0_mvpcontrol(MVPCONTROL_VPC); |
764 | 765 | ||
765 | /* clear interrupts enabled IE, ERL, EXL, and KSU from c0 status */ | 766 | /* clear interrupts enabled IE, ERL, EXL, and KSU from c0 status */ |
766 | write_vpe_c0_status(read_vpe_c0_status() & ~(ST0_ERL | ST0_KSU | ST0_IE | ST0_EXL)); | 767 | 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) | |||
1134 | evpe_flags = dvpe(); | 1135 | evpe_flags = dvpe(); |
1135 | 1136 | ||
1136 | /* Put MVPE's into 'configuration state' */ | 1137 | /* Put MVPE's into 'configuration state' */ |
1137 | write_c0_mvpcontrol(read_c0_mvpcontrol() | MVPCONTROL_VPC); | 1138 | set_c0_mvpcontrol(MVPCONTROL_VPC); |
1138 | 1139 | ||
1139 | settc(t->index); | 1140 | settc(t->index); |
1140 | write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() & ~VPECONF0_VPA); | 1141 | write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() & ~VPECONF0_VPA); |
@@ -1145,7 +1146,7 @@ int vpe_free(vpe_handle vpe) | |||
1145 | 1146 | ||
1146 | v->state = VPE_STATE_UNUSED; | 1147 | v->state = VPE_STATE_UNUSED; |
1147 | 1148 | ||
1148 | write_c0_mvpcontrol(read_c0_mvpcontrol() & ~MVPCONTROL_VPC); | 1149 | clear_c0_mvpcontrol(MVPCONTROL_VPC); |
1149 | evpe(evpe_flags); | 1150 | evpe(evpe_flags); |
1150 | 1151 | ||
1151 | return 0; | 1152 | return 0; |
@@ -1191,7 +1192,7 @@ static int __init vpe_module_init(void) | |||
1191 | dvpe(); | 1192 | dvpe(); |
1192 | 1193 | ||
1193 | /* Put MVPE's into 'configuration state' */ | 1194 | /* Put MVPE's into 'configuration state' */ |
1194 | write_c0_mvpcontrol(read_c0_mvpcontrol() | MVPCONTROL_VPC); | 1195 | set_c0_mvpcontrol(MVPCONTROL_VPC); |
1195 | 1196 | ||
1196 | /* dump_mtregs(); */ | 1197 | /* dump_mtregs(); */ |
1197 | 1198 | ||
@@ -1270,7 +1271,7 @@ static int __init vpe_module_init(void) | |||
1270 | } | 1271 | } |
1271 | 1272 | ||
1272 | /* release config state */ | 1273 | /* release config state */ |
1273 | write_c0_mvpcontrol(read_c0_mvpcontrol() & ~MVPCONTROL_VPC); | 1274 | clear_c0_mvpcontrol(MVPCONTROL_VPC); |
1274 | 1275 | ||
1275 | return 0; | 1276 | return 0; |
1276 | } | 1277 | } |