[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 15/16] target-arm: Add IRQ and FIQ routing to
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v3 15/16] target-arm: Add IRQ and FIQ routing to EL2 and 3 |
Date: |
Fri, 1 Aug 2014 15:27:44 +0100 |
On 17 June 2014 09:45, Edgar E. Iglesias <address@hidden> wrote:
> From: "Edgar E. Iglesias" <address@hidden>
> --- a/target-arm/helper.c
> +++ b/target-arm/helper.c
> @@ -3312,6 +3312,19 @@ unsigned int arm_excp_target_el(CPUState *cs, unsigned
> int excp_idx)
> target_el = 2;
> }
> break;
> + case EXCP_FIQ:
> + case EXCP_IRQ: {
A trivial style nit, but I prefer the { to go on its own line when
opening a new scope for a case statement like this.
> + const uint64_t hcr_mask = excp_idx == EXCP_FIQ ? HCR_FMO :
> HCR_IMO;
> + const uint32_t scr_mask = excp_idx == EXCP_FIQ ? SCR_FIQ :
> SCR_IRQ;
> +
> + if (!secure && (env->cp15.hcr_el2 & hcr_mask)) {
> + target_el = 2;
> + }
> + if (env->cp15.scr_el3 & scr_mask) {
> + target_el = 3;
> + }
> + break;
> + }
> }
> return target_el;
> }
thanks
-- PMM
- Re: [Qemu-devel] [PATCH v3 15/16] target-arm: Add IRQ and FIQ routing to EL2 and 3,
Peter Maydell <=