From: Zenghui Yu <yuzenghui@huawei.com>
To: <drjones@redhat.com>, <kvm@vger.kernel.org>,
<kvmarm@lists.cs.columbia.edu>
Subject: [kvm-unit-tests PATCH 1/3] arm/arm64: gic: Move gic_state enumeration to asm/gic.h
Date: Tue, 11 Feb 2020 16:38:59 +0800 [thread overview]
Message-ID: <20200211083901.1478-2-yuzenghui@huawei.com> (raw)
In-Reply-To: <20200211083901.1478-1-yuzenghui@huawei.com>
The status of each interrupt are defined by the GIC architecture and
maintained by GIC hardware. They're not specified to the timer HW.
Let's move this software enumeration to a more proper place.
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
---
arm/timer.c | 7 -------
lib/arm/asm/gic.h | 7 +++++++
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/arm/timer.c b/arm/timer.c
index dea364f..94543f2 100644
--- a/arm/timer.c
+++ b/arm/timer.c
@@ -17,13 +17,6 @@
#define ARCH_TIMER_CTL_IMASK (1 << 1)
#define ARCH_TIMER_CTL_ISTATUS (1 << 2)
-enum gic_state {
- GIC_STATE_INACTIVE,
- GIC_STATE_PENDING,
- GIC_STATE_ACTIVE,
- GIC_STATE_ACTIVE_PENDING,
-};
-
static void *gic_isactiver;
static void *gic_ispendr;
static void *gic_isenabler;
diff --git a/lib/arm/asm/gic.h b/lib/arm/asm/gic.h
index 09826fd..a72e0cd 100644
--- a/lib/arm/asm/gic.h
+++ b/lib/arm/asm/gic.h
@@ -47,6 +47,13 @@
#ifndef __ASSEMBLY__
#include <asm/cpumask.h>
+enum gic_state {
+ GIC_STATE_INACTIVE,
+ GIC_STATE_PENDING,
+ GIC_STATE_ACTIVE,
+ GIC_STATE_ACTIVE_PENDING,
+};
+
/*
* gic_init will try to find all known gics, and then
* initialize the gic data for the one found.
--
2.19.1
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next prev parent reply other threads:[~2020-02-11 8:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 8:38 [kvm-unit-tests PATCH 0/3] arm64: minor cleanups for timer test Zenghui Yu
2020-02-11 8:38 ` Zenghui Yu [this message]
2020-02-11 8:39 ` [kvm-unit-tests PATCH 2/3] arm64: timer: Use the proper RDist register name in GICv3 Zenghui Yu
2020-02-11 9:26 ` Alexandru Elisei
2020-02-11 8:39 ` [kvm-unit-tests PATCH 3/3] arm64: timer: Use existing helpers to access counter/timers Zenghui Yu
2020-02-11 12:27 ` [kvm-unit-tests PATCH 0/3] arm64: minor cleanups for timer test Andrew Jones
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=20200211083901.1478-2-yuzenghui@huawei.com \
--to=yuzenghui@huawei.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
/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).