All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Fabiano Rosas <farosas@linux.ibm.com>, qemu-devel@nongnu.org
Cc: danielhb413@gmail.com, qemu-ppc@nongnu.org, clg@kaod.org,
	david@gibson.dropbear.id.au
Subject: Re: [PATCH v2 07/14] target/ppc: 405: External exception cleanup
Date: Thu, 27 Jan 2022 09:02:21 +1100	[thread overview]
Message-ID: <b2874090-0913-530f-b7bb-976ae6768a80@linaro.org> (raw)
In-Reply-To: <20220118184448.852996-8-farosas@linux.ibm.com>

On 1/19/22 5:44 AM, Fabiano Rosas wrote:
> 405 has no MSR_HV and EPR is BookE only so we can remove it all.
> 
> Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>   target/ppc/excp_helper.c | 37 -------------------------------------
>   1 file changed, 37 deletions(-)
> 
> diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
> index e98d783ecd..8fae8aa0be 100644
> --- a/target/ppc/excp_helper.c
> +++ b/target/ppc/excp_helper.c
> @@ -472,44 +472,7 @@ static void powerpc_excp_40x(PowerPCCPU *cpu, int excp)
>           msr |= env->error_code;
>           break;
>       case POWERPC_EXCP_EXTERNAL:  /* External input                           */
> -    {
> -        bool lpes0;
> -
> -        cs = CPU(cpu);
> -
> -        /*
> -         * Exception targeting modifiers
> -         *
> -         * LPES0 is supported on POWER7/8/9
> -         * LPES1 is not supported (old iSeries mode)
> -         *
> -         * On anything else, we behave as if LPES0 is 1
> -         * (externals don't alter MSR:HV)
> -         */
> -#if defined(TARGET_PPC64)
> -        if (excp_model == POWERPC_EXCP_POWER7 ||
> -            excp_model == POWERPC_EXCP_POWER8 ||
> -            excp_model == POWERPC_EXCP_POWER9 ||
> -            excp_model == POWERPC_EXCP_POWER10) {
> -            lpes0 = !!(env->spr[SPR_LPCR] & LPCR_LPES0);
> -        } else
> -#endif /* defined(TARGET_PPC64) */
> -        {
> -            lpes0 = true;
> -        }
> -
> -        if (!lpes0) {
> -            new_msr |= (target_ulong)MSR_HVB;
> -            new_msr |= env->msr & ((target_ulong)1 << MSR_RI);
> -            srr0 = SPR_HSRR0;
> -            srr1 = SPR_HSRR1;
> -        }
> -        if (env->mpic_proxy) {
> -            /* IACK the IRQ on delivery */
> -            env->spr[SPR_BOOKE_EPR] = ldl_phys(cs->as, env->mpic_iack);
> -        }
>           break;
> -    }

Bare break?  Should this be reachable at all?
Should it in fact be g_assert_not_reached()?


r~


  reply	other threads:[~2022-01-26 22:04 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 18:44 [PATCH v2 00/14] target/ppc: powerpc_excp improvements [40x] (3/n) Fabiano Rosas
2022-01-18 18:44 ` [PATCH v2 01/14] target/ppc: 405: Rename MSR_POW to MSR_WE Fabiano Rosas
2022-01-19 11:27   ` Cédric Le Goater
2022-01-18 18:44 ` [PATCH v2 02/14] target/ppc: 405: Add missing MSR_ME bit Fabiano Rosas
2022-01-19 11:26   ` Cédric Le Goater
2022-01-18 18:44 ` [PATCH v2 03/14] target/ppc: Introduce powerpc_excp_40x Fabiano Rosas
2022-01-19 11:28   ` Cédric Le Goater
2022-01-26 21:58   ` Richard Henderson
2022-01-18 18:44 ` [PATCH v2 04/14] target/ppc: Simplify powerpc_excp_40x Fabiano Rosas
2022-01-19  6:04   ` David Gibson
2022-01-18 18:44 ` [PATCH v2 05/14] target/ppc: 405: Critical exceptions cleanup Fabiano Rosas
2022-01-26 21:58   ` Richard Henderson
2022-01-18 18:44 ` [PATCH v2 06/14] target/ppc: 405: Machine check exception cleanup Fabiano Rosas
2022-01-19  6:06   ` David Gibson
2022-01-19 11:21     ` Cédric Le Goater
2022-01-18 18:44 ` [PATCH v2 07/14] target/ppc: 405: External " Fabiano Rosas
2022-01-26 22:02   ` Richard Henderson [this message]
2022-01-26 22:20     ` Fabiano Rosas
2022-01-18 18:44 ` [PATCH v2 08/14] target/ppc: 405: System call " Fabiano Rosas
2022-01-19  6:09   ` David Gibson
2022-01-25  8:18     ` Cédric Le Goater
2022-01-25 11:27       ` Cédric Le Goater
2022-01-25 12:49       ` BALATON Zoltan
2022-01-26 22:02   ` Richard Henderson
2022-01-18 18:44 ` [PATCH v2 09/14] target/ppc: 405: Alignment " Fabiano Rosas
2022-01-19  6:11   ` David Gibson
2022-01-18 18:44 ` [PATCH v2 10/14] target/ppc: 405: Debug " Fabiano Rosas
2022-01-19  6:12   ` David Gibson
2022-01-18 18:44 ` [PATCH v2 11/14] target/ppc: 405: Data Storage " Fabiano Rosas
2022-01-19  6:13   ` David Gibson
2022-01-19 11:25     ` Cédric Le Goater
2022-01-25  7:23     ` Cédric Le Goater
2022-01-25  7:29       ` Cédric Le Goater
2022-01-18 18:44 ` [PATCH v2 12/14] target/ppc: 405: Instruction storage interrupt cleanup Fabiano Rosas
2022-01-20 22:17   ` Cédric Le Goater
2022-01-25  7:24   ` Cédric Le Goater
2022-01-18 18:44 ` [PATCH v2 13/14] target/ppc: 405: Program exception cleanup Fabiano Rosas
2022-01-19  6:15   ` David Gibson
2022-01-19 12:54     ` Fabiano Rosas
2022-01-20 16:23       ` Cédric Le Goater
2022-01-25  7:25   ` Cédric Le Goater
2022-01-18 18:44 ` [PATCH v2 14/14] target/ppc: 405: Watchdog timer " Fabiano Rosas
2022-01-25  7:26   ` Cédric Le Goater
2022-01-20  9:33 ` [PATCH v2 00/14] target/ppc: powerpc_excp improvements [40x] (3/n) Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2874090-0913-530f-b7bb-976ae6768a80@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=farosas@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.