Deleted Added
full compact
linprocfs.c (219968) linprocfs.c (220433)
1/*-
2 * Copyright (c) 2000 Dag-Erling Co��dan Sm��rgrav
3 * Copyright (c) 1999 Pierre Beyssac
4 * Copyright (c) 1993 Jan-Simon Pendry
5 * Copyright (c) 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

--- 28 unchanged lines hidden (view full) ---

37 * SUCH DAMAGE.
38 *
39 * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94
40 */
41
42#include "opt_compat.h"
43
44#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000 Dag-Erling Co��dan Sm��rgrav
3 * Copyright (c) 1999 Pierre Beyssac
4 * Copyright (c) 1993 Jan-Simon Pendry
5 * Copyright (c) 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

--- 28 unchanged lines hidden (view full) ---

37 * SUCH DAMAGE.
38 *
39 * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94
40 */
41
42#include "opt_compat.h"
43
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/sys/compat/linprocfs/linprocfs.c 219968 2011-03-24 18:40:11Z jhb $");
45__FBSDID("$FreeBSD: head/sys/compat/linprocfs/linprocfs.c 220433 2011-04-07 23:28:28Z jkim $");
46
47#include <sys/param.h>
48#include <sys/queue.h>
49#include <sys/blist.h>
50#include <sys/conf.h>
51#include <sys/exec.h>
52#include <sys/fcntl.h>
53#include <sys/filedesc.h>

--- 162 unchanged lines hidden (view full) ---

216/*
217 * Filler function for proc/cpuinfo (i386 & amd64 version)
218 */
219static int
220linprocfs_docpuinfo(PFS_FILL_ARGS)
221{
222 int hw_model[2];
223 char model[128];
46
47#include <sys/param.h>
48#include <sys/queue.h>
49#include <sys/blist.h>
50#include <sys/conf.h>
51#include <sys/exec.h>
52#include <sys/fcntl.h>
53#include <sys/filedesc.h>

--- 162 unchanged lines hidden (view full) ---

216/*
217 * Filler function for proc/cpuinfo (i386 & amd64 version)
218 */
219static int
220linprocfs_docpuinfo(PFS_FILL_ARGS)
221{
222 int hw_model[2];
223 char model[128];
224 uint64_t freq;
224 size_t size;
225 int class, fqmhz, fqkhz;
226 int i;
227
228 /*
229 * We default the flags to include all non-conflicting flags,
230 * and the Intel versions of conflicting flags.
231 */

--- 66 unchanged lines hidden (view full) ---

298 break;
299 }
300#endif
301
302 for (i = 0; i < 32; i++)
303 if (cpu_feature & (1 << i))
304 sbuf_printf(sb, " %s", flags[i]);
305 sbuf_cat(sb, "\n");
225 size_t size;
226 int class, fqmhz, fqkhz;
227 int i;
228
229 /*
230 * We default the flags to include all non-conflicting flags,
231 * and the Intel versions of conflicting flags.
232 */

--- 66 unchanged lines hidden (view full) ---

299 break;
300 }
301#endif
302
303 for (i = 0; i < 32; i++)
304 if (cpu_feature & (1 << i))
305 sbuf_printf(sb, " %s", flags[i]);
306 sbuf_cat(sb, "\n");
306 if (class >= 5) {
307 fqmhz = (tsc_freq + 4999) / 1000000;
308 fqkhz = ((tsc_freq + 4999) / 10000) % 100;
307 freq = atomic_load_acq_64(&tsc_freq);
308 if (freq != 0) {
309 fqmhz = (freq + 4999) / 1000000;
310 fqkhz = ((freq + 4999) / 10000) % 100;
309 sbuf_printf(sb,
310 "cpu MHz\t\t: %d.%02d\n"
311 "bogomips\t: %d.%02d\n",
312 fqmhz, fqkhz, fqmhz, fqkhz);
313 }
314
315 return (0);
316}

--- 1234 unchanged lines hidden ---
311 sbuf_printf(sb,
312 "cpu MHz\t\t: %d.%02d\n"
313 "bogomips\t: %d.%02d\n",
314 fqmhz, fqkhz, fqmhz, fqkhz);
315 }
316
317 return (0);
318}

--- 1234 unchanged lines hidden ---