Thread (8 messages) flat view 8 messages, 5 authors, 2007-07-13

Re: [PATCH] [POWERPC] Move generic MPC82xx functions out of ADS-specific

From: Arnd Bergmann <arnd@arndb.de>
Date: 2007-07-13 00:00:16

On Thursday 12 July 2007, Laurent Pinchart wrote:
quoted
Ah, I missed that. =A0I'd just get rid of "Vendor" altogether, and incl=
ude
quoted
the vendor name in the machine name.
=20
Is there any standard/documentation regarding what show_cpuinfo should pr=
int ?=20
Should it show CPU information only, or board information as well ? What=
=20
about the memory size, clock settings, ... ? What are the meanings=20
of "vendor" and "machine" ?
I guess the easiest would be to modify the common show_cpuinfo function
to fall back to just printing the model, if there is no specific function:

=2D-- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -175,6 +175,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 			seq_printf(m, "platform\t: %s\n", ppc_md.name);
 		if (ppc_md.show_cpuinfo !=3D NULL)
 			ppc_md.show_cpuinfo(m);
+		else {
+			struct device_node *root =3D of_find_node_by_path("/");
+			const char *model =3D of_get_property(root, "model", NULL);
+			seq_printf(m, "machine\t\t: %s\n", model);
+			of_node_put(root);
+		}
=20
 		return 0;
 	}

With that in place, we can probably get rid of half the platform
specific show_cpuinfo functions.

	Arnd <><
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help