Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Nov 2023 10:20:49 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Baptiste Daroussin <bapt@freebsd.org>
Cc:        Mitchell Horne <mhorne@freebsd.org>, src-committers@freebsd.org,  dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: ad34121518bb - main - Revert "pst: improve shutdown_post_sync handler"
Message-ID:  <CANCZdfoQKz3UMwBnjWmhgF8JfL1hGa3a38pCpKntURO7Q1u=Hg@mail.gmail.com>
In-Reply-To: <kwospnhlihtje5ulpka3erdesqoa4sm2dui7pjwlnjekfwaakt@ezx2625mw3oo>
References:  <202311231948.3ANJmwEC076780@gitrepo.freebsd.org> <CAGudoHFwnCWz-z6YmEpF0QaRUHyWHuJT=nj%2BtQC5K1rAg0MQ4A@mail.gmail.com> <yw3xo6euy6nmit36hm5miyptdsb3fxb3m24mveve6e4e4opms3@3d7caqefcmot> <kwospnhlihtje5ulpka3erdesqoa4sm2dui7pjwlnjekfwaakt@ezx2625mw3oo>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000773f69060b39a4ec
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Maybe f97aab79868cd7d891c52b14bd964523fa56f015 fixes this?

Warner

On Tue, Nov 28, 2023 at 10:11=E2=80=AFAM Baptiste Daroussin <bapt@freebsd.o=
rg>
wrote:

> i386 kernel is still broken :(
>
> /home/bapt/worktrees/main/sys/dev/pst/pst-raid.c:185:9: error: incomplete
> definition of type 'struct thread'
>
> Best regards,
> Bapt
>
>
> On Sat, Nov 25, 2023 at 08:51:36AM +0100, Baptiste Daroussin wrote:
> > Kernel building for i386 is broken now and pkgbase builders do complain=
,
> can
> > anyone have a look?
> >
> > Best regards,
> > Bapt
> >
> > On Thu, Nov 23, 2023 at 10:09:35PM +0100, Mateusz Guzik wrote:
> > > i386 kernel is going down, i suggest just dropping the patch
> > >
> > > On 11/23/23, Mitchell Horne <mhorne@freebsd.org> wrote:
> > > > The branch main has been updated by mhorne:
> > > >
> > > > URL:
> > > >
> https://cgit.FreeBSD.org/src/commit/?id=3Dad34121518bb7e1a38d4a6b1ccf9ca6=
fe298dd0a
> > > >
> > > > commit ad34121518bb7e1a38d4a6b1ccf9ca6fe298dd0a
> > > > Author:     Mitchell Horne <mhorne@FreeBSD.org>
> > > > AuthorDate: 2023-11-23 19:46:28 +0000
> > > > Commit:     Mitchell Horne <mhorne@FreeBSD.org>
> > > > CommitDate: 2023-11-23 19:48:44 +0000
> > > >
> > > >     Revert "pst: improve shutdown_post_sync handler"
> > > >
> > > >     I did not realize this driver was i386-only, and the change
> fails to
> > > >     compile. Revert so that I can fix it properly.
> > > >
> > > >     This reverts commit 428ebb7cd9f51afb6809bf81cf21a05e0fd93ff4.
> > > >
> > > >     Pointy hat to: mhorne
> > > > ---
> > > >  sys/dev/pst/pst-iop.c  |  2 +-
> > > >  sys/dev/pst/pst-raid.c | 14 +++++---------
> > > >  2 files changed, 6 insertions(+), 10 deletions(-)
> > > >
> > > > diff --git a/sys/dev/pst/pst-iop.c b/sys/dev/pst/pst-iop.c
> > > > index 43ced2401d2c..f9921a564333 100644
> > > > --- a/sys/dev/pst/pst-iop.c
> > > > +++ b/sys/dev/pst/pst-iop.c
> > > > @@ -432,7 +432,7 @@ iop_queue_wait_msg(struct iop_softc *sc, int
> mfa, struct
> > > > i2o_basic_message *msg)
> > > >      int status, timeout =3D 10000;
> > > >
> > > >      mtx_lock(&sc->mtx);
> > > > -    if ((sc->reg->oqueue_intr_mask & I20_OUT_INTR_QUEUE) =3D=3D 0)=
 {
> > > > +    if (!(sc->reg->oqueue_intr_mask & 0x08)) {
> > > >          msg->transaction_context =3D (u_int32_t)&request;
> > > >          msg->initiator_context =3D (u_int32_t)iop_done;
> > > >          sc->reg->iqueue =3D mfa;
> > > > diff --git a/sys/dev/pst/pst-raid.c b/sys/dev/pst/pst-raid.c
> > > > index 4f9279462ee8..4e9c4fb724bc 100644
> > > > --- a/sys/dev/pst/pst-raid.c
> > > > +++ b/sys/dev/pst/pst-raid.c
> > > > @@ -73,7 +73,7 @@ struct pst_request {
> > > >  static disk_strategy_t pststrategy;
> > > >  static int pst_probe(device_t);
> > > >  static int pst_attach(device_t);
> > > > -static void pst_shutdown_post_sync(device_t, int);
> > > > +static int pst_shutdown(device_t);
> > > >  static void pst_start(struct pst_softc *);
> > > >  static void pst_done(struct iop_softc *, u_int32_t, struct
> i2o_single_reply
> > > > *);
> > > >  static int pst_rw(struct pst_request *);
> > > > @@ -170,23 +170,18 @@ pst_attach(device_t dev)
> > > >      name, psc->info->capacity/(512*255*63), 255, 63,
> > > >      device_get_nameunit(psc->iop->dev));
> > > >
> > > > -    EVENTHANDLER_REGISTER(shutdown_post_sync,
> pst_shutdown_post_sync,
> > > > +    EVENTHANDLER_REGISTER(shutdown_post_sync, pst_shutdown,
> > > >                     dev, SHUTDOWN_PRI_FIRST);
> > > >      return 0;
> > > >  }
> > > >
> > > > -static void
> > > > -pst_shutdown_post_sync(device_t dev, int howto __unused)
> > > > +static int
> > > > +pst_shutdown(device_t dev)
> > > >  {
> > > >      struct pst_softc *psc =3D device_get_softc(dev);
> > > >      struct i2o_bsa_cache_flush_message *msg;
> > > >      int mfa;
> > > >
> > > > -    if (SCHEDULER_STOPPED()) {
> > > > - /* Request polled shutdown. */
> > > > - psc->reg->oqueue_intr_mask =3D 0xffffffff;
> > > > -    }
> > > > -
> > > >      mfa =3D iop_get_mfa(psc->iop);
> > > >      msg =3D (struct i2o_bsa_cache_flush_message *)(psc->iop->ibase=
 +
> mfa);
> > > >      bzero(msg, sizeof(struct i2o_bsa_cache_flush_message));
> > > > @@ -199,6 +194,7 @@ pst_shutdown_post_sync(device_t dev, int howto
> > > > __unused)
> > > >      msg->control_flags =3D 0x0; /* 0x80 =3D post progress reports =
*/
> > > >      if (iop_queue_wait_msg(psc->iop, mfa, (struct i2o_basic_messag=
e
> > > > *)msg))
> > > >   printf("pst: shutdown failed!\n");
> > > > +    return 0;
> > > >  }
> > > >
> > > >  static void
> > > >
> > > >
> > >
> > >
> > > --
> > > Mateusz Guzik <mjguzik gmail.com>
> > >
> >
>

--000000000000773f69060b39a4ec
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Maybe=C2=A0f97aab79868cd7d891c52b14bd964523fa56f015 fixes =
this?<div><br></div><div>Warner</div></div><br><div class=3D"gmail_quote"><=
div dir=3D"ltr" class=3D"gmail_attr">On Tue, Nov 28, 2023 at 10:11=E2=80=AF=
AM Baptiste Daroussin &lt;<a href=3D"mailto:bapt@freebsd.org">bapt@freebsd.=
org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1e=
x">i386 kernel is still broken :(<br>
<br>
/home/bapt/worktrees/main/sys/dev/pst/pst-raid.c:185:9: error: incomplete<b=
r>
definition of type &#39;struct thread&#39;<br>
<br>
Best regards,<br>
Bapt<br>
<br>
<br>
On Sat, Nov 25, 2023 at 08:51:36AM +0100, Baptiste Daroussin wrote:<br>
&gt; Kernel building for i386 is broken now and pkgbase builders do complai=
n, can<br>
&gt; anyone have a look?<br>
&gt; <br>
&gt; Best regards,<br>
&gt; Bapt<br>
&gt; <br>
&gt; On Thu, Nov 23, 2023 at 10:09:35PM +0100, Mateusz Guzik wrote:<br>
&gt; &gt; i386 kernel is going down, i suggest just dropping the patch<br>
&gt; &gt; <br>
&gt; &gt; On 11/23/23, Mitchell Horne &lt;<a href=3D"mailto:mhorne@freebsd.=
org" target=3D"_blank">mhorne@freebsd.org</a>&gt; wrote:<br>
&gt; &gt; &gt; The branch main has been updated by mhorne:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; URL:<br>
&gt; &gt; &gt; <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3Dad34121=
518bb7e1a38d4a6b1ccf9ca6fe298dd0a" rel=3D"noreferrer" target=3D"_blank">htt=
ps://cgit.FreeBSD.org/src/commit/?id=3Dad34121518bb7e1a38d4a6b1ccf9ca6fe298=
dd0a</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; commit ad34121518bb7e1a38d4a6b1ccf9ca6fe298dd0a<br>
&gt; &gt; &gt; Author:=C2=A0 =C2=A0 =C2=A0Mitchell Horne &lt;mhorne@FreeBSD=
.org&gt;<br>
&gt; &gt; &gt; AuthorDate: 2023-11-23 19:46:28 +0000<br>
&gt; &gt; &gt; Commit:=C2=A0 =C2=A0 =C2=A0Mitchell Horne &lt;mhorne@FreeBSD=
.org&gt;<br>
&gt; &gt; &gt; CommitDate: 2023-11-23 19:48:44 +0000<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0Revert &quot;pst: improve shutdown_post_s=
ync handler&quot;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0I did not realize this driver was i386-on=
ly, and the change fails to<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0compile. Revert so that I can fix it prop=
erly.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0This reverts commit 428ebb7cd9f51afb6809b=
f81cf21a05e0fd93ff4.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0Pointy hat to: mhorne<br>
&gt; &gt; &gt; ---<br>
&gt; &gt; &gt;=C2=A0 sys/dev/pst/pst-iop.c=C2=A0 |=C2=A0 2 +-<br>
&gt; &gt; &gt;=C2=A0 sys/dev/pst/pst-raid.c | 14 +++++---------<br>
&gt; &gt; &gt;=C2=A0 2 files changed, 6 insertions(+), 10 deletions(-)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; diff --git a/sys/dev/pst/pst-iop.c b/sys/dev/pst/pst-iop.c<b=
r>
&gt; &gt; &gt; index 43ced2401d2c..f9921a564333 100644<br>
&gt; &gt; &gt; --- a/sys/dev/pst/pst-iop.c<br>
&gt; &gt; &gt; +++ b/sys/dev/pst/pst-iop.c<br>
&gt; &gt; &gt; @@ -432,7 +432,7 @@ iop_queue_wait_msg(struct iop_softc *sc,=
 int mfa, struct<br>
&gt; &gt; &gt; i2o_basic_message *msg)<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 int status, timeout =3D 10000;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 mtx_lock(&amp;sc-&gt;mtx);<br>
&gt; &gt; &gt; -=C2=A0 =C2=A0 if ((sc-&gt;reg-&gt;oqueue_intr_mask &amp; I2=
0_OUT_INTR_QUEUE) =3D=3D 0) {<br>
&gt; &gt; &gt; +=C2=A0 =C2=A0 if (!(sc-&gt;reg-&gt;oqueue_intr_mask &amp; 0=
x08)) {<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 msg-&gt;transaction_contex=
t =3D (u_int32_t)&amp;request;<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 msg-&gt;initiator_context =
=3D (u_int32_t)iop_done;<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sc-&gt;reg-&gt;iqueue =3D =
mfa;<br>
&gt; &gt; &gt; diff --git a/sys/dev/pst/pst-raid.c b/sys/dev/pst/pst-raid.c=
<br>
&gt; &gt; &gt; index 4f9279462ee8..4e9c4fb724bc 100644<br>
&gt; &gt; &gt; --- a/sys/dev/pst/pst-raid.c<br>
&gt; &gt; &gt; +++ b/sys/dev/pst/pst-raid.c<br>
&gt; &gt; &gt; @@ -73,7 +73,7 @@ struct pst_request {<br>
&gt; &gt; &gt;=C2=A0 static disk_strategy_t pststrategy;<br>
&gt; &gt; &gt;=C2=A0 static int pst_probe(device_t);<br>
&gt; &gt; &gt;=C2=A0 static int pst_attach(device_t);<br>
&gt; &gt; &gt; -static void pst_shutdown_post_sync(device_t, int);<br>
&gt; &gt; &gt; +static int pst_shutdown(device_t);<br>
&gt; &gt; &gt;=C2=A0 static void pst_start(struct pst_softc *);<br>
&gt; &gt; &gt;=C2=A0 static void pst_done(struct iop_softc *, u_int32_t, st=
ruct i2o_single_reply<br>
&gt; &gt; &gt; *);<br>
&gt; &gt; &gt;=C2=A0 static int pst_rw(struct pst_request *);<br>
&gt; &gt; &gt; @@ -170,23 +170,18 @@ pst_attach(device_t dev)<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 name, psc-&gt;info-&gt;capacity/(512*255=
*63), 255, 63,<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 device_get_nameunit(psc-&gt;iop-&gt;dev)=
);<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; -=C2=A0 =C2=A0 EVENTHANDLER_REGISTER(shutdown_post_sync, pst=
_shutdown_post_sync,<br>
&gt; &gt; &gt; +=C2=A0 =C2=A0 EVENTHANDLER_REGISTER(shutdown_post_sync, pst=
_shutdown,<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0dev, SHUTDOWN_PRI_FIRST);<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 return 0;<br>
&gt; &gt; &gt;=C2=A0 }<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; -static void<br>
&gt; &gt; &gt; -pst_shutdown_post_sync(device_t dev, int howto __unused)<br=
>
&gt; &gt; &gt; +static int<br>
&gt; &gt; &gt; +pst_shutdown(device_t dev)<br>
&gt; &gt; &gt;=C2=A0 {<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 struct pst_softc *psc =3D device_get_sof=
tc(dev);<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 struct i2o_bsa_cache_flush_message *msg;=
<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 int mfa;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; -=C2=A0 =C2=A0 if (SCHEDULER_STOPPED()) {<br>
&gt; &gt; &gt; - /* Request polled shutdown. */<br>
&gt; &gt; &gt; - psc-&gt;reg-&gt;oqueue_intr_mask =3D 0xffffffff;<br>
&gt; &gt; &gt; -=C2=A0 =C2=A0 }<br>
&gt; &gt; &gt; -<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 mfa =3D iop_get_mfa(psc-&gt;iop);<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 msg =3D (struct i2o_bsa_cache_flush_mess=
age *)(psc-&gt;iop-&gt;ibase + mfa);<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 bzero(msg, sizeof(struct i2o_bsa_cache_f=
lush_message));<br>
&gt; &gt; &gt; @@ -199,6 +194,7 @@ pst_shutdown_post_sync(device_t dev, int=
 howto<br>
&gt; &gt; &gt; __unused)<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 msg-&gt;control_flags =3D 0x0; /* 0x80 =
=3D post progress reports */<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 if (iop_queue_wait_msg(psc-&gt;iop, mfa,=
 (struct i2o_basic_message<br>
&gt; &gt; &gt; *)msg))<br>
&gt; &gt; &gt;=C2=A0 =C2=A0printf(&quot;pst: shutdown failed!\n&quot;);<br>
&gt; &gt; &gt; +=C2=A0 =C2=A0 return 0;<br>
&gt; &gt; &gt;=C2=A0 }<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;=C2=A0 static void<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; <br>
&gt; &gt; <br>
&gt; &gt; -- <br>
&gt; &gt; Mateusz Guzik &lt;mjguzik <a href=3D"http://gmail.com" rel=3D"nor=
eferrer" target=3D"_blank">gmail.com</a>&gt;<br>
&gt; &gt; <br>
&gt; <br>
</blockquote></div>

--000000000000773f69060b39a4ec--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoQKz3UMwBnjWmhgF8JfL1hGa3a38pCpKntURO7Q1u=Hg>