From nobody Sat Jan 07 03:21:53 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 4Nplqz3F0Dz2pJ9d for ; Sat, 7 Jan 2023 03:22:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (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 4Nplqx67gzz4PkS for ; Sat, 7 Jan 2023 03:22:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=nNDa9D2g; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::62c) smtp.mailfrom=wlosh@bsdimp.com; dmarc=none Received: by mail-ej1-x62c.google.com with SMTP id fc4so7501187ejc.12 for ; Fri, 06 Jan 2023 19:22:05 -0800 (PST) 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=gEUeghIWYGqNDbjHfDypvR+BKjnQoEwTVFVVl21wj9w=; b=nNDa9D2g3FECLeE5ns/Z3X5/oXfRNgweP8eOwSNUPrlr8T515RYnWdm/IoBVGw20Ix fQ2xPbX1Mjj8iwlTyHRoIvpXm6Yzcs/HkTiR7rkgZU3jkyNQcz+dTbWltUCCCpzPHQCm RKegc4NnOTR4QYjDZqUpBcSPF3h6hVCLCVRJpqNt0iUhBaAv2Mz6EqByRldiS45eQtx3 VSI7gcHDLsF7W65ZeFf9MVXAuAxvbLi5dzUUJNLEIJHxloZO+GNjsoAuGJHoWEBdd8IV CBYqMhVSO9G993lRH5esUqMX7GHapYIylvLaOHHtjrLyZlcS6ApVW3/Jc5LDblIw2D5W Aoyg== 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=gEUeghIWYGqNDbjHfDypvR+BKjnQoEwTVFVVl21wj9w=; b=opiF8AbPu2rR3+zt9JtZFEpT4cT3IhZUuQoIYRaZTlsV3T0T7ciNBNMbXzNlSmVsve owV1+cAEkwCfzYBQosyhIpQBkXmcv5/ZyPQBSqZuS0MnkxW2H3qavXl3lgCSbId3kumZ H0XQ++yVBz2hpR686UqcFH00xYQCLjAHQF/QyKpKDTOW4mHEOqx9iLvVJtO9NPebBtQD TkqdO5up6uZjm4urAu1yQTHxGS8e14R9335ZTCTCFIRrSZL4DWkmIL4LMEJqVdcD5JIT ha7EZuj8LcmrhnSM72XN+0WNb49aCQ7Qlr7lH0Z8TpHL2VnLthLip+lIF6vjFDa9dGHV PMvg== X-Gm-Message-State: AFqh2kpcvgzU6ijSxnOrvvVP3B9ch5hAzxlDaz6grcZeIbDnB54Oip3O ycNyj/aAuz3qjFMz0GdnKf0c1ulXJD5coEks613WkQ== X-Google-Smtp-Source: AMrXdXvXjaDk04x21UvzicG3soDMz89IEQtBvTzmrF8l5x+0tBVwtWaWheoknJfM8y24S31RftPk2pEY5EMH1Zc7X5o= X-Received: by 2002:a17:906:1858:b0:7c0:e7a6:cd2d with SMTP id w24-20020a170906185800b007c0e7a6cd2dmr3373506eje.317.1673061724094; Fri, 06 Jan 2023 19:22:04 -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: <202210291633.29TGXwma076672@gitrepo.freebsd.org> <9dc638fb-8cb9-ec8c-a57b-ce748f1a89f4@uabsd.com> In-Reply-To: <9dc638fb-8cb9-ec8c-a57b-ce748f1a89f4@uabsd.com> From: Warner Losh Date: Fri, 6 Jan 2023 20:21:53 -0700 Message-ID: Subject: Re: git: f7026fbbb2bd - main - sys/modules: MODULES_OVERRIDE takes precedence over EXTRA_MODULES and WITHOUT_MODULES To: Andriy Gapon Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000c095ee05f1a409f2" X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; 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::62c:from]; MLMMJ_DEST(0.00)[dev-commits-src-main@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-main@freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; DMARC_NA(0.00)[bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4Nplqx67gzz4PkS X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N --000000000000c095ee05f1a409f2 Content-Type: text/plain; charset="UTF-8" On Thu, Jan 5, 2023 at 3:51 AM Andriy Gapon wrote: > On 2022-10-29 19:33, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=f7026fbbb2bd72176d73921dd2dd5e4b263d5103 > > > > commit f7026fbbb2bd72176d73921dd2dd5e4b263d5103 > > Author: Warner Losh > > AuthorDate: 2022-10-29 14:34:16 +0000 > > Commit: Warner Losh > > CommitDate: 2022-10-29 16:17:40 +0000 > > > > sys/modules: MODULES_OVERRIDE takes precedence over EXTRA_MODULES > and WITHOUT_MODULES > > > > MODULES_OVERRIDE has traditionally taken precedence over > EXTRA_MODULES > > and WITHOUT_MODULES as the exact list of modules to build. Over > time, > > things have been added that has broken this. Move the .endif that > makes > > this the case to the right place. The so called 'ALL_MODULES' > option is > > the only thing with higher precedence, but it's not quite all the > > options anymore (though it is much more of them, and doesn't quite > > work on !x86). > > > > Sponsored by: Netflix > > Warner, > > this change broke one use-case of mine. The use-case does not seem to > be exotic, so others may be affected as well. > > I am building a custom arm64 kernel and a set of modules for a specific > SoC (rockchip). > The kernel configuration, similarly to GENERIC, has this statement: > include "std.rockchip" > > In turn, std.rockchip has this statement: > # DTBs > makeoptions MODULES_EXTRA+="dtb/rockchip" > > Additionally, in my make.conf I have MODULES_OVERRIDE set to a short > list of modules. > > Previously this worked without issues, completely transparently. > Now, MODULES_OVERRIDE apparently cancels MODULES_EXTRA. > I can easily add dtb/rockchip to my MODULES_OVERRIDE, of course, but I > get a feeling that the previous behavior was more useful because it > allowed to specify mandatory "internal" modules in addition to a > user-specified list of modules. Not sure what's the benefit of the > traditional behavior that you restored, it's not spelled out. > > TLDR: dtb-s and dtbo-s are not getting build for anyone with > MODULES_OVERRIDE in make.conf (on relevant platforms). > I'm swamped after the holidays. I've put this in my queue to consider, but it may be a week or three before I get to it. Please hassle me in a couple weeks if I somehow drop this on the floor. It seems like there's an issue here, but I need to look through the details and I won't have the time for a few days... Warner > > --- > > sys/modules/Makefile | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/sys/modules/Makefile b/sys/modules/Makefile > > index 00afbffb1baf..3a009f071cab 100644 > > --- a/sys/modules/Makefile > > +++ b/sys/modules/Makefile > > @@ -848,8 +848,6 @@ _nvram= opal_nvram > > _nvram+= powermac_nvram > > .endif > > > > -.endif > > - > > .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64" > > _bcm283x_clkman= bcm283x_clkman > > _bcm283x_pwm= bcm283x_pwm > > @@ -867,6 +865,8 @@ SUBDIR+=${MODULES_EXTRA} > > SUBDIR:= ${SUBDIR:N${reject}} > > .endfor > > > > +.endif # MODULES_OVERRIDE -- Keep last > > + > > # Calling kldxref(8) for each module is expensive. > > .if !defined(NO_XREF) > > .MAKEFLAGS+= -DNO_XREF > > -- > Andriy Gapon > > https://standforukraine.com > https://razomforukraine.org > > --000000000000c095ee05f1a409f2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Jan 5, 2023 at 3:51 AM Andriy= Gapon <andriy.gapon@uabsd.com= > wrote:
= On 2022-10-29 19:33, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3Df7026fbbb2bd72176d73921dd2dd5e4b263d5103<= /a>
>
> commit f7026fbbb2bd72176d73921dd2dd5e4b263d5103
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2022-10-29 14:34:16 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2022-10-29 16:17:40 +0000
>
>=C2=A0 =C2=A0 =C2=A0 sys/modules: MODULES_OVERRIDE takes precedence ove= r EXTRA_MODULES and WITHOUT_MODULES
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 MODULES_OVERRIDE has traditionally taken precedenc= e over EXTRA_MODULES
>=C2=A0 =C2=A0 =C2=A0 and WITHOUT_MODULES as the exact list of modules t= o build. Over time,
>=C2=A0 =C2=A0 =C2=A0 things have been added that has broken this. Move = the .endif that makes
>=C2=A0 =C2=A0 =C2=A0 this the case to the right place. The so called &#= 39;ALL_MODULES' option is
>=C2=A0 =C2=A0 =C2=A0 the only thing with higher precedence, but it'= s not quite all the
>=C2=A0 =C2=A0 =C2=A0 options anymore (though it is much more of them, a= nd doesn't quite
>=C2=A0 =C2=A0 =C2=A0 work on !x86).
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Netflix

Warner,

this change broke one use-case of mine.=C2=A0 The use-case does not seem to=
be exotic, so others may be affected as well.

I am building a custom arm64 kernel and a set of modules for a specific SoC (rockchip).
The kernel configuration, similarly to GENERIC, has this statement:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 include=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"= std.rockchip"

In turn, std.rockchip has this statement:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 # DTBs
=C2=A0 =C2=A0 =C2=A0 =C2=A0 makeoptions=C2=A0 =C2=A0 =C2=A0MODULES_EXTRA+= =3D"dtb/rockchip"

Additionally, in my make.conf I have MODULES_OVERRIDE set to a short
list of modules.

Previously this worked without issues, completely transparently.
Now, MODULES_OVERRIDE apparently cancels MODULES_EXTRA.
I can easily add dtb/rockchip to my MODULES_OVERRIDE, of course, but I
get a feeling that the previous behavior was more useful because it
allowed to specify mandatory "internal" modules in addition to a =
user-specified list of modules.=C2=A0 Not sure what's the benefit of th= e
traditional behavior that you restored, it's not spelled out.

TLDR: dtb-s and dtbo-s are not getting build for anyone with
MODULES_OVERRIDE in make.conf (on relevant platforms).


> ---
>=C2=A0 =C2=A0sys/modules/Makefile | 4 ++--
>=C2=A0 =C2=A01 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sys/modules/Makefile b/sys/modules/Makefile
> index 00afbffb1baf..3a009f071cab 100644
> --- a/sys/modules/Makefile
> +++ b/sys/modules/Makefile
> @@ -848,8 +848,6 @@ _nvram=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= opal_nvram
>=C2=A0 =C2=A0_nvram+=3D=C2=A0 =C2=A0 powermac_nvram
>=C2=A0 =C2=A0.endif
>=C2=A0 =C2=A0
> -.endif
> -
>=C2=A0 =C2=A0.if ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE= _CPUARCH} =3D=3D "aarch64"
>=C2=A0 =C2=A0_bcm283x_clkman=3D=C2=A0 bcm283x_clkman
>=C2=A0 =C2=A0_bcm283x_pwm=3D=C2=A0 bcm283x_pwm
> @@ -867,6 +865,8 @@ SUBDIR+=3D${MODULES_EXTRA}
>=C2=A0 =C2=A0SUBDIR:=3D ${SUBDIR:N${reject}}
>=C2=A0 =C2=A0.endfor
>=C2=A0 =C2=A0
> +.endif # MODULES_OVERRIDE -- Keep last
> +
>=C2=A0 =C2=A0# Calling kldxref(8) for each module is expensive.
>=C2=A0 =C2=A0.if !defined(NO_XREF)
>=C2=A0 =C2=A0.MAKEFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 -DNO_XREF

--
Andriy Gapon

https://standforukraine.com
https://razomforukraine.org

--000000000000c095ee05f1a409f2--