linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 07/13] arm64: kvm: add SYS_DESC()
Date: Tue, 31 Jan 2017 18:05:45 +0000	[thread overview]
Message-ID: <1485885951-2747-8-git-send-email-mark.rutland@arm.com> (raw)
In-Reply-To: <1485885951-2747-1-git-send-email-mark.rutland@arm.com>

This patch adds a macro enabling us to initialise sys_reg_desc
structures based on common sysreg encoding definitions in
<asm/sysreg.h>. Subsequent patches will use this to simplify the KVM
code.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm at lists.cs.columbia.edu
---
 arch/arm64/kvm/sys_regs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/kvm/sys_regs.h b/arch/arm64/kvm/sys_regs.h
index dbbb01c..aca681d 100644
--- a/arch/arm64/kvm/sys_regs.h
+++ b/arch/arm64/kvm/sys_regs.h
@@ -143,4 +143,9 @@ static inline int cmp_sys_reg(const struct sys_reg_desc *i1,
 #define CRm(_x) 	.CRm = _x
 #define Op2(_x) 	.Op2 = _x
 
+#define SYS_DESC(reg)					\
+	Op0(sys_reg_Op0(reg)), Op1(sys_reg_Op1(reg)),	\
+	CRn(sys_reg_CRn(reg)), CRm(sys_reg_CRm(reg)),	\
+	Op2(sys_reg_Op2(reg))
+
 #endif /* __ARM64_KVM_SYS_REGS_LOCAL_H__ */
-- 
1.9.1

  parent reply	other threads:[~2017-01-31 18:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 18:05 [RFC PATCH 00/13] arm64/kvm: use common sysreg definitions Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 01/13] arm64: sysreg: sort by encoding Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 02/13] arm64: sysreg: add debug system registers Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 03/13] arm64: sysreg: add performance monitor registers Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 04/13] arm64: sysreg: subsume GICv3 sysreg definitions Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 05/13] arm64: sysreg: add register encodings used by KVM Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 06/13] arm64: sysreg: add Set/Way sys encodings Mark Rutland
2017-01-31 18:05 ` Mark Rutland [this message]
2017-01-31 18:05 ` [RFC PATCH 08/13] arm64: kvm: Use common debug sysreg definitions Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 09/13] arm64: kvm: Use common performance monitor " Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 10/13] arm64: kvm: Use common GICv3 " Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 11/13] arm64: kvm: use common invariant " Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 12/13] arm64: kvm: Use common " Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 13/13] arm64: kvm: Use common Set/Way sys definitions Mark Rutland
2017-02-24 10:16 ` [RFC PATCH 00/13] arm64/kvm: use common sysreg definitions Christoffer Dall
2017-02-24 12:16   ` 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=1485885951-2747-8-git-send-email-mark.rutland@arm.com \
    --to=mark.rutland@arm.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).