From nobody Mon Nov 27 19:51:03 2023 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 4SfGRY0Jrrz52K91; Mon, 27 Nov 2023 19:51:05 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from glebi.us (glebi.us [162.251.186.162]) by mx1.freebsd.org (Postfix) with ESMTP id 4SfGRW6XSrz3YfP; Mon, 27 Nov 2023 19:51:03 +0000 (UTC) (envelope-from glebius@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 162.251.186.162 is neither permitted nor denied by domain of glebius@freebsd.org) smtp.mailfrom=glebius@freebsd.org; dmarc=none Received: by glebi.us (Postfix, from userid 1000) id 52ECC6D56F; Mon, 27 Nov 2023 11:51:03 -0800 (PST) Date: Mon, 27 Nov 2023 11:51:03 -0800 From: Gleb Smirnoff To: John Baldwin Cc: Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2a35f3cdf63d - main - sys/mutex.h: Include sys/lock.h instead of sys/_lock.h Message-ID: References: <202311240950.3AO9oSeH089169@gitrepo.freebsd.org> <79e6e3a1-96a5-4d3e-9c48-a89bcbd6303d@FreeBSD.org> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79e6e3a1-96a5-4d3e-9c48-a89bcbd6303d@FreeBSD.org> X-Spamd-Result: default: False [0.60 / 15.00]; VIOLATED_DIRECT_SPF(3.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.996]; ONCE_RECEIVED(0.10)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; R_SPF_SOFTFAIL(0.00)[~all:c]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[glebius]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4SfGRW6XSrz3YfP X-Spamd-Bar: / On Fri, Nov 24, 2023 at 09:27:39AM -0800, John Baldwin wrote: J> > commit 2a35f3cdf63d1f9b1ea5ab0174adabb631757210 J> > Author: Emmanuel Vadot J> > AuthorDate: 2022-10-27 09:43:19 +0000 J> > Commit: Emmanuel Vadot J> > CommitDate: 2023-11-24 09:49:58 +0000 J> > J> > sys/mutex.h: Include sys/lock.h instead of sys/_lock.h J> > It uses the LA_ defines when INVARIANTS is set. J> > This unbreak dpaa2 with FDT only kernel (like ALLWINNER or ROCKCHIP) as J> > the driver only include sys/lock.h via header polution for ACPI kernels. J> > Sponsored by: Beckhoff Automation GmbH & Co. KG J> > Differential Revision: https://reviews.freebsd.org/D37145 J> > Reviewed by: kib, mjg J> J> Avoiding the nested include here was originally an intentional design decision. J> It was supposed to be a compile error if you didn't include lock.h first, and J> callers are always supposed to include both (up until now). However, I'm fine J> with changing this, but we should be consistent and change all the other lock J> headers at once including sys/rwlock.h, sys/sx.h, and sys/lockmgr.h. J> J> You will also need to patch all of these headers to remove the #error if J> LOCK_DEBUG or LOCK_FILE isn't defined (including sys/mutex.h which you missed J> in this commit). J> J> You will also need to update all the relevant manpages (mutex.9, sx.9, rwlock.9, J> and lockmgr.9) to remove the #include . J> J> For MFC purposes I would suggest to also fix dpaa2 to #include J> explicitly as it was supposed to do previously. I'd rather recommend to revert this commit and fix dpaa2 properly. This module has a long history of incorrect include usage, which we were able to handle properly: d6eabdac2ef444b62aba186c793fbd5d4226b157 7fb975c8fb970b35fc34561ed30a0fe220346cb6 b0484678d405722f40278e93cdebe95829c71f3b We should not modify system headers to satisfy dpaa2 or any other driver. -- Gleb Smirnoff