aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZenghui Yu <yuzenghui@huawei.com>2020-02-11 16:38:59 +0800
committerAndrew Jones <drjones@redhat.com>2020-04-03 09:40:34 +0200
commite44a257a89ef821802b21cf4fd0ee6f124278e15 (patch)
treeb4ef21d2f7937bf02149dd8f858940469a505967
parent410b3bf09e76fd2b6d68b424a26d407a0bc4bc11 (diff)
downloadkvm-unit-tests-e44a257a89ef821802b21cf4fd0ee6f124278e15.tar.gz
arm/arm64: gic: Move gic_state enumeration to asm/gic.h
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> Signed-off-by: Andrew Jones <drjones@redhat.com>
-rw-r--r--arm/timer.c7
-rw-r--r--lib/arm/asm/gic.h7
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.