linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: remove name from machine_desc for DT platforms
Date: Mon, 28 Oct 2013 18:58:22 -0500	[thread overview]
Message-ID: <526EFA1E.5050008@gmail.com> (raw)
In-Reply-To: <526EC0B8.2080307@wwwdotorg.org>

On 10/28/2013 02:53 PM, Stephen Warren wrote:
> On 10/26/2013 09:34 AM, Rob Herring wrote:
>> On Wed, Oct 9, 2013 at 3:55 PM, Rob Herring <robherring2@gmail.com> wrote:
>>> From: Rob Herring <rob.herring@calxeda.com>
>>>
>>> As part of the effort to ultimately remove struct machine_desc, the
>>> machine name is not really needed. It is only used for /proc/cpuinfo
>>> "Hardware" field. Get this information from the DT instead and remove
>>> the name string in the machine descriptor for DT machine descriptors. The
>>> model or machine compatible property from the DT is used instead.
>>>
>>> This likely changes the name reported by /proc/cpuinfo. There could be
>>> some userspace dependencies on the old name. Debian libdebian-installer
>>> used to use this to determine kernel flavour, but now uses the DT
>>> directly. It is not really a good idea for userspace to depend on this
>>> anyway.
> 
>>> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
>>> index 0e1e2b3..b0747bb 100644
>>> --- a/arch/arm/kernel/setup.c
>>> +++ b/arch/arm/kernel/setup.c
>>> @@ -611,7 +611,7 @@ void __init dump_machine_table(void)
>>>
>>>         early_print("Available machine support:\n\nID (hex)\tNAME\n");
>>>         for_each_machine_desc(p)
>>> -               early_print("%08x\t%s\n", p->nr, p->name);
>>> +               early_print("%08x\t%s\n", p->nr, p->name ? p->name : *p->dt_compat);
> 
> Does it make sense to iterate over all the entries in p->dt_compat here?
> Tegra's machine descriptor supports 4 different compatible values, and I
> think that'll only print one of them.

This is simply showing which machines are built into the kernel. With
only the first string, you can figure out the other strings. It is not
much of a different lookup than before. Considering you need DEBUG_LL
enabled to see any of this to begin with, I don't think that's too much
of a hurdle.

Rob

      reply	other threads:[~2013-10-28 23:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09 20:55 [PATCH] ARM: remove name from machine_desc for DT platforms Rob Herring
2013-10-26 15:34 ` Rob Herring
2013-10-27 17:27   ` Olof Johansson
2013-10-28 19:53   ` Stephen Warren
2013-10-28 23:58     ` Rob Herring [this message]

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=526EFA1E.5050008@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).