From: David Gibson <david@gibson.dropbear.id.au>
To: Fabiano Rosas <farosas@linux.ibm.com>
Cc: richard.henderson@linaro.org, danielhb413@gmail.com,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org, clg@kaod.org
Subject: Re: [PATCH v2 3/5] target/ppc: powerpc_excp: Set vector earlier
Date: Sat, 1 Jan 2022 19:31:56 +1100 [thread overview]
Message-ID: <YdARfHm0SB7gn8UC@yekko> (raw)
In-Reply-To: <20211229165751.3774248-4-farosas@linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2195 bytes --]
On Wed, Dec 29, 2021 at 01:57:49PM -0300, Fabiano Rosas wrote:
> None of the interrupt setup code touches 'vector', so we can move it
> earlier in the function. This will allow us to later move the System
> Call Vectored setup that is on the top level into the
> POWERPC_EXCP_SYSCALL_VECTORED code block.
>
> This patch also moves the verification for when 'excp' does not have
> an address associated with it. We now bail a little earlier when that
> is the case. This should not cause any visible effects.
>
> Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> target/ppc/excp_helper.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
> index 9a03e4b896..1fe20b4806 100644
> --- a/target/ppc/excp_helper.c
> +++ b/target/ppc/excp_helper.c
> @@ -356,6 +356,14 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int excp_model, int excp)
> }
> #endif
>
> + vector = env->excp_vectors[excp];
> + if (vector == (target_ulong)-1ULL) {
> + cpu_abort(cs, "Raised an exception without defined vector %d\n",
> + excp);
> + }
> +
> + vector |= env->excp_prefix;
> +
> switch (excp) {
> case POWERPC_EXCP_CRITICAL: /* Critical input */
> switch (excp_model) {
> @@ -832,14 +840,6 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int excp_model, int excp)
> }
> #endif
>
> - vector = env->excp_vectors[excp];
> - if (vector == (target_ulong)-1ULL) {
> - cpu_abort(cs, "Raised an exception without defined vector %d\n",
> - excp);
> - }
> -
> - vector |= env->excp_prefix;
> -
> #if defined(TARGET_PPC64)
> if (excp_model == POWERPC_EXCP_BOOKE) {
> if (env->spr[SPR_BOOKE_EPCR] & EPCR_ICM) {
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-01-01 8:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-29 16:57 [PATCH v2 0/5] target/ppc: powerpc_excp improvements (1/n) Fabiano Rosas
2021-12-29 16:57 ` [PATCH v2 1/5] target/ppc: powerpc_excp: Set alternate SRRs directly Fabiano Rosas
2021-12-29 16:57 ` [PATCH v2 2/5] target/ppc: powerpc_excp: Add excp_vectors bounds check Fabiano Rosas
2021-12-30 22:04 ` Richard Henderson
2021-12-31 7:40 ` Cédric Le Goater
2022-01-01 8:29 ` David Gibson
2021-12-29 16:57 ` [PATCH v2 3/5] target/ppc: powerpc_excp: Set vector earlier Fabiano Rosas
2021-12-30 22:05 ` Richard Henderson
2022-01-01 8:31 ` David Gibson [this message]
2021-12-29 16:57 ` [PATCH v2 4/5] target/ppc: powerpc_excp: Move system call vectored code together Fabiano Rosas
2021-12-29 16:57 ` [PATCH v2 5/5] target/ppc: powerpc_excp: Stop passing excp_model around Fabiano Rosas
2022-01-04 7:40 ` [PATCH v2 0/5] target/ppc: powerpc_excp improvements (1/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=YdARfHm0SB7gn8UC@yekko \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=danielhb413@gmail.com \
--cc=farosas@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).