From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/9] arm64: move DBG_MDSCR_* to asm/debug-monitors.h
Date: Fri, 20 Jun 2014 14:00:00 +0100 [thread overview]
Message-ID: <1403269207-1625-3-git-send-email-marc.zyngier@arm.com> (raw)
In-Reply-To: <1403269207-1625-1-git-send-email-marc.zyngier@arm.com>
In order to be able to use the DBG_MDSCR_* macros from the KVM code,
move the relevant definitions to the obvious include file.
Also move the debug_el enum to a portion of the file that is guarded
by #ifndef __ASSEMBLY__ in order to use that file from assembly code.
Acked-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Anup Patel <anup.patel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm64/include/asm/debug-monitors.h | 19 ++++++++++++++-----
arch/arm64/kernel/debug-monitors.c | 9 ---------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/arch/arm64/include/asm/debug-monitors.h b/arch/arm64/include/asm/debug-monitors.h
index 6e9b5b3..7fb3437 100644
--- a/arch/arm64/include/asm/debug-monitors.h
+++ b/arch/arm64/include/asm/debug-monitors.h
@@ -18,6 +18,15 @@
#ifdef __KERNEL__
+/* Low-level stepping controls. */
+#define DBG_MDSCR_SS (1 << 0)
+#define DBG_SPSR_SS (1 << 21)
+
+/* MDSCR_EL1 enabling bits */
+#define DBG_MDSCR_KDE (1 << 13)
+#define DBG_MDSCR_MDE (1 << 15)
+#define DBG_MDSCR_MASK ~(DBG_MDSCR_KDE | DBG_MDSCR_MDE)
+
#define DBG_ESR_EVT(x) (((x) >> 27) & 0x7)
/* AArch64 */
@@ -73,11 +82,6 @@
#define CACHE_FLUSH_IS_SAFE 1
-enum debug_el {
- DBG_ACTIVE_EL0 = 0,
- DBG_ACTIVE_EL1,
-};
-
/* AArch32 */
#define DBG_ESR_EVT_BKPT 0x4
#define DBG_ESR_EVT_VECC 0x5
@@ -115,6 +119,11 @@ void unregister_break_hook(struct break_hook *hook);
u8 debug_monitors_arch(void);
+enum debug_el {
+ DBG_ACTIVE_EL0 = 0,
+ DBG_ACTIVE_EL1,
+};
+
void enable_debug_monitors(enum debug_el el);
void disable_debug_monitors(enum debug_el el);
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
index a7fb874..e022f87 100644
--- a/arch/arm64/kernel/debug-monitors.c
+++ b/arch/arm64/kernel/debug-monitors.c
@@ -30,15 +30,6 @@
#include <asm/cputype.h>
#include <asm/system_misc.h>
-/* Low-level stepping controls. */
-#define DBG_MDSCR_SS (1 << 0)
-#define DBG_SPSR_SS (1 << 21)
-
-/* MDSCR_EL1 enabling bits */
-#define DBG_MDSCR_KDE (1 << 13)
-#define DBG_MDSCR_MDE (1 << 15)
-#define DBG_MDSCR_MASK ~(DBG_MDSCR_KDE | DBG_MDSCR_MDE)
-
/* Determine debug architecture. */
u8 debug_monitors_arch(void)
{
--
1.8.3.4
next prev parent reply other threads:[~2014-06-20 13:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 12:59 [PATCH v3 0/9] arm64: KVM: debug infrastructure support Marc Zyngier
2014-06-20 12:59 ` [PATCH v3 1/9] arm64: KVM: rename pm_fake handler to trap_raz_wi Marc Zyngier
2014-07-09 9:27 ` Christoffer Dall
2014-07-09 9:36 ` Marc Zyngier
2014-06-20 13:00 ` Marc Zyngier [this message]
2014-06-20 13:00 ` [PATCH v3 3/9] arm64: KVM: add trap handlers for AArch64 debug registers Marc Zyngier
2014-07-09 9:38 ` Christoffer Dall
2014-07-09 11:09 ` Marc Zyngier
2014-07-09 14:52 ` Christoffer Dall
2014-07-09 16:20 ` Marc Zyngier
2014-06-20 13:00 ` [PATCH v3 4/9] arm64: KVM: common infrastructure for handling AArch32 CP14/CP15 Marc Zyngier
2014-06-20 13:00 ` [PATCH v3 5/9] arm64: KVM: use separate tables for AArch32 32 and 64bit traps Marc Zyngier
2014-06-20 13:00 ` [PATCH v3 6/9] arm64: KVM: check ordering of all system register tables Marc Zyngier
2014-06-20 13:00 ` [PATCH v3 7/9] arm64: KVM: add trap handlers for AArch32 debug registers Marc Zyngier
2014-07-09 9:43 ` Christoffer Dall
2014-06-20 13:00 ` [PATCH v3 8/9] arm64: KVM: implement lazy world switch for " Marc Zyngier
2014-07-09 9:45 ` Christoffer Dall
2014-07-09 11:18 ` Marc Zyngier
2014-06-20 13:00 ` [PATCH v3 9/9] arm64: KVM: enable trapping of all " Marc Zyngier
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=1403269207-1625-3-git-send-email-marc.zyngier@arm.com \
--to=marc.zyngier@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).