Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
1
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
d6d3c9a
Documentation
arch
alpha
arc
arm
arm64
avr32
blackfin
c6x
cris
frv
hexagon
ia64
m32r
m68k
metag
microblaze
mips
alchemy
ar7
ath79
bcm47xx
bcm63xx
boot
cavium-octeon
cobalt
configs
dec
emma
fw
include
jazz
jz4740
kernel
.gitignore
8250-platform.c
Makefile
asm-offsets.c
binfmt_elfn32.c
binfmt_elfo32.c
bmips_vec.S
branch.c
cevt-bcm1480.c
cevt-ds1287.c
cevt-gic.c
cevt-gt641xx.c
cevt-r4k.c
cevt-sb1250.c
cevt-smtc.c
cevt-txx9.c
cps-vec.S
cpu-bugs64.c
cpu-probe.c
crash.c
crash_dump.c
csrc-bcm1480.c
csrc-gic.c
csrc-ioasic.c
csrc-r4k.c
csrc-sb1250.c
early_printk.c
early_printk_8250.c
entry.S
ftrace.c
genex.S
gpio_txx9.c
head.S
i8253.c
i8259.c
idle.c
irq-gic.c
irq-gt641xx.c
irq-msc01.c
irq-rm7000.c
irq.c
irq_cpu.c
irq_txx9.c
jump_label.c
kgdb.c
kprobes.c
linux32.c
machine_kexec.c
mcount.S
mips-cm.c
mips-cpc.c
mips-mt-fpaff.c
mips-mt.c
mips_ksyms.c
mips_machine.c
module-rela.c
module.c
octeon_switch.S
perf_event.c
perf_event_mipsxx.c
proc.c
process.c
prom.c
ptrace.c
ptrace32.c
r2300_fpu.S
r2300_switch.S
r4k_fpu.S
r4k_switch.S
r6000_fpu.S
relocate_kernel.S
reset.c
rtlx-cmp.c
rtlx-mt.c
rtlx.c
scall32-o32.S
scall64-64.S
scall64-n32.S
scall64-o32.S
segment.c
setup.c
signal-common.h
signal.c
signal32.c
signal_n32.c
smp-bmips.c
smp-cmp.c
smp-cps.c
smp-gic.c
smp-mt.c
smp-up.c
smp.c
smtc-asm.S
smtc-proc.c
smtc.c
spinlock_test.c
spram.c
stacktrace.c
sync-r4k.c
syscall.c
time.c
topology.c
traps.c
unaligned.c
vdso.c
vmlinux.lds.S
vpe-cmp.c
vpe-mt.c
vpe.c
watch.c
kvm
lantiq
lasat
lib
loongson
loongson1
math-emu
mm
mti-malta
mti-sead3
netlogic
oprofile
pci
pmcs-msp71xx
pnx833x
power
ralink
rb532
sgi-ip22
sgi-ip27
sgi-ip32
sibyte
sni
txx9
vr41xx
Kbuild
Kbuild.platforms
Kconfig
Kconfig.debug
Makefile
mn10300
openrisc
parisc
powerpc
s390
score
sh
sparc
tile
um
unicore32
x86
xtensa
.gitignore
Kconfig
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
arch
/
mips
/
kernel
/
proc.c
Copy path
Blame
Blame
Latest commit
History
History
173 lines (153 loc) · 4.91 KB
Breadcrumbs
linux
/
arch
/
mips
/
kernel
/
proc.c
Top
File metadata and controls
Code
Blame
173 lines (153 loc) · 4.91 KB
Raw
/* * Copyright (C) 1995, 1996, 2001 Ralf Baechle * Copyright (C) 2001, 2004 MIPS Technologies, Inc. * Copyright (C) 2004 Maciej W. Rozycki */ #include <linux/delay.h> #include <linux/kernel.h> #include <linux/sched.h> #include <linux/seq_file.h> #include <asm/bootinfo.h> #include <asm/cpu.h> #include <asm/cpu-features.h> #include <asm/idle.h> #include <asm/mipsregs.h> #include <asm/processor.h> #include <asm/prom.h> unsigned int vced_count, vcei_count; /* * * No lock; only written during early bootup by CPU 0. * */ static RAW_NOTIFIER_HEAD(proc_cpuinfo_chain); int __ref register_proc_cpuinfo_notifier(struct notifier_block *nb) { return raw_notifier_chain_register(&proc_cpuinfo_chain, nb); } int proc_cpuinfo_notifier_call_chain(unsigned long val, void *v) { return raw_notifier_call_chain(&proc_cpuinfo_chain, val, v); } static int show_cpuinfo(struct seq_file *m, void *v) { struct proc_cpuinfo_notifier_args proc_cpuinfo_notifier_args; unsigned long n = (unsigned long) v - 1; unsigned int version = cpu_data[n].processor_id; unsigned int fp_vers = cpu_data[n].fpu_id; char fmt [64]; int i; #ifdef CONFIG_SMP if (!cpu_online(n)) return 0; #endif /* * For the first processor also print the system type */ if (n == 0) { seq_printf(m, "system type\t\t: %s\n", get_system_type()); if (mips_get_machine_name()) seq_printf(m, "machine\t\t\t: %s\n", mips_get_machine_name()); } seq_printf(m, "processor\t\t: %ld\n", n); sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n", cpu_data[n].options & MIPS_CPU_FPU ? " FPU V%d.%d" : ""); seq_printf(m, fmt, __cpu_name[n], (version >> 4) & 0x0f, version & 0x0f, (fp_vers >> 4) & 0x0f, fp_vers & 0x0f); seq_printf(m, "BogoMIPS\t\t: %u.%02u\n", cpu_data[n].udelay_val / (500000/HZ), (cpu_data[n].udelay_val / (5000/HZ)) % 100); seq_printf(m, "wait instruction\t: %s\n", cpu_wait ? "yes" : "no"); seq_printf(m, "microsecond timers\t: %s\n", cpu_has_counter ? "yes" : "no"); seq_printf(m, "tlb_entries\t\t: %d\n", cpu_data[n].tlbsize); seq_printf(m, "extra interrupt vector\t: %s\n", cpu_has_divec ? "yes" : "no"); seq_printf(m, "hardware watchpoint\t: %s", cpu_has_watch ? "yes, " : "no\n"); if (cpu_has_watch) { seq_printf(m, "count: %d, address/irw mask: [", cpu_data[n].watch_reg_count); for (i = 0; i < cpu_data[n].watch_reg_count; i++) seq_printf(m, "%s0x%04x", i ? ", " : "" , cpu_data[n].watch_reg_masks[i]); seq_printf(m, "]\n"); } seq_printf(m, "isa\t\t\t: mips1"); if (cpu_has_mips_2) seq_printf(m, "%s", " mips2"); if (cpu_has_mips_3) seq_printf(m, "%s", " mips3"); if (cpu_has_mips_4) seq_printf(m, "%s", " mips4"); if (cpu_has_mips_5) seq_printf(m, "%s", " mips5"); if (cpu_has_mips32r1) seq_printf(m, "%s", " mips32r1"); if (cpu_has_mips32r2) seq_printf(m, "%s", " mips32r2"); if (cpu_has_mips64r1) seq_printf(m, "%s", " mips64r1"); if (cpu_has_mips64r2) seq_printf(m, "%s", " mips64r2"); seq_printf(m, "\n"); seq_printf(m, "ASEs implemented\t:"); if (cpu_has_mips16) seq_printf(m, "%s", " mips16"); if (cpu_has_mdmx) seq_printf(m, "%s", " mdmx"); if (cpu_has_mips3d) seq_printf(m, "%s", " mips3d"); if (cpu_has_smartmips) seq_printf(m, "%s", " smartmips"); if (cpu_has_dsp) seq_printf(m, "%s", " dsp"); if (cpu_has_dsp2) seq_printf(m, "%s", " dsp2"); if (cpu_has_mipsmt) seq_printf(m, "%s", " mt"); if (cpu_has_mmips) seq_printf(m, "%s", " micromips"); if (cpu_has_vz) seq_printf(m, "%s", " vz"); if (cpu_has_msa) seq_printf(m, "%s", " msa"); if (cpu_has_eva) seq_printf(m, "%s", " eva"); seq_printf(m, "\n"); if (cpu_has_mmips) { seq_printf(m, "micromips kernel\t: %s\n", (read_c0_config3() & MIPS_CONF3_ISA_OE) ? "yes" : "no"); } seq_printf(m, "shadow register sets\t: %d\n", cpu_data[n].srsets); seq_printf(m, "kscratch registers\t: %d\n", hweight8(cpu_data[n].kscratch_mask)); seq_printf(m, "core\t\t\t: %d\n", cpu_data[n].core); #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) if (cpu_has_mipsmt) { seq_printf(m, "VPE\t\t\t: %d\n", cpu_data[n].vpe_id); #if defined(CONFIG_MIPS_MT_SMTC) seq_printf(m, "TC\t\t\t: %d\n", cpu_data[n].tc_id); #endif } #endif sprintf(fmt, "VCE%%c exceptions\t\t: %s\n", cpu_has_vce ? "%u" : "not available"); seq_printf(m, fmt, 'D', vced_count); seq_printf(m, fmt, 'I', vcei_count); proc_cpuinfo_notifier_args.m = m; proc_cpuinfo_notifier_args.n = n; raw_notifier_call_chain(&proc_cpuinfo_chain, 0, &proc_cpuinfo_notifier_args); seq_printf(m, "\n"); return 0; } static void *c_start(struct seq_file *m, loff_t *pos) { unsigned long i = *pos; return i < NR_CPUS ? (void *) (i + 1) : NULL; } static void *c_next(struct seq_file *m, void *v, loff_t *pos) { ++*pos; return c_start(m, pos); } static void c_stop(struct seq_file *m, void *v) { } const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, .show = show_cpuinfo, };
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
You can’t perform that action at this time.