From nobody Mon Oct 24 16:37:19 2022 X-Original-To: dev-commits-src-all@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 4Mx12N47qRz4g8W1 for ; Mon, 24 Oct 2022 16:37:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 4Mx12N0rzXz3glx for ; Mon, 24 Oct 2022 16:37:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ed1-x52d.google.com with SMTP id y69so13600164ede.5 for ; Mon, 24 Oct 2022 09:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7EHVawGe2Rh0k1iRS6swzqKjYULG4bLd02uIRyC2KnQ=; b=S4yNby6UwCGxtprCRMizs9ObgA4zdxeZmFdi5fTDSRNnqq3ThDQGIYKrMWCLguAcDJ JL4N69Ugz7fvtq+jdy52Cj4ZhX7W6KnHYSSHOyok1NXydkcLLu0s5tpXXaopmtrjt+dE Hd0wRWhrVYVkRZekypY6TMiXy71v0FEelJGIgYnZ3m40IWB5D2bZkcB0w8cXUey81Qm2 xKgdsDAq4PeWHjfghE3Ff/Prq1CLOVka8w+LqbJJdJr0ysJjPlsuvwn7cjs4UpjC6K0A HbH+XOvjYBBzu8UPJBOdMjqmvLZuh470ZJSBD1Upxjsi8LAl210Ks574ToviuJBdkXRD vBgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=7EHVawGe2Rh0k1iRS6swzqKjYULG4bLd02uIRyC2KnQ=; b=Exmj5sN5f+izxx+Ky+tsSS2B/XtyPBSatX1QPJzH+M/ROK3G12Ota32/PgfNvfbwJ2 0XfJbuHGPO1NnByrQ3pLzNH9L7IpkEE7mOMPqXOetv042wFQyf8j6ZJw2JXjveJ7PtHZ NlByj1XvvVeyIWcH0gYrW3/OXUdP7lpGYkPq3yWaOEod1I3Dl9HHqEHwI8F2EsG/Pxfd bRYgZFKTShEK0ZXugadTgcZIMANrnaLjHP7s0Kk7P3tKwZcOsUnRQ3s8R5iwZW080bim BdBrFYG3xw3/eLX3FZAjzhTQzMR8J5qN8viQpGvY/b4QmN7wmTQR16DNwb/n0g0uvjZR hvZA== X-Gm-Message-State: ACrzQf3oyL/yrm56tTw/vejadHpK9GUrTL0R90mOmnpAIFuR0i7rXIEL lUGazgtMD6MHSmdq2y9/mv9cXLAueSBFgTMYXCnR5Jc1XbFgBg== X-Google-Smtp-Source: AMsMyM7r574RGyfCkKwSNWvx7cKKxMeQcOxXVfJsdWs+hpkhAn6GXT+yZQl7Rz3MlA0acXYb9kD2ARyMpEx69i6XNZk= X-Received: by 2002:a05:6402:2687:b0:45d:3a94:348f with SMTP id w7-20020a056402268700b0045d3a94348fmr31425928edd.48.1666629450849; Mon, 24 Oct 2022 09:37:30 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202210241439.29OEdKOI013861@gitrepo.freebsd.org> <170CEFAF-A78C-4DD7-A639-3B7090C5D347@freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 24 Oct 2022 10:37:19 -0600 Message-ID: Subject: Re: git: 9cf5db63698b - main - acpi_ged: fix build, as module and non INTRNG case. To: Kyle Evans Cc: Jessica Clarke , Takanori Watanabe , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000063fae405ebca68a0" X-Rspamd-Queue-Id: 4Mx12N0rzXz3glx X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=S4yNby6U; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::52d) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52d:from]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; RCPT_COUNT_FIVE(0.00)[6]; DMARC_NA(0.00)[bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --00000000000063fae405ebca68a0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Oct 24, 2022 at 9:28 AM Warner Losh wrote: > > > On Mon, Oct 24, 2022, 9:22 AM Kyle Evans wrote: > >> On Mon, Oct 24, 2022 at 10:16 AM Jessica Clarke >> wrote: >> > >> > On 24 Oct 2022, at 15:39, Takanori Watanabe >> wrote: >> > > >> > > The branch main has been updated by takawata: >> > > >> > > URL: >> https://cgit.FreeBSD.org/src/commit/?id=3D9cf5db63698b3c73edd632412bf687= 35d3c20d37 >> > > >> > > commit 9cf5db63698b3c73edd632412bf68735d3c20d37 >> > > Author: Takanori Watanabe >> > > AuthorDate: 2022-10-24 14:19:12 +0000 >> > > Commit: Takanori Watanabe >> > > CommitDate: 2022-10-24 14:37:28 +0000 >> > > >> > > acpi_ged: fix build, as module and non INTRNG case. >> > > >> > > Reviewed-by: cy >> > > >> > > Differential Revision: https://reviews.freebsd.org/D37104 >> > > --- >> > > sys/dev/acpica/acpi_ged.c | 2 +- >> > > sys/modules/acpi/acpi_ged/Makefile | 2 +- >> > > 2 files changed, 2 insertions(+), 2 deletions(-) >> > > >> > > diff --git a/sys/dev/acpica/acpi_ged.c b/sys/dev/acpica/acpi_ged.c >> > > index 9459ccc3525b..8ee56c8b0335 100644 >> > > --- a/sys/dev/acpica/acpi_ged.c >> > > +++ b/sys/dev/acpica/acpi_ged.c >> > > @@ -198,7 +198,7 @@ acpi_ged_attach(device_t dev) >> > > } >> > > } >> > > #else >> > > - rawirq =3D rman_get_start(sc->evt[i].r); >> > > + rawirq =3D rman_get_start(sc->evts[i].r); >> > > trig =3D INTR_TRIGGER_LEVEL; >> > > if (ACPI_SUCCESS(acpi_lookup_irq_resource >> > > (dev, sc->evts[i].rid, >> > > diff --git a/sys/modules/acpi/acpi_ged/Makefile >> b/sys/modules/acpi/acpi_ged/Makefile >> > > index a937249357f4..87dd53b88b2b 100644 >> > > --- a/sys/modules/acpi/acpi_ged/Makefile >> > > +++ b/sys/modules/acpi/acpi_ged/Makefile >> > > @@ -1,7 +1,7 @@ >> > > # $FreeBSD$ >> > > >> > > .PATH: ${SRCTOP}/sys/dev/acpica >> > > -.if ${TARGET_ARCH} =3D=3D aarch64 >> > > +.if ${MACHINE_CPUARCH} =3D=3D "aarch64" >> > > CFLAGS +=3D -DINTRNG >> > > .endif >> > > KMOD=3D acpi_ged >> > >> > Why isn=E2=80=99t acpi_ged.c just #include=E2=80=99ing opt_global.h? >> > >> >> I suspect this is trying to cope with untied builds, though I agree >> it's using the wrong approach. We should push this into >> sys/conf/config.mk instead (+ arm, riscv), which should do the right >> thing and actually #define it in opt_global.h (which is included via >> CFLAGS). >> > > I was about to make similar comments. I'll take a look at fixing while > I'm on the plane today... if some else doesn't take a stab I. The mean ti= me. > Consider https://reviews.freebsd.org/D37107 and https://reviews.freebsd.org/D37108 (which don't yet adjust this file). 37107 moves all the options that we want in a opt_global.h file into DEFAULTS and 37108 adjusts config.mk to generate opt_global.h with them in it. Comments? Warner --00000000000063fae405ebca68a0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Oct 24, 2022 at 9:28 AM Warne= r Losh <imp@bsdimp.com> wrote:<= br>


On Mon, Oct 24, 2022, 9:22 AM Kyle Evans <kevans@freebsd.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Oct 24, 2022 at 10= :16 AM Jessica Clarke <jrtc27@freebsd.org> wrote:
>
> On 24 Oct 2022, at 15:39, Takanori Watanabe <takawata@FreeBSD.org&g= t; wrote:
> >
> > The branch main has been updated by takawata:
> >
> > URL: https://cgit.FreeBSD.org/src/commit/?id=3D9cf5db63698b3c73edd632412= bf68735d3c20d37
> >
> > commit 9cf5db63698b3c73edd632412bf68735d3c20d37
> > Author:=C2=A0 =C2=A0 =C2=A0Takanori Watanabe <takawata@FreeBSD= .org>
> > AuthorDate: 2022-10-24 14:19:12 +0000
> > Commit:=C2=A0 =C2=A0 =C2=A0Takanori Watanabe <takawata@FreeBSD= .org>
> > CommitDate: 2022-10-24 14:37:28 +0000
> >
> >=C2=A0 =C2=A0 acpi_ged: fix build, as module and non INTRNG case.<= br> > >
> >=C2=A0 =C2=A0 Reviewed-by: cy
> >
> >=C2=A0 =C2=A0 Differential Revision: https://r= eviews.freebsd.org/D37104
> > ---
> > sys/dev/acpica/acpi_ged.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 2 += -
> > sys/modules/acpi/acpi_ged/Makefile | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/sys/dev/acpica/acpi_ged.c b/sys/dev/acpica/acpi_ged.= c
> > index 9459ccc3525b..8ee56c8b0335 100644
> > --- a/sys/dev/acpica/acpi_ged.c
> > +++ b/sys/dev/acpica/acpi_ged.c
> > @@ -198,7 +198,7 @@ acpi_ged_attach(device_t dev)
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0}
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
> > #else
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rawirq =3D rman_= get_start(sc->evt[i].r);
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rawirq =3D rman_= get_start(sc->evts[i].r);
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0trig =3D IN= TR_TRIGGER_LEVEL;
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (ACPI_SU= CCESS(acpi_lookup_irq_resource
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(dev, sc->evts[i].rid,
> > diff --git a/sys/modules/acpi/acpi_ged/Makefile b/sys/modules/acp= i/acpi_ged/Makefile
> > index a937249357f4..87dd53b88b2b 100644
> > --- a/sys/modules/acpi/acpi_ged/Makefile
> > +++ b/sys/modules/acpi/acpi_ged/Makefile
> > @@ -1,7 +1,7 @@
> > #=C2=A0 =C2=A0 =C2=A0$FreeBSD$
> >
> > .PATH:=C2=A0 =C2=A0 =C2=A0 =C2=A0 ${SRCTOP}/sys/dev/acpica
> > -.if ${TARGET_ARCH} =3D=3D aarch64
> > +.if ${MACHINE_CPUARCH} =3D=3D "aarch64"
> > CFLAGS +=3D -DINTRNG
> > .endif
> > KMOD=3D acpi_ged
>
> Why isn=E2=80=99t acpi_ged.c just #include=E2=80=99ing opt_global.h? >

I suspect this is trying to cope with untied builds, though I agree
it's using the wrong approach. We should push this into
sys/conf/config.mk instead (+ arm, riscv), which should do the right=
thing and actually #define it in opt_global.h (which is included via
CFLAGS).

I was about to make similar comments.=C2=A0 I'll take a look = at fixing while I'm on the plane today... if some else doesn't take= a stab I. The mean time.

Consi= der https://reviews.freebsd.= org/D37107 and=C2=A0http= s://reviews.freebsd.org/D37108 (which don't yet adjust this file). = 37107 moves all the options that we want in a opt_global.h file into DEFAUL= TS and 37108 adjusts config.mk to generate= opt_global.h with them in it.

Comments?

Warner
--00000000000063fae405ebca68a0--