From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by ozlabs.org (Postfix) with ESMTP id CF8C4DDF02 for ; Sun, 4 Nov 2007 10:52:23 +1100 (EST) Received: from localhost (unknown [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id E581A1432E for ; Sun, 4 Nov 2007 00:52:58 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29413-10 for ; Sun, 4 Nov 2007 00:52:58 +0100 (CET) Received: from hekate.izotz.org (frozen.izotz.org [83.175.187.135]) by mail.semihalf.com (Postfix) with ESMTP id 44640142CC for ; Sun, 4 Nov 2007 00:52:58 +0100 (CET) From: Marian Balakowicz Subject: [PATCH v2 01/12] [POWERPC] Add 'model: ...' line to common show_cpuinfo() To: linuxppc-dev@ozlabs.org Date: Sun, 04 Nov 2007 00:52:16 +0100 Message-ID: <20071103235216.31906.62666.stgit@hekate.izotz.org> In-Reply-To: <20071103235210.31906.83423.stgit@hekate.izotz.org> References: <20071103235210.31906.83423.stgit@hekate.izotz.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Print out 'model' property of '/' node as a machine name in generic show_cpuinfo() routine. Signed-off-by: Marian Balakowicz --- arch/powerpc/kernel/setup-common.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 2de00f8..cb291f1 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -165,6 +165,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) unsigned short min; if (cpu_id == NR_CPUS) { + struct device_node *root; + const char *model = NULL; #if defined(CONFIG_SMP) && defined(CONFIG_PPC32) unsigned long bogosum = 0; int i; @@ -176,6 +178,13 @@ static int show_cpuinfo(struct seq_file *m, void *v) seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq); if (ppc_md.name) seq_printf(m, "platform\t: %s\n", ppc_md.name); + root = of_find_node_by_path("/"); + if (root) + model = of_get_property(root, "model", NULL); + of_node_put(root); + if (model) + seq_printf(m, "model\t\t: %s\n", model); + if (ppc_md.show_cpuinfo != NULL) ppc_md.show_cpuinfo(m);