All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] gic_cpu_write() call in exynos4210_gic_init()
@ 2012-04-03 16:45 Peter Maydell
  2012-04-04  3:45 ` Evgeny Voevodin
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2012-04-03 16:45 UTC (permalink / raw)
  To: QEMU Developers, Evgeny Voevodin, Maksim Kozlov, Igor Mitsyanko,
	Dmitry Solodkiy

Hi; I've been working on a refactoring of the ARM GIC code (trying
to make it its own sysbus device rather than having the .c file
included from lots of places), and I noticed the following odd code
in hw/exynos4210_gic.c:exynos4210_gic_init():

    gic_cpu_write(&s->gic, 1, 0, 1);

This seems to be trying to enable the CPU interface for CPU 1
(by directly calling the GIC function for writing a word to
that CPU interface). However, doing this in an init function
doesn't seem correct -- the write will change the GIC's internal
state but the change would be undone by a reset. (This happens
to work at the moment because we don't actually reset the GIC
at reset! However I intend to fix that bug...)

What was the intention of this code, and can we just drop it,
or do it in some other way? Does the Exynos GIC really reset
with the second CPU interface enabled?

My guess is that we either want a device property for CPU
interface state on reset (if the Exynos GIC resets differently
to the standard GIC), or this should be being done in the
arm_boot code if it's just trying to emulate behaviour of some
boot ROM...

thanks
-- PMM

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

end of thread, other threads:[~2012-04-04  3:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-03 16:45 [Qemu-devel] gic_cpu_write() call in exynos4210_gic_init() Peter Maydell
2012-04-04  3:45 ` Evgeny Voevodin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.