lkml.org 
[lkml]   [2016]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6] arm64: cpuinfo: Expose MIDR_EL1 and REVIDR_EL1 to sysfs
From
Date
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


\
 
 \ /
  Last update: 2016-06-28 19:01    [W:0.046 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site