6 #include <linux/device.h>
7 #include <linux/kernel.h>
8 #include <linux/sched.h>
9 #include <linux/export.h>
14 #include <asm/processor.h>
16 #include <asm/hardirq.h>
17 #include <asm/mmu_context.h>
20 #include <asm/cacheflush.h>
52 unsigned long vpflags;
53 unsigned long mvpconf0;
58 unsigned long haltval;
59 unsigned long tcstatval;
60 #ifdef CONFIG_MIPS_MT_SMTC
66 printk(
"=== MIPS MT State Dump ===\n");
67 printk(
"-- Global State --\n");
68 printk(
" MVPControl Passed: %08lx\n", mvpctl);
69 printk(
" MVPControl Read: %08lx\n", vpflags);
73 printk(
"-- per-VPE State --\n");
74 for (i = 0; i < nvpe; i++) {
75 for (tc = 0; tc < ntc; tc++) {
79 printk(
" VPEControl : %08lx\n",
81 printk(
" VPEConf0 : %08lx\n",
83 printk(
" VPE%d.Status : %08lx\n",
85 printk(
" VPE%d.EPC : %08lx %pS\n",
88 printk(
" VPE%d.Cause : %08lx\n",
90 printk(
" VPE%d.Config7 : %08lx\n",
96 printk(
"-- per-TC State --\n");
97 for (tc = 0; tc < ntc; tc++) {
103 printk(
" TC %d (current TC with VPE EPC above)\n", tc);
110 printk(
" TCStatus : %08lx\n", tcstatval);
112 printk(
" TCRestart : %08lx %pS\n",
114 printk(
" TCHalt : %08lx\n", haltval);
119 #ifdef CONFIG_MIPS_MT_SMTC
122 printk(
"===========================\n");
127 static int mt_opt_norps;
128 static int mt_opt_rpsctl = -1;
129 static int mt_opt_nblsu = -1;
130 static int mt_opt_forceconfig7;
131 static int mt_opt_config7 = -1;
133 static int __init rps_disable(
char *
s)
145 __setup(
"rpsctl=", rpsctl_set);
157 mt_opt_forceconfig7 = 1;
160 __setup(
"config7=", config7_set);
168 static int __init set_protiflush(
char *
s)
173 __setup(
"protiflush", set_protiflush);
175 static int __init set_protdflush(
char *
s)
180 __setup(
"protdflush", set_protdflush);
182 static int __init niflush(
char *
s)
189 static int __init ndflush(
char *
s)
196 static unsigned int itc_base;
198 static int __init set_itc_base(
char *
str)
204 __setup(
"itcbase=", set_itc_base);
209 unsigned int nconfig7 = oconfig7;
212 printk(
"\"norps\" option deprecated: use \"rpsctl=\"\n");
214 if (mt_opt_rpsctl >= 0) {
215 printk(
"34K return prediction stack override set to %d.\n",
218 nconfig7 |= (1 << 2);
220 nconfig7 &= ~(1 << 2);
222 if (mt_opt_nblsu >= 0) {
223 printk(
"34K ALU/LSU sync override set to %d.\n", mt_opt_nblsu);
225 nconfig7 |= (1 << 5);
227 nconfig7 &= ~(1 << 5);
229 if (mt_opt_forceconfig7) {
230 printk(
"CP0.Config7 forced to 0x%08x.\n", mt_opt_config7);
231 nconfig7 = mt_opt_config7;
233 if (oconfig7 != nconfig7) {
242 printk(
"I-cache flushes single-threaded\n");
244 printk(
"D-cache flushes single-threaded\n");
258 unsigned long ectlval;
259 unsigned long itcblkgrn;
265 #define INDEX_0 (0x80000000)
266 #define INDEX_8 (0x80000008)
271 itcblkgrn &= 0xfffe0000;
273 itcblkgrn |= 0x00000c00;
286 printk(
"Mapped %ld ITC cells starting at 0x%08x\n",
287 ((itcblkgrn & 0x7fe00000) >> 20), itc_base);
298 #ifdef CONFIG_MIPS_MT_SMTC
308 #ifdef CONFIG_MIPS_MT_SMTC
318 static int __init mt_init(
void)