patch-2.4.15 linux/arch/sparc/kernel/smp.c

Next file: linux/arch/sparc/kernel/sun4d_smp.c
Previous file: linux/arch/sparc/kernel/setup.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.14/linux/arch/sparc/kernel/smp.c linux/arch/sparc/kernel/smp.c
@@ -16,6 +16,8 @@
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/mm.h>
+#include <linux/fs.h>
+#include <linux/seq_file.h>
 
 #include <asm/ptrace.h>
 #include <asm/atomic.h>
@@ -276,25 +278,26 @@
 	return 0;
 }
 
-int smp_bogo_info(char *buf)
+void smp_bogo_info(struct seq_file *m)
 {
-	int len = 0, i;
+	int i;
 	
-	for (i = 0; i < NR_CPUS; i++)
+	for (i = 0; i < NR_CPUS; i++) {
 		if (cpu_present_map & (1 << i))
-			len += sprintf(buf + len, "Cpu%dBogo\t: %lu.%02lu\n", 
-					i,
-					cpu_data[i].udelay_val/(500000/HZ),
-					(cpu_data[i].udelay_val/(5000/HZ))%100);
-	return len;
+			seq_printf(m,
+				   "Cpu%dBogo\t: %lu.%02lu\n", 
+				   i,
+				   cpu_data[i].udelay_val/(500000/HZ),
+				   (cpu_data[i].udelay_val/(5000/HZ))%100);
+	}
 }
 
-int smp_info(char *buf)
+void smp_info(struct seq_file *m)
 {
-	int len = 0, i;
+	int i;
 	
-	for (i = 0; i < NR_CPUS; i++)
+	for (i = 0; i < NR_CPUS; i++) {
 		if (cpu_present_map & (1 << i))
-			len += sprintf(buf + len, "CPU%d\t\t: online\n", i);
-	return len;
+			seq_printf(m, "CPU%d\t\t: online\n", i);
+	}
 }

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