patch-2.4.22 linux-2.4.22/arch/mips/kernel/proc.c

Next file: linux-2.4.22/arch/mips/kernel/process.c
Previous file: linux-2.4.22/arch/mips/kernel/pci_auto.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/mips/kernel/proc.c linux-2.4.22/arch/mips/kernel/proc.c
@@ -17,10 +17,6 @@
 
 unsigned int vced_count, vcei_count;
 
-#ifndef CONFIG_CPU_HAS_LLSC
-unsigned long ll_ops, sc_ops;
-#endif
-
 static const char *cpu_name[] = {
 	[CPU_UNKNOWN]	"unknown",
 	[CPU_R2000]	"R2000",
@@ -66,21 +62,21 @@
 	[CPU_VR41XX]	"NEC Vr41xx",
 	[CPU_R5500]	"R5500",
 	[CPU_TX49XX]	"TX49xx",
-	[CPU_TX39XX]	"TX39xx",
 	[CPU_20KC]	"MIPS 20Kc",
 	[CPU_VR4111]	"NEC VR4111",
 	[CPU_VR4121]	"NEC VR4121",
 	[CPU_VR4122]	"NEC VR4122",
 	[CPU_VR4131]	"NEC VR4131",
 	[CPU_VR4181]	"NEC VR4181",
-	[CPU_VR4181A]	"NEC VR4181A"
+	[CPU_VR4181A]	"NEC VR4181A",
+	[CPU_SR71000]	"Sandcraft SR71000"
 };
 
 
 static int show_cpuinfo(struct seq_file *m, void *v)
 {
-	unsigned int version = mips_cpu.processor_id;
-	unsigned int fp_vers = mips_cpu.fpu_id;
+	unsigned int version = current_cpu_data.processor_id;
+	unsigned int fp_vers = current_cpu_data.fpu_id;
 	unsigned long n = (unsigned long) v - 1;
 	char fmt [64];
 
@@ -97,9 +93,9 @@
 
 	seq_printf(m, "processor\t\t: %ld\n", n);
 	sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n",
-	        (mips_cpu.options & MIPS_CPU_FPU) ? "  FPU V%d.%d" : "");
-	seq_printf(m, fmt, cpu_name[mips_cpu.cputype <= CPU_LAST ?
-	                            mips_cpu.cputype : CPU_UNKNOWN],
+	        cpu_has_fpu ? "  FPU V%d.%d" : "");
+	seq_printf(m, fmt, cpu_name[current_cpu_data.cputype <= CPU_LAST ?
+	                            current_cpu_data.cputype : CPU_UNKNOWN],
 	                           (version >> 4) & 0x0f, version & 0x0f,
 	                           (fp_vers >> 4) & 0x0f, fp_vers & 0x0f);
 	seq_printf(m, "BogoMIPS\t\t: %lu.%02lu\n",
@@ -107,23 +103,18 @@
 	              (loops_per_jiffy / (5000/HZ)) % 100);
 	seq_printf(m, "wait instruction\t: %s\n", cpu_wait ? "yes" : "no");
 	seq_printf(m, "microsecond timers\t: %s\n",
-	              (mips_cpu.options & MIPS_CPU_COUNTER) ? "yes" : "no");
-	seq_printf(m, "tlb_entries\t\t: %d\n", mips_cpu.tlbsize);
+	              cpu_has_counter ? "yes" : "no");
+	seq_printf(m, "tlb_entries\t\t: %d\n", current_cpu_data.tlbsize);
 	seq_printf(m, "extra interrupt vector\t: %s\n",
-	              (mips_cpu.options & MIPS_CPU_DIVEC) ? "yes" : "no");
+	              cpu_has_divec ? "yes" : "no");
 	seq_printf(m, "hardware watchpoint\t: %s\n",
-	              watch_available ? "yes" : "no");
+	              cpu_has_watch ? "yes" : "no");
 
 	sprintf(fmt, "VCE%%c exceptions\t\t: %s\n",
-	        (mips_cpu.options & MIPS_CPU_VCE) ? "%d" : "not available");
+	        cpu_has_vce ? "%d" : "not available");
 	seq_printf(m, fmt, 'D', vced_count);
 	seq_printf(m, fmt, 'I', vcei_count);
 
-#ifndef CONFIG_CPU_HAS_LLSC
-	seq_printf(m, "ll emulations\t\t: %lu\n", ll_ops);
-	seq_printf(m, "sc emulations\t\t: %lu\n", sc_ops);
-#endif
-
 	return 0;
 }
 
@@ -145,8 +136,8 @@
 }
 
 struct seq_operations cpuinfo_op = {
-	start:	c_start,
-	next:	c_next,
-	stop:	c_stop,
-	show:	show_cpuinfo,
+	.start	= c_start,
+	.next	= c_next,
+	.stop	= c_stop,
+	.show	= show_cpuinfo,
 };

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)