From: Suzuki K Poulose <Suzuki.Poulose@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: will.deacon@arm.com, mark.rutland@arm.com,
steve.capper@linaro.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
"edward.nevill@linaro.org" <edward.nevill@linaro.org>
Subject: Re: [PATCH v6] arm64: cpuinfo: Expose MIDR_EL1 and REVIDR_EL1 to sysfs
Date: Tue, 28 Jun 2016 17:14:27 +0100 [thread overview]
Message-ID: <5772A263.2050503@arm.com> (raw)
In-Reply-To: <20160628153346.GF4585@e104818-lin.cambridge.arm.com>
On 28/06/16 16:33, Catalin Marinas wrote:
> On Tue, Jun 21, 2016 at 12:12:36PM +0100, Suzuki K. Poulose wrote:
>> +#define CPUINFO_ATTR_RO(_name) \
>> + static ssize_t show_##_name(struct device *dev, \
>> + struct device_attribute *attr, char *buf) \
>> + { \
>> + struct cpuinfo_arm64 *info = &per_cpu(cpu_data, dev->id); \
>> + \
>> + if (info->reg_midr) \
>> + return sprintf(buf, "0x%016x\n", info->reg_##_name); \
>> + else \
>> + return 0; \
>> + } \
>> + static DEVICE_ATTR(_name, 0444, show_##_name, NULL)
>> +
>> +CPUINFO_ATTR_RO(midr);
>> +CPUINFO_ATTR_RO(revidr);
>
> Since exposing these values is aimed at JIT code (and not human
> readable), wouldn't it make more sense to present the binary value
> instead of the ascii transformation?
I am fine with either.
Edward,
Do you have any preference ?
Suzuki
next prev parent reply other threads:[~2016-06-28 16:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 11:12 [PATCH v6] arm64: cpuinfo: Expose MIDR_EL1 and REVIDR_EL1 to sysfs Suzuki K Poulose
2016-06-28 11:06 ` Will Deacon
2016-06-28 14:17 ` Catalin Marinas
2016-06-28 15:33 ` Catalin Marinas
2016-06-28 16:14 ` Suzuki K Poulose [this message]
2016-06-28 16:27 ` Mark Rutland
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=5772A263.2050503@arm.com \
--to=suzuki.poulose@arm.com \
--cc=catalin.marinas@arm.com \
--cc=edward.nevill@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=steve.capper@linaro.org \
--cc=will.deacon@arm.com \
/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).