diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2014-05-30 19:34:14 +1000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-06-27 13:48:26 +0200 |
commit | a7e519a8cf12c9f08a28339743b648dde38cd9d3 (patch) | |
tree | 3164efff15ce7e12ac5afecf961b5b999e535e0f /hw/intc/xics.c | |
parent | 641c349352cd3846ad164357d5a831e748d13536 (diff) |
xics: Disable flags reset on xics reset
Since islsi[] array has been merged into the ICSState struct,
we must not reset flags as they tell if the interrupt is in use.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/intc/xics.c')
-rw-r--r-- | hw/intc/xics.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/intc/xics.c b/hw/intc/xics.c index c02feaf583..634101ac23 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -520,11 +520,18 @@ static void ics_reset(DeviceState *dev) { ICSState *ics = ICS(dev); int i; + uint8_t flags[ics->nr_irqs]; + + for (i = 0; i < ics->nr_irqs; i++) { + flags[i] = ics->irqs[i].flags; + } memset(ics->irqs, 0, sizeof(ICSIRQState) * ics->nr_irqs); + for (i = 0; i < ics->nr_irqs; i++) { ics->irqs[i].priority = 0xff; ics->irqs[i].saved_priority = 0xff; + ics->irqs[i].flags = flags[i]; } } |