[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/16] hw/arm_gic: Use NVIC instead of LEGACY_INCLUD
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH 14/16] hw/arm_gic: Use NVIC instead of LEGACY_INCLUDED_GIC define |
Date: |
Fri, 13 Apr 2012 14:04:59 +0100 |
Now all the A profile cores have been switched to use the standalone
sysbus GIC, the only remaining code which #includes arm_gic.c is
the v7M NVIC. The coupling is much closer here so it's not so
easily disentangled. For now, add a comment about how arm_gic.c
is compiled, and assume that the NVIC always includes arm_gic.c
and the non-NVIC GIC is always compiled standalone.
Signed-off-by: Peter Maydell <address@hidden>
---
hw/arm_gic.c | 13 ++++++++++---
hw/armv7m_nvic.c | 1 -
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/hw/arm_gic.c b/hw/arm_gic.c
index 81858c3..589ac5e 100644
--- a/hw/arm_gic.c
+++ b/hw/arm_gic.c
@@ -8,8 +8,15 @@
*/
/* This file contains implementation code for the RealView EB interrupt
- controller, MPCore distributed interrupt controller and ARMv7-M
- Nested Vectored Interrupt Controller. */
+ * controller, MPCore distributed interrupt controller and ARMv7-M
+ * Nested Vectored Interrupt Controller.
+ * It is compiled in two ways:
+ * (1) as a standalone file to produce a sysbus device which is a GIC
+ * that can be used on the realview board and as one of the builtin
+ * private peripherals for the ARM MP CPUs (11MPCore, A9, etc)
+ * (2) by being directly #included into armv7m_nvic.c to produce the
+ * armv7m_nvic device.
+ */
#include "sysbus.h"
@@ -909,7 +916,7 @@ static void gic_init(gic_state *s, int num_irq)
register_savevm(NULL, "arm_gic", -1, 2, gic_save, gic_load, s);
}
-#ifndef LEGACY_INCLUDED_GIC
+#ifndef NVIC
static int arm_gic_init(SysBusDevice *dev)
{
diff --git a/hw/armv7m_nvic.c b/hw/armv7m_nvic.c
index 5cfa971..986a6bb 100644
--- a/hw/armv7m_nvic.c
+++ b/hw/armv7m_nvic.c
@@ -16,7 +16,6 @@
#include "exec-memory.h"
#define NVIC 1
-#define LEGACY_INCLUDED_GIC
static uint32_t nvic_readl(void *opaque, uint32_t offset);
static void nvic_writel(void *opaque, uint32_t offset, uint32_t value);
--
1.7.1
- [Qemu-devel] [PATCH 08/16] hw/a15mpcore: switch to using sysbus GIC, (continued)
- [Qemu-devel] [PATCH 08/16] hw/a15mpcore: switch to using sysbus GIC, Peter Maydell, 2012/04/13
- [Qemu-devel] [PATCH 12/16] hw/arm11mpcore: Convert to using sysbus GIC device, Peter Maydell, 2012/04/13
- [Qemu-devel] [PATCH 11/16] hw/exynos4210_gic: Convert to using sysbus GIC, Peter Maydell, 2012/04/13
- [Qemu-devel] [PATCH 04/16] hw/arm_gic: Move NCPU definition to arm_gic.c, Peter Maydell, 2012/04/13
- [Qemu-devel] [PATCH 10/16] hw/realview_gic: switch to sysbus GIC, Peter Maydell, 2012/04/13
- [Qemu-devel] [PATCH 09/16] hw/a9mpcore: Switch to using sysbus GIC, Peter Maydell, 2012/04/13
- [Qemu-devel] [PATCH 03/16] hw/exynos4210_combiner.c: Drop excessive read/write access check., Peter Maydell, 2012/04/13
- [Qemu-devel] [PATCH 06/16] hw/arm_gic: Expose PPI inputs as gpio inputs, Peter Maydell, 2012/04/13
- [Qemu-devel] [PATCH 02/16] ARM: Exynos4210: Drop gic_cpu_write() after initialization., Peter Maydell, 2012/04/13
- [Qemu-devel] [PATCH 05/16] hw/arm_gic: Move gic_get_current_cpu into arm_gic.c, Peter Maydell, 2012/04/13
- [Qemu-devel] [PATCH 14/16] hw/arm_gic: Use NVIC instead of LEGACY_INCLUDED_GIC define,
Peter Maydell <=
- [Qemu-devel] [PATCH 07/16] hw/arm_gic: Make the GIC its own sysbus device, Peter Maydell, 2012/04/13
- [Qemu-devel] [PATCH 16/16] hw/arm_gic: Remove stray hardcoded tab, Peter Maydell, 2012/04/13
- Re: [Qemu-devel] [PULL 00/16] arm-devs queue, Blue Swirl, 2012/04/14