From nobody Tue Nov 28 17:20:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sfq3y4ZTVz52G4F for ; Tue, 28 Nov 2023 17:21:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sfq3y2nxMz3fT8 for ; Tue, 28 Nov 2023 17:21:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-50bbfad8758so880491e87.3 for ; Tue, 28 Nov 2023 09:21:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1701192060; x=1701796860; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wPDEymffhBr+qkVTaTG24wcaW9+7dGRhhkY84sCvoAM=; b=Nu9f+edypu2aw7j6beg3O1KEjIwHK6z1DxnQ5U27wi0gh4DX+E+tFx3+Pfr9DBwMap oVLiCSq7J6UT/Y/eKGpwMkBBsIeyUz0mWSM1CglMFstplJicHDJxmUOKwaohih0rtP+z Oh66Cn5jl/YYtqOH4frb+Ld+mDkLOSGsOcMNdwzPrMt4Xwa2OvHP5JiOsf31qj/dUxFL 0XhCs25P4n0AD/G+fwhx3z3AQWLU/zxqH0PP85KahEESOAbmDQf9yW8FvoOswoMAvbRo YwOr1pVY09dQXVxqBTmYk21I0+NHgwUbUqFLJcdDs5deqC4NRdqGTRMgaQiqK8zCrHoN 6Vwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701192060; x=1701796860; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wPDEymffhBr+qkVTaTG24wcaW9+7dGRhhkY84sCvoAM=; b=nSImxpQlZXFAFEsD06HI1EZK5cwLXNZ/JEi9eyBMcOH8a6sBfK8wQLLeB/XkEpPfAC 0ED0uG6ZYMDMSZvLRvjvLXZZ+vrQwgKo2mRKMLDrrNYUwWLslKW2XFX2/TPRUr/iQyzR HYiR73zkyBUa/zOqn9I4oWCo81Ogs7ETFEu5UkbjMHylJDtmejUj9IKQm7lDUEIFWoD8 7gOzIrkSkGHEPFmzD7ZI6gWQiDULyc42jyMIjwuqC8/raY1uLj8GrlS58vwsO7xlq90x kZbl6uRVzalIbxYEJ0lFjWgcttAikVluFuPfAXMn+Egum4s9UTa72Yy0dWyd/KIl87EO eIOw== X-Gm-Message-State: AOJu0YzyoqcBwgVicxXxboqx1zd7P7Gp/YWJhC9uNYIH6S57sOTaUUD2 R5xX5Kh56KdbZp4wAq6h0KegvmGvk1WXzih5TCgInQ== X-Google-Smtp-Source: AGHT+IEkxG9HJyrGRFq/cCUokvFIX1g3Ev50IKAawdNj7NVaJi4mY5nJn//8+uH2U8U7qBmRjDnbUwUzvzpXNTf/tos= X-Received: by 2002:a05:6512:2513:b0:500:b2f6:592 with SMTP id be19-20020a056512251300b00500b2f60592mr9457547lfb.50.1701192060576; Tue, 28 Nov 2023 09:21:00 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202311231948.3ANJmwEC076780@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 28 Nov 2023 10:20:49 -0700 Message-ID: Subject: Re: git: ad34121518bb - main - Revert "pst: improve shutdown_post_sync handler" To: Baptiste Daroussin Cc: Mitchell Horne , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000773f69060b39a4ec" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4Sfq3y2nxMz3fT8 --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 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 wrote: > > > > The branch main has been updated by mhorne: > > > > > > > > URL: > > > > > https://cgit.FreeBSD.org/src/commit/?id=3Dad34121518bb7e1a38d4a6b1ccf9ca6= fe298dd0a > > > > > > > > commit ad34121518bb7e1a38d4a6b1ccf9ca6fe298dd0a > > > > Author: Mitchell Horne > > > > AuthorDate: 2023-11-23 19:46:28 +0000 > > > > Commit: Mitchell Horne > > > > 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 > > > > > > --000000000000773f69060b39a4ec Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Maybe=C2=A0f97aab79868cd7d891c52b14bd964523fa56f015 fixes = this?

Warner

<= div dir=3D"ltr" class=3D"gmail_attr">On Tue, Nov 28, 2023 at 10:11=E2=80=AF= AM Baptiste Daroussin <bapt@freebsd.= org> 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 complai= n, 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:
> > > htt= ps://cgit.FreeBSD.org/src/commit/?id=3Dad34121518bb7e1a38d4a6b1ccf9ca6fe298= dd0a
> > >
> > > commit ad34121518bb7e1a38d4a6b1ccf9ca6fe298dd0a
> > > Author:=C2=A0 =C2=A0 =C2=A0Mitchell Horne <mhorne@FreeBSD= .org>
> > > AuthorDate: 2023-11-23 19:46:28 +0000
> > > Commit:=C2=A0 =C2=A0 =C2=A0Mitchell Horne <mhorne@FreeBSD= .org>
> > > CommitDate: 2023-11-23 19:48:44 +0000
> > >
> > >=C2=A0 =C2=A0 =C2=A0Revert "pst: improve shutdown_post_s= ync handler"
> > >
> > >=C2=A0 =C2=A0 =C2=A0I did not realize this driver was i386-on= ly, and the change fails to
> > >=C2=A0 =C2=A0 =C2=A0compile. Revert so that I can fix it prop= erly.
> > >
> > >=C2=A0 =C2=A0 =C2=A0This reverts commit 428ebb7cd9f51afb6809b= f81cf21a05e0fd93ff4.
> > >
> > >=C2=A0 =C2=A0 =C2=A0Pointy hat to: mhorne
> > > ---
> > >=C2=A0 sys/dev/pst/pst-iop.c=C2=A0 |=C2=A0 2 +-
> > >=C2=A0 sys/dev/pst/pst-raid.c | 14 +++++---------
> > >=C2=A0 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)
> > >=C2=A0 =C2=A0 =C2=A0 int status, timeout =3D 10000;
> > >
> > >=C2=A0 =C2=A0 =C2=A0 mtx_lock(&sc->mtx);
> > > -=C2=A0 =C2=A0 if ((sc->reg->oqueue_intr_mask & I2= 0_OUT_INTR_QUEUE) =3D=3D 0) {
> > > +=C2=A0 =C2=A0 if (!(sc->reg->oqueue_intr_mask & 0= x08)) {
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 msg->transaction_contex= t =3D (u_int32_t)&request;
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 msg->initiator_context = =3D (u_int32_t)iop_done;
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 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 {
> > >=C2=A0 static disk_strategy_t pststrategy;
> > >=C2=A0 static int pst_probe(device_t);
> > >=C2=A0 static int pst_attach(device_t);
> > > -static void pst_shutdown_post_sync(device_t, int);
> > > +static int pst_shutdown(device_t);
> > >=C2=A0 static void pst_start(struct pst_softc *);
> > >=C2=A0 static void pst_done(struct iop_softc *, u_int32_t, st= ruct i2o_single_reply
> > > *);
> > >=C2=A0 static int pst_rw(struct pst_request *);
> > > @@ -170,23 +170,18 @@ pst_attach(device_t dev)
> > >=C2=A0 =C2=A0 =C2=A0 name, psc->info->capacity/(512*255= *63), 255, 63,
> > >=C2=A0 =C2=A0 =C2=A0 device_get_nameunit(psc->iop->dev)= );
> > >
> > > -=C2=A0 =C2=A0 EVENTHANDLER_REGISTER(shutdown_post_sync, pst= _shutdown_post_sync,
> > > +=C2=A0 =C2=A0 EVENTHANDLER_REGISTER(shutdown_post_sync, pst= _shutdown,
> > >=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);
> > >=C2=A0 =C2=A0 =C2=A0 return 0;
> > >=C2=A0 }
> > >
> > > -static void
> > > -pst_shutdown_post_sync(device_t dev, int howto __unused) > > > +static int
> > > +pst_shutdown(device_t dev)
> > >=C2=A0 {
> > >=C2=A0 =C2=A0 =C2=A0 struct pst_softc *psc =3D device_get_sof= tc(dev);
> > >=C2=A0 =C2=A0 =C2=A0 struct i2o_bsa_cache_flush_message *msg;=
> > >=C2=A0 =C2=A0 =C2=A0 int mfa;
> > >
> > > -=C2=A0 =C2=A0 if (SCHEDULER_STOPPED()) {
> > > - /* Request polled shutdown. */
> > > - psc->reg->oqueue_intr_mask =3D 0xffffffff;
> > > -=C2=A0 =C2=A0 }
> > > -
> > >=C2=A0 =C2=A0 =C2=A0 mfa =3D iop_get_mfa(psc->iop);
> > >=C2=A0 =C2=A0 =C2=A0 msg =3D (struct i2o_bsa_cache_flush_mess= age *)(psc->iop->ibase + mfa);
> > >=C2=A0 =C2=A0 =C2=A0 bzero(msg, sizeof(struct i2o_bsa_cache_f= lush_message));
> > > @@ -199,6 +194,7 @@ pst_shutdown_post_sync(device_t dev, int= howto
> > > __unused)
> > >=C2=A0 =C2=A0 =C2=A0 msg->control_flags =3D 0x0; /* 0x80 = =3D post progress reports */
> > >=C2=A0 =C2=A0 =C2=A0 if (iop_queue_wait_msg(psc->iop, mfa,= (struct i2o_basic_message
> > > *)msg))
> > >=C2=A0 =C2=A0printf("pst: shutdown failed!\n");
> > > +=C2=A0 =C2=A0 return 0;
> > >=C2=A0 }
> > >
> > >=C2=A0 static void
> > >
> > >
> >
> >
> > --
> > Mateusz Guzik <mjguzik gmail.com>
> >
>
--000000000000773f69060b39a4ec--