linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jcm@redhat.com (Jon Masters)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv4] arm64: dmi: Add SMBIOS/DMI support
Date: Sat, 17 Jan 2015 00:57:38 -0500	[thread overview]
Message-ID: <54B9F9D2.6000104@redhat.com> (raw)
In-Reply-To: <1412437603-3394-1-git-send-email-yi.li@linaro.org>

Hi Yi Li,

I would like some advice on the below patch. First, a little background.

I /may/ need to use SMBIOS provided data on ARMv8 systems to enumerate
the number of physical underlying CPU sockets present. This is provided
in one Type4 DMI structure per physical socket. Using that fact (such
data is already provided by all of the reference ARMv8 server systems),
and a variable interpretation of the CPU affinity data, we can refactor
the topology.c code to understand threads vs cores vs sockets without
getting confused by the extra levels of hierarchy for clusters.

I am going back over some older patches, including this one to
understand the DMI port, and I notice that you call dmi_scan_machine
from an early_initcall. This will run from the init thread, after we've
done basic SMP setup in smp_prepare_cpus, which is where we stash
cpu_topology data, which is after I already need DMI data available.

So. If I wanted this available prior to early_initcall time, would it be
reasonable to follow e.g. x86 and move this early in the boot? I'm not
necessarily going to ask to upstream such a change (since I expect to be
able to solve the underlying problem I am looking to address in a
different fashion soon), but first want to know if it would be
reasonable to ask to do that anyway.

Jon.

P.S. I'm not interested at all in replies pointing me to the existing DT
cpu topology binding, which I am well aware of, but it does also not
actually solve the problem I have :)

On 10/04/2014 11:46 AM, Yi Li wrote:

<snip>

> +
> +static int __init arm64_core_init(void)
> +{
> +/*
> + * DMI depends on EFI on arm64, and dmi_scan_machine() needs to be
> + * called early because dmi_id_init(), which is an arch_initcall itself,
> + * depends on dmi_scan_machine() having been called already.
> + */
> +
> +	dmi_scan_machine();
> +	return 0;
> +}
> +core_initcall(arm64_core_init);
> 

  parent reply	other threads:[~2015-01-17  5:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-04 15:46 [PATCHv4] arm64: dmi: Add SMBIOS/DMI support Yi Li
2014-10-06 10:40 ` Catalin Marinas
2015-01-17  5:57 ` Jon Masters [this message]
2015-01-17 12:12   ` Leif Lindholm
2015-01-17 15:09     ` Jon Masters
2015-01-19  1:27       ` 答复: " liyi 00215672
2015-01-19  3:30         ` Jon Masters
2015-01-19  3:35           ` Jon Masters
2015-01-17 16:36     ` Jon Masters

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=54B9F9D2.6000104@redhat.com \
    --to=jcm@redhat.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).