mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, catalin.marinas@arm.com,
	dave.martin@arm.com, aph@redhat.com, will.deacon@arm.com,
	ryan.arnold@linaro.org, sid@reserved-bit.com,
	adhemerval.zanella@linaro.org, mark.rutland@arm.com,
	marc.zyngier@arm.com, Suzuki K Poulose <suzuki.poulose@arm.com>
Subject: [PATCH 0/9] arm64: Expose CPUID registers via emulation
Date: Thu, 24 Nov 2016 13:40:00 +0000	[thread overview]
Message-ID: <1479994809-9081-1-git-send-email-suzuki.poulose@arm.com> (raw)

This series adds a new ABI to expose the CPU feature registers
to the user space via emulation of MRS instruction. The system exposes
only a limited set of feature values (See the documentation patch)
from the cpufeature infrastructure. The feature bits that are not
exposed are set to the 'safe value' which implies 'not supported'.

Apart from the selected feature registers, we expose MIDR_EL1 (Main
ID Register). The user should be aware that, reading MIDR_EL1 can be
tricky on a heterogeneous system (just like getcpu()). We export the
value of the current CPU where 'MRS' is executed.

Mark Rutland (2):
  arm64: cpufeature: treat unknown fields as RES0
  arm64: cpufeature: remove explicit RAZ fields

Suzuki K Poulose (7):
  arm64: cpufeature: Cleanup feature bit tables
  arm64: cpufeature: Document the rules of safe value for features
  arm64: cpufeature: Define helpers for sys_reg id
  arm64: Add helper to decode register from instruction
  arm64: cpufeature: Track user visible fields
  arm64: cpufeature: Expose CPUID registers by emulation
  arm64: Documentation - Expose CPU feature registers

 Documentation/arm64/cpu-feature-registers.txt | 198 +++++++++++++++
 arch/arm64/include/asm/cpufeature.h           |  27 +-
 arch/arm64/include/asm/insn.h                 |   2 +
 arch/arm64/include/asm/sysreg.h               |  25 +-
 arch/arm64/include/uapi/asm/hwcap.h           |   1 +
 arch/arm64/kernel/cpufeature.c                | 339 +++++++++++++++++---------
 arch/arm64/kernel/cpuinfo.c                   |   1 +
 arch/arm64/kernel/insn.c                      |  29 +++
 arch/arm64/kernel/traps.c                     |   2 +-
 9 files changed, 503 insertions(+), 121 deletions(-)
 create mode 100644 Documentation/arm64/cpu-feature-registers.txt

-- 
2.7.4

             reply	other threads:[~2016-11-24 13:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24 13:40 Suzuki K Poulose [this message]
2016-11-24 13:40 ` [PATCH 1/9] arm64: cpufeature: treat unknown fields as RES0 Suzuki K Poulose
2016-11-24 13:40 ` [PATCH 2/9] arm64: cpufeature: remove explicit RAZ fields Suzuki K Poulose
2016-11-24 13:40 ` [PATCH 3/9] arm64: cpufeature: Cleanup feature bit tables Suzuki K Poulose
2016-11-24 13:40 ` [PATCH 4/9] arm64: cpufeature: Document the rules of safe value for features Suzuki K Poulose
2016-11-24 13:40 ` [PATCH 5/9] arm64: cpufeature: Define helpers for sys_reg id Suzuki K Poulose
2016-11-30 11:04   ` Will Deacon
2016-11-30 14:16     ` Suzuki K Poulose
2016-11-24 13:40 ` [PATCH 6/9] arm64: Add helper to decode register from instruction Suzuki K Poulose
2016-11-24 13:40 ` [PATCH 7/9] arm64: cpufeature: Track user visible fields Suzuki K Poulose
2016-11-24 13:40 ` [PATCH 8/9] arm64: cpufeature: Expose CPUID registers by emulation Suzuki K Poulose
2016-11-24 13:40 ` [PATCH 9/9] arm64: Documentation - Expose CPU feature registers Suzuki K Poulose
2016-11-24 18:44   ` Catalin Marinas
2016-11-30 11:41     ` Suzuki K Poulose
2016-11-30 11:14   ` Siddhesh Poyarekar
2016-11-30 11:30     ` Suzuki K Poulose
2016-11-30 11:33       ` Siddhesh Poyarekar
2016-11-30 11:31     ` Catalin Marinas

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=1479994809-9081-1-git-send-email-suzuki.poulose@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=aph@redhat.com \
    --cc=catalin.marinas@arm.com \
    --cc=dave.martin@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=ryan.arnold@linaro.org \
    --cc=sid@reserved-bit.com \
    --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

all inboxes | Powered by JetHome®