Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1420825

Re: [PATCH] arm64: cpuinfo: Expose MIDR_EL1 and REVIDR_EL1 to sysfs

Path csiph.com!news.freedyn.net!aioe.org!bofh.it!news.nic.it!robomod
From Suzuki K Poulose <Suzuki.Poulose@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] arm64: cpuinfo: Expose MIDR_EL1 and REVIDR_EL1 to sysfs
Date Mon, 13 Jun 2016 15:30:01 +0200
Message-ID <rJA6d-6PL-7@gated-at.bofh.it> (permalink)
References <rIwxH-6gP-23@gated-at.bofh.it> <rIy6u-7n5-9@gated-at.bofh.it> <rJyQN-65Z-7@gated-at.bofh.it> <rJzjQ-6gW-35@gated-at.bofh.it>
X-Original-To Will Deacon <will.deacon@arm.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 41
Organization linux.* mail to news gateway
X-Original-Cc catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, steve.capper@linaro.org, Mark Rutland <mark.rutland@arm.com>
X-Original-Date Mon, 13 Jun 2016 14:25:17 +0100
X-Original-Message-ID <575EB43D.5010108@arm.com>
X-Original-References <1465571984-18776-1-git-send-email-suzuki.poulose@arm.com> <20160610170220.GC23223@arm.com> <575EA0DC.2080801@arm.com> <20160613123742.GD1605@arm.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1420825

Show key headers only | View raw


On 13/06/16 13:37, Will Deacon wrote:
> On Mon, Jun 13, 2016 at 01:02:36PM +0100, Suzuki K Poulose wrote:
>> On 10/06/16 18:02, Will Deacon wrote:
>>> On Fri, Jun 10, 2016 at 04:19:44PM +0100, Suzuki K Poulose wrote:
>>>> From: Steve Capper <steve.capper@linaro.org>
>>>>
>>>> It can be useful for JIT software to be aware of MIDR_EL1 and
>>>> REVIDR_EL1 to ascertain the presence of any core errata that could
>>>> affect codegen.
>>>>
>>>> This patch exposes these registers through sysfs:
>>>>
>>>> /sys/devices/system/cpu/cpu$ID/identification/midr
>>>> /sys/devices/system/cpu/cpu$ID/identification/revidr
>>
>>
>>>> +
>>>> +#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 (!cpu_present(dev->id))					\
>>>> +			return -ENODEV;						\
>>>> +										\
>>>> +		if (info->reg_midr)						\
>>>> +			return sprintf(buf, "0x%016x\n", info->reg_##_name);	\
>>>
>>> Should this be 0x%08x, as these are 32-bit registers?
>>
>> Yes. Will change it. As per Mark's comments, I can change them to 64bit in
>> a separate patch
>
> No -- this is a sysfs ABI and I think we should be consistent from the
> beginning. I'm fine with having them 64-bit, since Mark's comments make
> sense, but a comment justifying that would be a good idea.

OK. Will add a comment then.

Thanks
Suzuki

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH] arm64: cpuinfo: Expose MIDR_EL1 and REVIDR_EL1 to sysfs Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2016-06-13 14:10 +0200
  Re: [PATCH] arm64: cpuinfo: Expose MIDR_EL1 and REVIDR_EL1 to sysfs Will Deacon <will.deacon@arm.com> - 2016-06-13 14:40 +0200
    Re: [PATCH] arm64: cpuinfo: Expose MIDR_EL1 and REVIDR_EL1 to sysfs Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2016-06-13 15:30 +0200

csiph-web