On 18 July 2015 at 07:00, Peter Crosthwaite <crosthwaitepe...@gmail.com> wrote: > All of these hw_errors are fatal and indicate something wrong with > QEMU implementation. > > Convert to g_assert_not_reached. > > Signed-off-by: Peter Crosthwaite <crosthwaite.pe...@gmail.com> > --- > Dropped the error messages as they are not hugely useful outside of > a debug flow. > --- > target-arm/cpu.c | 4 ++-- > target-arm/helper.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/target-arm/cpu.c b/target-arm/cpu.c > index c4b8448..8b5471a 100644 > --- a/target-arm/cpu.c > +++ b/target-arm/cpu.c > @@ -325,7 +325,7 @@ static void arm_cpu_set_irq(void *opaque, int irq, int > level) > } > break; > default: > - hw_error("arm_cpu_set_irq: Bad interrupt line %d\n", irq); > + g_assert_not_reached(); > } > } > > @@ -344,7 +344,7 @@ static void arm_cpu_kvm_set_irq(void *opaque, int irq, > int level) > kvm_irq |= KVM_ARM_IRQ_CPU_FIQ; > break; > default: > - hw_error("arm_cpu_kvm_set_irq: Bad interrupt line %d\n", irq); > + g_assert_not_reached();
We should be consistent between this and arm_cpu_set_irq() about whether we assert or LOG_UNIMP the VIRQ/VFIQ cases. I'm happy for them all to assert. > } > kvm_irq |= cs->cpu_index << KVM_ARM_IRQ_VCPU_SHIFT; > kvm_set_irq(kvm_state, kvm_irq, level ? 1 : 0); > diff --git a/target-arm/helper.c b/target-arm/helper.c > index b2f3db9..662e2bb 100644 > --- a/target-arm/helper.c > +++ b/target-arm/helper.c > @@ -3997,7 +3997,7 @@ int bank_number(int mode) > case ARM_CPU_MODE_MON: > return 7; > } > - hw_error("bank number requested for bad CPSR mode value 0x%x\n", mode); > + g_assert_not_reached(); > } > > void switch_mode(CPUARMState *env, int mode) Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> -- PMM