From nobody Fri Nov 20 18:26:15 2026 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 4jWP1K5BLnz72Pdk; Fri, 20 Nov 2026 18:26:29 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jWP1K4KF0z3Ffy; Fri, 20 Nov 2026 18:26:29 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795199189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+pKak1uvB7M6lN6M0IWRmUEWoTGe9BEAZQF9ebggzG8=; b=PT57Hv7xIRXuz71YpZLBttxmmoV+6og8BkUX9aMI+xFinn2NH8YVA3j7jP+85DN+Fihi0P V4sdaReCNfL8UwFTASkH8yNcsjNkoIaiB75fcaCh9u0fhDbHfmbU1tVb5036pQwkG+moNa tFCrYEAe+Twm6F+RrcdoUpL1e07NFn3wX4Exw/Qd3EID7uAvO0LLwIryITXyf6GYNOzV3+ +aU7yWhS4kS14uA28eHtJ0xJuFMFhAz0Mzzg94JTWP9AwxOx9+EPcY+/9IVXdNeQy1VlHU kxeME5L339hHpP7MpuhiTH8Km+0/BETLZrVW1jpgIYSnfsSN051xGeM3vl5o2A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795199189; b=c+9dRTjy9FEwfroHf5BQe48MdadlaBinhCFM7BbzeLcIqJJLfbfGP9t7CWpizykGB8SiP3 o35xuGJHOsOUc0MQQ2oz8WUKBqpFYHAk3a833KPAp1PuHcG+SnbuZ+c2WhYfXrUTBlOhhL Ddid1Q+8gQY+EQMBe1RI0xqbDpt4neNl6g/4RkqQ0dFslS2VIS0yeacKIrh4FoZWv+lLDq XPsQqDKcArmqNY++FITr6vWb18jdEbsugaqcwihGhLgoJvU8HGWkU3qOzq2zDqbzwTMOH4 6sBK/4SAP8zkUiVoZnQIhvwS/AeK02FpXOS2hTunsgUiJuLi0uDTfMCt243Iqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795199189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+pKak1uvB7M6lN6M0IWRmUEWoTGe9BEAZQF9ebggzG8=; b=sRagXR3e8ZjDqywDgbxhH4afseVlOh/tJ4O9SIZRUVTAGWpKAch5wKS07ZOXoNoGT7g53r +/6Roy92VMe66SEEy4G7hJrYBnkw9btqwbTfQM925MryUag9X50vFPk6gSb68Z4dwYxfds q+i5/eSpcGdFxxoWQP95ghRoyvqIBzY+CAPi/EyQkr9ds6yhKuZDp/UT3U6dJCImQH4edo 6QVCt6pT8g/Cl6A3ortdfWyFgWjRwhYbt7DOGIskHX2Q77VHEAnVGEVHOoa9vLeI6XRs6+ 9jHlhYpQORSmSodOWunfE7auaDY4QGph+dx4ZZu4qIoF7MNx2vDWrl9pYaywVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4jWP1H1VC8z17t5; Fri, 20 Nov 2026 18:26:26 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: <70C27CF3-4109-4726-BD7D-A3F38C2FC162@FreeBSD.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_22CAF868-5F2E-4305-9516-9DD9FD5F1175" List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: git: bf362c1b41c8 - main - kobj: convert KOBJOPLOOKUP() to returning pointer to function Date: Sat, 21 Nov 2026 02:26:15 +0800 In-Reply-To: Cc: John Baldwin , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Elliott Mitchell To: Jessica Clarke References: <6b001ca8.17a65.140055b6@gitrepo.freebsd.org> <20261120133642.ED99E1D0@slippy.cwsent.com> <2E303DF5-FFE0-4BEF-8915-DC26E1CF09DB@FreeBSD.org> <20261120072122.679034c4@slippy.cwsent.com> X-Mailer: Apple Mail (2.3696.120.41.1.10) --Apple-Mail=_22CAF868-5F2E-4305-9516-9DD9FD5F1175 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Nov 20, 2026, at 11:32 PM, Jessica Clarke = wrote: >=20 > On 20 Nov 2026, at 15:14, John Baldwin > wrote: >> On 11/20/26 09:25, Jessica Clarke wrote: >>> On 20 Nov 2026, at 14:21, Cy Schubert = wrote: >>>> On Fri, 20 Nov 2026 21:48:37 +0800 >>>> Zhenlei Huang wrote: >>>>=20 >>>>>> On Nov 20, 2026, at 9:36 PM, Cy Schubert = wrote: >>>>>>=20 >>>>>> In message <6b001ca8.17a65.140055b6@gitrepo.freebsd.org = >, Zhenlei Huang >>>>>> writes: >>>>>>> The branch main has been updated by zlei: >>>>>>>=20 >>>>>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dbf362c1b41c803c7320147b89915bd65= >>>>>>> 88dd6071 >>>>>>>=20 >>>>>>> commit bf362c1b41c803c7320147b89915bd6588dd6071 >>>>>>> Author: Elliott Mitchell >>>>>>> AuthorDate: 2025-01-10 00:45:05 +0000 >>>>>>> Commit: Zhenlei Huang >>>>>>> CommitDate: 2026-11-20 10:09:02 +0000 >>>>>>>=20 >>>>>>> kobj: convert KOBJOPLOOKUP() to returning pointer to function >>>>>>>=20 >>>>>>> This makes KOBJOPLOOKUP() rather more suitable for purposes = outside the >>>>>>> macros generated by makeobjops.awk. Of note other callers can = lookup >>>>>>> the function on their parent class and call that explicitly. >>>>>>>=20 >>>>>>> Reviewed by: zlei >>>>>>> MFC after: 2 weeks >>>>>>> Differential Revision: https://reviews.freebsd.org/D48408 >>>>>>> --- >>>>>>> sys/sys/kobj.h | 20 ++++++++++---------- >>>>>>> sys/tools/makeobjops.awk | 6 +++--- >>>>>>> 2 files changed, 13 insertions(+), 13 deletions(-) >>>>>>>=20 >>>>>>> diff --git a/sys/sys/kobj.h b/sys/sys/kobj.h >>>>>>> index 890ad1d39a13..3cdbf14d124c 100644 >>>>>>> --- a/sys/sys/kobj.h >>>>>>> +++ b/sys/sys/kobj.h >>>>>>> @@ -247,30 +247,30 @@ extern u_int kobj_lookup_misses; >>>>>>> * slow way. >>>>>>> */ >>>>>>> #ifdef KOBJ_STATS >>>>>>> -#define KOBJOPLOOKUP(OPS,OP) do { \ >>>>>>> +#define KOBJOPLOOKUP(OBJ, OP) __extension__ ({ \ >>>>>>> kobjop_desc_t _desc =3D &OP##_##desc; \ >>>>>>> kobj_method_t **_cep =3D \ >>>>>>> - &OPS->cache[_desc->id & (KOBJ_CACHE_SIZE-1)]; \ >>>>>>> + &(OBJ)->ops->cache[_desc->id & (KOBJ_CACHE_SIZE-1)];\ >>>>>>=20 >>>>>> This has caused a number of errors as below as an example. >>>>>>=20 >>>>>> --- aq_media.o --- >>>>>> In file included from /opt/src/git-src/sys/dev/aq/aq_media.c:43: >>>>>> In file included from /opt/src/git-src/sys/net/iflib.h:31: >>>>>> In file included from /opt/src/git-src/sys/sys/bus.h:893: >>>>>> ./device_if.h:115:2: error: no member named 'ops' in 'struct = kobj_ops' >>>>>> 115 | KOBJOPLOOKUP(((kobj_t)dev)->ops, device_probe); >>>>>=20 >>>>> It appears that the generated file `device_if.h` is not = re-generated after `sys/tools/makeobjops.awk` >>>>> been updated. >>>>>=20 >>>>> Can you please try this first, >>>>>=20 >>>>> ``` >>>>> make cleankernel >>>>> ``` >>>>>=20 >>>>> and then rebuild ? >>>>=20 >>>> This resolved it. Thanks. >>> Hi Zhenlei, >>> Please figure out an appropriate depend-cleanup.sh patch or revert = this >>> ASAP. WITHOUT_CLEAN is a supported configuration, and even our = default, >>> so we cannot break it. >>=20 >> Probably all the foo_if.[ch] need to depend not just on foo_if.m, but = also on >> sys/tools/makeobjops.awk >=20 > It seems we already do for the suffix transformation rules in kmod.mk, > but not for the MFILES rules in kern.post.mk, nor for the uses of > NORMAL_M in sys/conf/files*. SomeoneTM should test and commit such a > fix. Ah, I see the problem ! >=20 > Jessica --Apple-Mail=_22CAF868-5F2E-4305-9516-9DD9FD5F1175 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Nov 20, 2026, at 11:32 PM, Jessica Clarke <jrtc27@freebsd.org> = wrote:

On 20 Nov 2026, at 15:14, John Baldwin <jhb@freebsd.org> = wrote:
On = 11/20/26 09:25, Jessica Clarke wrote:
On 20 Nov 2026, at 14:21, Cy Schubert <Cy.Schubert@cschubert.com> wrote:
On Fri, 20 Nov 2026 = 21:48:37 +0800
Zhenlei Huang <zlei@FreeBSD.org> = wrote:

On Nov 20, 2026, at 9:36 = PM, Cy Schubert <Cy.Schubert@cschubert.com> wrote:

In message <6b001ca8.17a65.140055b6@gitrepo.freebsd.org <mailto:6b001ca8.17a65.140055b6@gitrepo.freebsd.org>>,= Zhenlei Huang
writes:
The branch main has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=3Dbf362c1b41c803c732014= 7b89915bd65
88dd6071

commit= bf362c1b41c803c7320147b89915bd6588dd6071
Author: =     Elliott Mitchell <ehem+freebsd@m5p.com>
AuthorDate: = 2025-01-10 00:45:05 +0000
Commit: =     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2026-11-20 10:09:02 +0000

 kobj: convert KOBJOPLOOKUP() to returning pointer to = function

 This makes KOBJOPLOOKUP() = rather more suitable for purposes outside the
 macros = generated by makeobjops.awk. Of note other callers can lookup
 the function on their parent class and call that = explicitly.

 Reviewed by: =    zlei
 MFC after: =      2 weeks
 Differential = Revision:  https://reviews.freebsd.org/D48408
---
sys/sys/kobj.h =           | 20 = ++++++++++----------
sys/tools/makeobjops.awk |  6 = +++---
2 files changed, 13 insertions(+), 13 = deletions(-)

diff --git a/sys/sys/kobj.h = b/sys/sys/kobj.h
index 890ad1d39a13..3cdbf14d124c = 100644
--- a/sys/sys/kobj.h
+++ = b/sys/sys/kobj.h
@@ -247,30 +247,30 @@ extern u_int = kobj_lookup_misses;
* slow way.
*/
#ifdef KOBJ_STATS
-#define KOBJOPLOOKUP(OPS,OP) = do { \
+#define KOBJOPLOOKUP(OBJ, OP) __extension__ ({ = \
kobjop_desc_t _desc =3D &OP##_##desc; \
kobj_method_t **_cep =3D \
- =     &OPS->cache[_desc->id & = (KOBJ_CACHE_SIZE-1)]; \
+ =     &(OBJ)->ops->cache[_desc->id & = (KOBJ_CACHE_SIZE-1)];\

This = has caused a number of errors as below as an example.

--- aq_media.o ---
In file included from = /opt/src/git-src/sys/dev/aq/aq_media.c:43:
In file = included from /opt/src/git-src/sys/net/iflib.h:31:
In file = included from /opt/src/git-src/sys/sys/bus.h:893:
./device_if.h:115:2: error: no member named 'ops' in 'struct = kobj_ops'
115 | =         KOBJOPLOOKUP(((kobj_t)dev)= ->ops, device_probe);

It = appears that the generated file `device_if.h` is not re-generated after = `sys/tools/makeobjops.awk`
been updated.

Can you please try this first,

```
make cleankernel
```

and then rebuild ?

This resolved it. Thanks.
Hi Zhenlei,
Please figure out an = appropriate depend-cleanup.sh patch or revert this
ASAP. = WITHOUT_CLEAN is a supported configuration, and even our default,
so we cannot break it.

Probably all the foo_if.[ch] need to depend not just on = foo_if.m, but also on
sys/tools/makeobjops.awk

It seems we already do for the suffix transformation rules in = kmod.mk,
but not for = the MFILES rules in kern.post.mk, nor for the uses of
NORMAL_M in = sys/conf/files*. SomeoneTM should test and commit such a
fix.

Ah, = I see the problem !


Jessica



= --Apple-Mail=_22CAF868-5F2E-4305-9516-9DD9FD5F1175--