From fbbd9aebdd575bce28fdbc7f46e3b0b0016e7b4d Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Mon, 27 Nov 2000 11:10:03 +0000 Subject: Add bogomips to cpuinfo (set it equal to the CPU frequency, which is bogus but not more so than Linux' definition). This should get the IBM JDK 1.3 working again. Prompted by: sobomax --- sys/compat/linprocfs/linprocfs.c | 17 ++++++++++------- sys/compat/linprocfs/linprocfs_misc.c | 17 ++++++++++------- 2 files changed, 20 insertions(+), 14 deletions(-) (limited to 'sys/compat') diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index d799fe406a9b..d4cd0c2a8d86 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -218,15 +218,15 @@ linprocfs_docpuinfo(curp, p, pfs, uio) ps = psbuf; ps += sprintf(ps, - "processor : %d\n" - "vendor_id : %.20s\n" - "cpu family : %d\n" - "model : %d\n" - "stepping : %d\n", + "processor\t: %d\n" + "vendor_id\t: %.20s\n" + "cpu family\t: %d\n" + "model\t\t: %d\n" + "stepping\t: %d\n", 0, cpu_vendor, class, cpu, cpu_id & 0xf); ps += sprintf(ps, - "flags :"); + "flags\t\t:"); if (!strcmp(cpu_vendor, "AuthenticAMD") && (class < 6)) { flags[16] = "fcmov"; @@ -240,7 +240,10 @@ linprocfs_docpuinfo(curp, p, pfs, uio) ps += sprintf(ps, "\n"); if (class >= 5) { ps += sprintf(ps, - "cpu MHz : %d.%02d\n", + "cpu MHz\t\t: %d.%02d\n" + "bogomips\t: %d.%02d\n", + (tsc_freq + 4999) / 1000000, + ((tsc_freq + 4999) / 10000) % 100, (tsc_freq + 4999) / 1000000, ((tsc_freq + 4999) / 10000) % 100); } diff --git a/sys/compat/linprocfs/linprocfs_misc.c b/sys/compat/linprocfs/linprocfs_misc.c index d799fe406a9b..d4cd0c2a8d86 100644 --- a/sys/compat/linprocfs/linprocfs_misc.c +++ b/sys/compat/linprocfs/linprocfs_misc.c @@ -218,15 +218,15 @@ linprocfs_docpuinfo(curp, p, pfs, uio) ps = psbuf; ps += sprintf(ps, - "processor : %d\n" - "vendor_id : %.20s\n" - "cpu family : %d\n" - "model : %d\n" - "stepping : %d\n", + "processor\t: %d\n" + "vendor_id\t: %.20s\n" + "cpu family\t: %d\n" + "model\t\t: %d\n" + "stepping\t: %d\n", 0, cpu_vendor, class, cpu, cpu_id & 0xf); ps += sprintf(ps, - "flags :"); + "flags\t\t:"); if (!strcmp(cpu_vendor, "AuthenticAMD") && (class < 6)) { flags[16] = "fcmov"; @@ -240,7 +240,10 @@ linprocfs_docpuinfo(curp, p, pfs, uio) ps += sprintf(ps, "\n"); if (class >= 5) { ps += sprintf(ps, - "cpu MHz : %d.%02d\n", + "cpu MHz\t\t: %d.%02d\n" + "bogomips\t: %d.%02d\n", + (tsc_freq + 4999) / 1000000, + ((tsc_freq + 4999) / 10000) % 100, (tsc_freq + 4999) / 1000000, ((tsc_freq + 4999) / 10000) % 100); } -- cgit v1.3