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 10:09:02 -0500 [thread overview]
Message-ID: <54BA7B0E.5020207@redhat.com> (raw)
In-Reply-To: <20150117121247.GL3827@bivouac.eciton.net>
On 01/17/2015 07:12 AM, Leif Lindholm wrote:
> Hi Jon,
>
> On Sat, Jan 17, 2015 at 12:57:38AM -0500, Jon Masters wrote:
>> Hi Yi Li,
>
> Yi has gone back to work inside Huawei, so probably did not receive
> your messags.
Good to know. I was at one point tracking all of the engineers involved
but it's getting harder to do that :)
>> 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 sounds like a very risky precedent to set. Hardware description for
> the kernel comes in the form of DT or ACPI. SMBIOS is hardware
> description for userland.
Agreed. I don't actually want to set this precedent on ARM yet :)
> x86 added internal access to SMBIOS tables to be able to work around
> known-bad firmware. I would say we're in a much better place today
> with regards to people actually testing hardware with Linux than when
> that happened, so would really like to avoid opening those floodgates
> on ARM*.
Fair enough. I suspect we may get there one day, but I'm certainly not
going to try to move that along :) I have btw pushed every vendor to rev
their build information each time they build new firmware (when we build
the RH reference firmware for Mustang and - other boards I won't mention
on list - we do rev the version), and we'll require it in SBBR. That's
on my todo list for a clarification.
> The rest of this email is therefore assuming we are talking about a
> temporary out-of-tree patch kept for development purposes until a
> better solution can be devised to upstream.
Yup. I'm just exploring all of the options. Currently, there is no
reliable way to extract the exact number of sockets present, even with
the DT binding, and I need to know precisely how many sockets there are,
with this information correctly provided in the sysfs topology.
>> 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.
>
> Yep.
>
>> 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.
>
> My suggestion would be to not try to over-engineer a patch not going
> upstream. Move the call before smp_prepare_cpus() in init/main.c.
I guess. I don't like not overdoing things. You've met me right? ;)
> Or, if you can be fairly certain your SMBIOS table is covered by the
> linear mapping, move the call to setup_arch().
I thought about that. I think I can assume this, but I am not certain.
I'm going to ponder that. For now, the above (move before SMP setup) is
probably the way I'll go with it as a hackish kludge.
>> 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 :)
>
> Not going to point, but perhaps the correct answer is to ensure the
> information you need is provided via DT/ACPI. As your email hints at.
Yep. I've multiple threads going to get this addressed properly.
Thanks Leif!
Jon.
next prev parent reply other threads:[~2015-01-17 15:09 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
2015-01-17 12:12 ` Leif Lindholm
2015-01-17 15:09 ` Jon Masters [this message]
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=54BA7B0E.5020207@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).