aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup-common.c
diff options
context:
space:
mode:
authorMarian Balakowicz <m8@semihalf.com>2007-11-09 12:11:43 -0500
committerPaul Mackerras <paulus@samba.org>2008-03-25 17:44:04 -0400
commit0276c1368f111b1fd75e6fe0bf4cd78a6903798f (patch)
tree3bf932a577f570d5a5d567fc7849bea2b6d3914b /arch/powerpc/kernel/setup-common.c
parentbed04a4413376265746053be2a9cfbfc80c98ec9 (diff)
[POWERPC] Add 'model: ...' line to common show_cpuinfo()
Print out 'model' property of '/' node as a machine name in generic show_cpuinfo() routine. Signed-off-by: Marian Balakowicz <m8@semihalf.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
-rw-r--r--arch/powerpc/kernel/setup-common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 12cc41c16b0d..db540eab09f4 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -167,6 +167,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
167 unsigned short min; 167 unsigned short min;
168 168
169 if (cpu_id == NR_CPUS) { 169 if (cpu_id == NR_CPUS) {
170 struct device_node *root;
171 const char *model = NULL;
170#if defined(CONFIG_SMP) && defined(CONFIG_PPC32) 172#if defined(CONFIG_SMP) && defined(CONFIG_PPC32)
171 unsigned long bogosum = 0; 173 unsigned long bogosum = 0;
172 int i; 174 int i;
@@ -178,6 +180,13 @@ static int show_cpuinfo(struct seq_file *m, void *v)
178 seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq); 180 seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq);
179 if (ppc_md.name) 181 if (ppc_md.name)
180 seq_printf(m, "platform\t: %s\n", ppc_md.name); 182 seq_printf(m, "platform\t: %s\n", ppc_md.name);
183 root = of_find_node_by_path("/");
184 if (root)
185 model = of_get_property(root, "model", NULL);
186 if (model)
187 seq_printf(m, "model\t\t: %s\n", model);
188 of_node_put(root);
189
181 if (ppc_md.show_cpuinfo != NULL) 190 if (ppc_md.show_cpuinfo != NULL)
182 ppc_md.show_cpuinfo(m); 191 ppc_md.show_cpuinfo(m);
183 192