qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/13] Convert ARM GIC to sysbus device
@ 2012-04-04 15:30 Peter Maydell
  2012-04-04 15:30 ` [Qemu-devel] [PATCH 01/13] hw/arm_gic: Move NCPU definition to arm_gic.c Peter Maydell
                   ` (14 more replies)
  0 siblings, 15 replies; 20+ messages in thread
From: Peter Maydell @ 2012-04-04 15:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paul Brook, Evgeny Voevodin, patches

This patch series converts the ARM GIC to a self-contained
sysbus device, rather than having it be implemented by a C
file which is #included in half a dozen different other files.

The motivation for this is that when we have a KVM in-kernel
GIC implementation it will be easier to just drop that into
the model if the GIC-to-rest-of-model interface is more
cleanly defined. (Plus it's just less ugly :-))

Patches 1-3 are preliminary removals of config and provision
of a way to signal a PPI without having to call a gic internal
function to do it. Patch 4 is the actual sysbusization.
Patches 5-9 convert the various GIC users to use the sysbus
device rather than including the C file. 10-13 are minor
post-conversion cleanups.

13 is a whitespace change, which I'm normally not hugely in
favour of, but in this case it is a single line in the file...

I've left the v7M NVIC still pulling in arm_gic.c by #include.
The coupling of the NVIC and GIC code is much closer and so
disentangling things would be more work, so this patch series
is really only addressing the A-profile GIC. Possibly the
right approach would be for the NVIC to subclass the GIC?
Either that or to give up on common implementation. A good
first step would probably be to make SysTick its own device,
and use memory regions to avoid the gic distributor read/write
functions having to call out to nvic_read/write functions.
However M profile is definitely not a priority for me so I'm
not planning to do that...

The patches sit on top of arm-devs.next because of the Exynos
patch which drops use of gic_cpu_write().
http://git.linaro.org/gitweb?p=people/pmaydell/qemu-arm.git;a=shortlog;h=refs/heads/arm-devs.next

Patchset available here if you prefer git trees to emails:
http://git.linaro.org/gitweb?p=people/pmaydell/qemu-arm.git;a=shortlog;h=refs/heads/gic-as-device


Peter Maydell (13):
  hw/arm_gic: Move NCPU definition to arm_gic.c
  hw/arm_gic: Move gic_get_current_cpu into arm_gic.c
  hw/arm_gic.c: Expose PPI inputs as gpio inputs
  arm_gic: Make the GIC its own sysbus device
  hw/a15mpcore: switch to using sysbus GIC
  hw/a9mpcore.c: Switch to using sysbus GIC
  hw/realview_gic: switch to sysbus GIC
  hw/exynos4210_gic.c: Convert to using sysbus GIC
  hw/arm11mpcore: Convert to using sysbus GIC device
  hw/arm_gic: Make gic_reset a sysbus reset function
  hw/arm_gic.c: Use NVIC instead of LEGACY_INCLUDED_GIC define
  hw/arm_gic.c: gic_set_pending_private() is NVIC only
  hw/arm_gic.c: Remove stray hardcoded tab

 Makefile.target     |    1 +
 hw/a15mpcore.c      |   46 ++++++++-------
 hw/a9mpcore.c       |   72 +++++++++++------------
 hw/arm11mpcore.c    |   56 ++++++++++---------
 hw/arm_gic.c        |  156 +++++++++++++++++++++++++++++++++++++++++++--------
 hw/armv7m_nvic.c    |   24 +++++---
 hw/exynos4210_gic.c |   46 +++++++++------
 hw/realview_gic.c   |   46 +++++++++-------
 8 files changed, 293 insertions(+), 154 deletions(-)

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2012-04-05 12:23 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-04 15:30 [Qemu-devel] [PATCH 00/13] Convert ARM GIC to sysbus device Peter Maydell
2012-04-04 15:30 ` [Qemu-devel] [PATCH 01/13] hw/arm_gic: Move NCPU definition to arm_gic.c Peter Maydell
2012-04-05  4:29   ` Evgeny Voevodin
2012-04-04 15:30 ` [Qemu-devel] [PATCH 02/13] hw/arm_gic: Move gic_get_current_cpu into arm_gic.c Peter Maydell
2012-04-05  4:29   ` Evgeny Voevodin
2012-04-04 15:30 ` [Qemu-devel] [PATCH 03/13] hw/arm_gic.c: Expose PPI inputs as gpio inputs Peter Maydell
2012-04-04 15:30 ` [Qemu-devel] [PATCH 04/13] arm_gic: Make the GIC its own sysbus device Peter Maydell
2012-04-05  4:30   ` Evgeny Voevodin
2012-04-04 15:30 ` [Qemu-devel] [PATCH 05/13] hw/a15mpcore: switch to using sysbus GIC Peter Maydell
2012-04-04 15:30 ` [Qemu-devel] [PATCH 06/13] hw/a9mpcore.c: Switch " Peter Maydell
2012-04-04 15:30 ` [Qemu-devel] [PATCH 07/13] hw/realview_gic: switch to " Peter Maydell
2012-04-04 15:30 ` [Qemu-devel] [PATCH 08/13] hw/exynos4210_gic.c: Convert to using " Peter Maydell
2012-04-05  4:30   ` Evgeny Voevodin
2012-04-04 15:30 ` [Qemu-devel] [PATCH 09/13] hw/arm11mpcore: Convert to using sysbus GIC device Peter Maydell
2012-04-04 15:30 ` [Qemu-devel] [PATCH 10/13] hw/arm_gic: Make gic_reset a sysbus reset function Peter Maydell
2012-04-04 15:31 ` [Qemu-devel] [PATCH 11/13] hw/arm_gic.c: Use NVIC instead of LEGACY_INCLUDED_GIC define Peter Maydell
2012-04-04 15:31 ` [Qemu-devel] [PATCH 12/13] hw/arm_gic.c: gic_set_pending_private() is NVIC only Peter Maydell
2012-04-04 15:31 ` [Qemu-devel] [PATCH 13/13] hw/arm_gic.c: Remove stray hardcoded tab Peter Maydell
2012-04-05  4:31 ` [Qemu-devel] [PATCH 00/13] Convert ARM GIC to sysbus device Evgeny Voevodin
2012-04-05 12:23 ` Peter Maydell

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).