Date: Fri, 21 Oct 2022 20:49:43 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: Gleb Smirnoff <glebius@FreeBSD.org> Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: d6eabdac2ef4 - main - dpaa2: fix build without WITNESS Message-ID: <5o8r9457-958-93p8-1o14-878p402620so@mnoonqbm.arg> In-Reply-To: <202210180540.29I5eO4f068116@gitrepo.freebsd.org> References: <202210180540.29I5eO4f068116@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Oct 2022, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d6eabdac2ef444b62aba186c793fbd5d4226b157 > > commit d6eabdac2ef444b62aba186c793fbd5d4226b157 > Author: Gleb Smirnoff <glebius@FreeBSD.org> > AuthorDate: 2022-10-18 05:38:40 +0000 > Commit: Gleb Smirnoff <glebius@FreeBSD.org> > CommitDate: 2022-10-18 05:38:40 +0000 > > dpaa2: fix build without WITNESS > > Using mutex(9) requires including <sys/lock.h> per manual page. With > WITNESS the header was cryptically included via dpaa_ni.h -> mbuf.h. Secondary path (without WITNESS) while this still doesn't break without the fix but with the fixed mbuf.h: dpaa2_io.c includes sys/bus.h which includes sys/systm.h which includes sys/pcpu.h which includes sys/_lock.h which defines LOCK_DEBUG which then prevents the #error in any of the locking implementations to trigger. This is why arm64's GENERIC-NODEBUG doesn't barf. I would argue the #errors in the locking implementations are close to useless these days (also value assumed on LOCK_DEBUG sometimes before the first check whether it is defined at all). Thanks for catching the general problem; there's more fish to be fried! > --- > sys/dev/dpaa2/dpaa2_io.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/sys/dev/dpaa2/dpaa2_io.c b/sys/dev/dpaa2/dpaa2_io.c > index 14b5fa31cbc9..e2b7992bfdb6 100644 > --- a/sys/dev/dpaa2/dpaa2_io.c > +++ b/sys/dev/dpaa2/dpaa2_io.c > @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); > #include <sys/rman.h> > #include <sys/module.h> > #include <sys/malloc.h> > +#include <sys/lock.h> > #include <sys/mutex.h> > #include <sys/_cpuset.h> > #include <sys/cpuset.h> > -- Bjoern A. Zeeb r15:7
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5o8r9457-958-93p8-1o14-878p402620so>