qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: qemu-ppc@nongnu.org, Greg Kurz <groug@kaod.org>, qemu-devel@nongnu.org
Subject: Re: [RESEND PATCH 1/3] hw/intc: openpic: Correct the reset value of IPIDR for FSL chipset
Date: Tue, 21 Sep 2021 13:25:23 +1000	[thread overview]
Message-ID: <YUlQo68s9mxISwEs@yekko> (raw)
In-Reply-To: <20210918032653.646370-1-bin.meng@windriver.com>

[-- Attachment #1: Type: text/plain, Size: 2081 bytes --]

On Sat, Sep 18, 2021 at 11:26:51AM +0800, Bin Meng wrote:
> The reset value of IPIDR should be zero for Freescale chipset, per
> the following 2 manuals I checked:
> 
> - P2020RM (https://www.nxp.com/webapp/Download?colCode=P2020RM)
> - P4080RM (https://www.nxp.com/webapp/Download?colCode=P4080RM)
> 
> Currently it is set to 1, which leaves the IPI enabled on core 0
> after power-on reset. Such may cause unexpected interrupt to be
> delivered to core 0 if the IPI is triggered from core 0 to other
> cores later.
> 
> Fixes: ffd5e9fe0276 ("openpic: Reset IRQ source private members")
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/584
> Signed-off-by: Bin Meng <bin.meng@windriver.com>

Since these patches are very simple and look sensible, I've applied
them to ppc-for-6.2.

However, you should note that Greg and I are both moving into other
areas and don't have much capacity for ppc maintainership any more.
Therefore I'll shortly be sending some MAINTAINERS updates moving
openpic (amongst other things) to "Orphan" status.

> ---
> 
>  hw/intc/openpic.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
> index 9b4c17854d..2790c6710a 100644
> --- a/hw/intc/openpic.c
> +++ b/hw/intc/openpic.c
> @@ -1276,6 +1276,15 @@ static void openpic_reset(DeviceState *d)
>              break;
>          }
>  
> +        /* Mask all IPI interrupts for Freescale OpenPIC */
> +        if ((opp->model == OPENPIC_MODEL_FSL_MPIC_20) ||
> +            (opp->model == OPENPIC_MODEL_FSL_MPIC_42)) {
> +            if (i >= opp->irq_ipi0 && i < opp->irq_tim0) {
> +                write_IRQreg_idr(opp, i, 0);
> +                continue;
> +            }
> +        }
> +
>          write_IRQreg_idr(opp, i, opp->idr_reset);
>      }
>      /* Initialise IRQ destinations */

-- 
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 --]

  parent reply	other threads:[~2021-09-21  3:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-18  3:26 [RESEND PATCH 1/3] hw/intc: openpic: Correct the reset value of IPIDR for FSL chipset Bin Meng
2021-09-18  3:26 ` [RESEND PATCH 2/3] hw/intc: openpic: Drop Raven related codes Bin Meng
2021-09-18  3:26 ` [RESEND PATCH 3/3] hw/intc: openpic: Clean up the styles Bin Meng
2021-09-21  3:25 ` David Gibson [this message]
2021-09-21  8:13   ` [RESEND PATCH 1/3] hw/intc: openpic: Correct the reset value of IPIDR for FSL chipset Philippe Mathieu-Daudé
2021-09-21  9:31     ` David Gibson
2021-09-23  5:33     ` Bin Meng
2021-09-27  4:30       ` David Gibson

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=YUlQo68s9mxISwEs@yekko \
    --to=david@gibson.dropbear.id.au \
    --cc=bmeng.cn@gmail.com \
    --cc=groug@kaod.org \
    --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 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).