From: Marian Balakowicz <m8@semihalf.com>
To: Milton Miller <miltonm@bga.com>
Cc: linuxppc-dev@ozlabs.org, Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH 01/11] [POWERPC] Add 'machine: ...' line to common show_cpuinfo()
Date: Thu, 25 Oct 2007 16:47:22 +0200 [thread overview]
Message-ID: <4720AC7A.7020208@semihalf.com> (raw)
In-Reply-To: <200710250433.l9P4XE8N038953@sullivan.realtime.net>
Milton Miller wrote:
> On Wed Oct 24 17:11:29 EST 2007, Stephen Rothwell wrote:
>> On Wed, 24 Oct 2007 01:13:09 +0200 Marian Balakowicz wrote:
>>> + root = of_find_node_by_path("/");
>>> + if (root)
>>> + model = of_get_property(root, "model", NULL);
>>> + of_node_put(root);
>> The paranoid part of me says:
>>
>> if (model)
>>
>>> + seq_printf(m, "machine\t\t: %s\n", model);
>
> My thoughts too (don't fail if no model property in /), and that
> means that
>
>>> + const char *model = "";
>
> can change to
> + const char *model = NULL;
>
>
>
> However, a quick grep shows there are several platforms that print
> out machine\t\t: something in show_cpuinfo. Some are fixed strings
> (eg linkstation, holly, iSeries), some print model with a fallback
> (powermac), some augment the model (chrp, pseries, cell), some print
> something else (52xx/efika). There are others. All of those need
> to be dealt with or another tag chosen.
That's true, there is pretty wide range of different approaches. I
would opt for using a different tag and letting the platforms use
their custom machine string if they desire so. How about "model\t\t:
..."? It's not conflicting and self-explanatory too.
Cheers,
m.
next prev parent reply other threads:[~2007-10-25 14:47 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 23:13 [PATCH 00/11] [POWERPC] Add TQM5200/CM5200/Motion-PRO board support Marian Balakowicz
2007-10-23 23:13 ` [PATCH 01/11] [POWERPC] Add 'machine: ...' line to common show_cpuinfo() Marian Balakowicz
2007-10-23 23:23 ` David Gibson
2007-10-25 14:17 ` Marian Balakowicz
2007-10-23 23:59 ` Olof Johansson
2007-10-24 7:11 ` Stephen Rothwell
2007-10-25 4:33 ` Milton Miller
2007-10-25 14:47 ` Marian Balakowicz [this message]
2007-10-23 23:13 ` [PATCH 02/11] [POWERPC] Add 'lpb' bus type for MPC5200 LocalPlus Bus Marian Balakowicz
2007-10-24 0:09 ` Olof Johansson
2007-10-25 14:55 ` Marian Balakowicz
2007-10-23 23:13 ` [PATCH 03/11] [POWERPC] Add common mpc52xx_setup_pci() routine Marian Balakowicz
2007-10-24 7:16 ` Stephen Rothwell
2007-10-23 23:13 ` [PATCH 04/11] [POWERPC] Add generic support for MPC5200 based boards Marian Balakowicz
2007-10-24 14:03 ` Grant Likely
2007-10-23 23:13 ` [PATCH 05/11] [POWERPC] TQM5200 DTS Marian Balakowicz
2007-10-24 1:51 ` David Gibson
2007-10-24 14:09 ` Grant Likely
2007-10-25 15:23 ` Marian Balakowicz
2007-10-25 9:57 ` Martin Krause
2007-10-25 13:53 ` Grant Likely
2007-10-25 15:46 ` Marian Balakowicz
2007-10-26 1:33 ` David Gibson
2007-10-29 14:18 ` Marian Balakowicz
2007-10-29 15:40 ` Grant Likely
2007-10-30 0:58 ` David Gibson
2007-10-30 5:58 ` Grant Likely
2007-10-30 15:34 ` Marian Balakowicz
2007-10-23 23:13 ` [PATCH 06/11] [POWERPC] TQM5200 defconfig Marian Balakowicz
2007-10-23 23:13 ` [PATCH 07/11] [POWERPC] CM5200 DTS Marian Balakowicz
2007-10-23 23:13 ` [PATCH 08/11] [POWERPC] CM5200 defconfig Marian Balakowicz
2007-10-23 23:13 ` [PATCH 09/11] [POWERPC] Motion-PRO: Add LED support Marian Balakowicz
2007-10-24 14:18 ` Grant Likely
2007-10-25 15:53 ` Marian Balakowicz
2007-10-23 23:14 ` [PATCH 10/11] [POWERPC] Promess Motion-PRO DTS Marian Balakowicz
2007-10-23 23:14 ` [PATCH 11/11] [POWERPC] Promess Motion-PRO defconfig Marian Balakowicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4720AC7A.7020208@semihalf.com \
--to=m8@semihalf.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=miltonm@bga.com \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.