diff options
author | Alexander Graf <agraf@suse.de> | 2013-01-17 11:32:21 +0100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-01-18 19:06:57 +0100 |
commit | e49798b1bd7657722080126bfd5e787efdb3bc23 (patch) | |
tree | ceab0b09a3aee7312aa6f43c28839d7e3feb68ca /hw/openpic.c | |
parent | d3dccee187ffeacec1a38ed288c112ffa0e3b513 (diff) |
openpic: export e500 epr enable into a ppc.c function
Enabling and disabling the EPR capability (mpic_proxy) is a system
wide operation. As such, it belongs into the ppc.c file, since that's
where PPC specific machine wide logic happens.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/openpic.c')
-rw-r--r-- | hw/openpic.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/hw/openpic.c b/hw/openpic.c index bcafe0a12c..cc8ec35b5d 100644 --- a/hw/openpic.c +++ b/hw/openpic.c @@ -40,6 +40,7 @@ #include "sysbus.h" #include "pci/msi.h" #include "qemu/bitops.h" +#include "ppc.h" //#define DEBUG_OPENPIC @@ -646,8 +647,7 @@ static inline void write_IRQreg_ivpr(OpenPICState *opp, int n_IRQ, uint32_t val) static void openpic_gcr_write(OpenPICState *opp, uint64_t val) { - CPUArchState *env; - int mpic_proxy = 0; + bool mpic_proxy = false; if (val & GCR_RESET) { openpic_reset(&opp->busdev.qdev); @@ -659,11 +659,10 @@ static void openpic_gcr_write(OpenPICState *opp, uint64_t val) /* Set external proxy mode */ if ((val & opp->mpic_mode_mask) == GCR_MODE_PROXY) { - mpic_proxy = 1; - } - for (env = first_cpu; env != NULL; env = env->next_cpu) { - env->mpic_proxy = mpic_proxy; + mpic_proxy = true; } + + ppce500_set_mpic_proxy(mpic_proxy); } static void openpic_gbl_write(void *opaque, hwaddr addr, uint64_t val, |