diff options
Diffstat (limited to 'arch/mips/kernel/proc.c')
-rw-r--r-- | arch/mips/kernel/proc.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c index 00d20974b3e7..e40971b51d2f 100644 --- a/arch/mips/kernel/proc.c +++ b/arch/mips/kernel/proc.c | |||
@@ -17,8 +17,24 @@ | |||
17 | 17 | ||
18 | unsigned int vced_count, vcei_count; | 18 | unsigned int vced_count, vcei_count; |
19 | 19 | ||
20 | /* | ||
21 | * * No lock; only written during early bootup by CPU 0. | ||
22 | * */ | ||
23 | static RAW_NOTIFIER_HEAD(proc_cpuinfo_chain); | ||
24 | |||
25 | int __ref register_proc_cpuinfo_notifier(struct notifier_block *nb) | ||
26 | { | ||
27 | return raw_notifier_chain_register(&proc_cpuinfo_chain, nb); | ||
28 | } | ||
29 | |||
30 | int proc_cpuinfo_notifier_call_chain(unsigned long val, void *v) | ||
31 | { | ||
32 | return raw_notifier_call_chain(&proc_cpuinfo_chain, val, v); | ||
33 | } | ||
34 | |||
20 | static int show_cpuinfo(struct seq_file *m, void *v) | 35 | static int show_cpuinfo(struct seq_file *m, void *v) |
21 | { | 36 | { |
37 | struct proc_cpuinfo_notifier_args proc_cpuinfo_notifier_args; | ||
22 | unsigned long n = (unsigned long) v - 1; | 38 | unsigned long n = (unsigned long) v - 1; |
23 | unsigned int version = cpu_data[n].processor_id; | 39 | unsigned int version = cpu_data[n].processor_id; |
24 | unsigned int fp_vers = cpu_data[n].fpu_id; | 40 | unsigned int fp_vers = cpu_data[n].fpu_id; |
@@ -95,6 +111,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
95 | if (cpu_has_mipsmt) seq_printf(m, "%s", " mt"); | 111 | if (cpu_has_mipsmt) seq_printf(m, "%s", " mt"); |
96 | if (cpu_has_mmips) seq_printf(m, "%s", " micromips"); | 112 | if (cpu_has_mmips) seq_printf(m, "%s", " micromips"); |
97 | if (cpu_has_vz) seq_printf(m, "%s", " vz"); | 113 | if (cpu_has_vz) seq_printf(m, "%s", " vz"); |
114 | if (cpu_has_msa) seq_printf(m, "%s", " msa"); | ||
115 | if (cpu_has_eva) seq_printf(m, "%s", " eva"); | ||
98 | seq_printf(m, "\n"); | 116 | seq_printf(m, "\n"); |
99 | 117 | ||
100 | if (cpu_has_mmips) { | 118 | if (cpu_has_mmips) { |
@@ -118,6 +136,13 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
118 | cpu_has_vce ? "%u" : "not available"); | 136 | cpu_has_vce ? "%u" : "not available"); |
119 | seq_printf(m, fmt, 'D', vced_count); | 137 | seq_printf(m, fmt, 'D', vced_count); |
120 | seq_printf(m, fmt, 'I', vcei_count); | 138 | seq_printf(m, fmt, 'I', vcei_count); |
139 | |||
140 | proc_cpuinfo_notifier_args.m = m; | ||
141 | proc_cpuinfo_notifier_args.n = n; | ||
142 | |||
143 | raw_notifier_call_chain(&proc_cpuinfo_chain, 0, | ||
144 | &proc_cpuinfo_notifier_args); | ||
145 | |||
121 | seq_printf(m, "\n"); | 146 | seq_printf(m, "\n"); |
122 | 147 | ||
123 | return 0; | 148 | return 0; |