2 * arch/v850/kernel/procfs.c -- Introspection functions for /proc filesystem
4 * Copyright (C) 2001,02 NEC Corporation
5 * Copyright (C) 2001,02 Miles Bader <miles@gnu.org>
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
11 * Written by Miles Bader <miles@gnu.org>
16 static int cpuinfo_print (struct seq_file
*m
, void *v
)
18 extern unsigned long loops_per_jiffy
;
20 seq_printf (m
, "CPU-Family: v850\nCPU-Arch: %s\n", CPU_ARCH
);
23 seq_printf (m
, "CPU-Model: %s (%s)\n", CPU_MODEL
, CPU_MODEL_LONG
);
25 seq_printf (m
, "CPU-Model: %s\n", CPU_MODEL
);
29 seq_printf (m
, "CPU-Clock: %ld (%ld MHz)\n",
31 (long)CPU_CLOCK_FREQ
/ 1000000);
34 seq_printf (m
, "BogoMips: %lu.%02lu\n",
35 loops_per_jiffy
/(500000/HZ
),
36 (loops_per_jiffy
/(5000/HZ
)) % 100);
39 seq_printf (m
, "Platform: %s (%s)\n", PLATFORM
, PLATFORM_LONG
);
40 #elif defined (PLATFORM)
41 seq_printf (m
, "Platform: %s\n", PLATFORM
);
47 static void *cpuinfo_start (struct seq_file
*m
, loff_t
*pos
)
49 return *pos
< NR_CPUS
? ((void *) 0x12345678) : NULL
;
52 static void *cpuinfo_next (struct seq_file
*m
, void *v
, loff_t
*pos
)
55 return cpuinfo_start (m
, pos
);
58 static void cpuinfo_stop (struct seq_file
*m
, void *v
)
62 struct seq_operations cpuinfo_op
= {
63 .start
= cpuinfo_start
,