NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-evbarm/56420: panic: kernel diagnostic assertion "ipl > ci->ci_cpl" failed:



I'm now running with this patch.  Will update should another crash occur.

-Mike

On Sat, Oct 2, 2021 at 2:45 PM Nick Hudson <nick.hudson%gmx.co.uk@localhost> wrote:
The following reply was made to PR port-evbarm/56420; it has been noted by GNATS.

From: Nick Hudson <nick.hudson%gmx.co.uk@localhost>
To: gnats-bugs%netbsd.org@localhost, port-evbarm-maintainer%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc:
Subject: Re: port-evbarm/56420: panic: kernel diagnostic assertion "ipl >
 ci->ci_cpl" failed:
Date: Sat, 2 Oct 2021 22:00:07 +0100

 This is a multi-part message in MIME format.
 --------------4E32A988B14E023BF3AFE3CD
 Content-Type: text/plain; charset=utf-8; format=flowed
 Content-Transfer-Encoding: 7bit

 On 29/09/2021 06:50, mac%culver.net@localhost wrote:
 >> Number:         56420
 >> Category:       port-evbarm
 >> Synopsis:       when system is idle,  panic: kernel diagnostic assertion "ipl > ci->ci_cpl" failed: file "/src/sys/arch/arm/cortex/gic.c", line 381 ipl 7 cpl 7 hw-ipl 0x90

 Please try this patch

 Thanks,
 Nick


 --------------4E32A988B14E023BF3AFE3CD
 Content-Type: text/x-patch; charset=UTF-8;
  name="pr56420.diff"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment;
  filename="pr56420.diff"

 Index: sys/arch/arm/cortex/gic.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/sys/arch/arm/cortex/gic.c,v
 retrieving revision 1.50
 diff -u -p -r1.50 gic.c
 =2D-- sys/arch/arm/cortex/gic.c        26 Sep 2021 13:38:50 -0000      1.50
 +++ sys/arch/arm/cortex/gic.c  2 Oct 2021 20:57:52 -0000
 @@ -331,9 +331,17 @@ armgic_irq_handler(void *tf)

        ci->ci_data.cpu_nintr++;

 -      if (ci->ci_hwpl !=3D old_ipl) {
 +      /*
 +       * Raise ci_hwpl (and PMR) to ci_cpl and IAR will tell us if the
 +       * interrupt that got us here can have its handler run or not.
 +       */
 +      if (ci->ci_hwpl <=3D old_ipl) {
                ci->ci_hwpl =3D old_ipl;
                gicc_write(sc, GICC_PMR, armgic_ipl_to_priority(old_ipl));
 +              /*
 +               * we'll get no interrupts when PMR is IPL_HIGH, so bail
 +               * early.
 +               */
                if (old_ipl =3D=3D IPL_HIGH) {
                        return;
                }
 @@ -373,11 +381,13 @@ armgic_irq_handler(void *tf)
                 *
                 * However, if are just raising ipl, we can just update ci_cpl.
                 */
 +
 +              /* Surely we can KASSERT(ipl < ci->ci_cpl); */
                const int ipl =3D is->is_ipl;
                if (__predict_false(ipl < ci->ci_cpl)) {
                        pic_do_pending_ints(I32_bit, ipl, tf);
                        KASSERT(ci->ci_cpl =3D=3D ipl);
 -              } else {
 +              } else if (ci->ci_cpl !=3D ipl) {
                        KASSERTMSG(ipl > ci->ci_cpl, "ipl %d cpl %d hw-ipl %#x",
                            ipl, ci->ci_cpl,
                            gicc_read(sc, GICC_PMR));


 --------------4E32A988B14E023BF3AFE3CD--



Home | Main Index | Thread Index | Old Index