Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Mar 2023 21:52:27 +0100
From:      Joerg Wunsch <j@uriah.heep.sax.de>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 175a584e501e - main - usb: dwc3: add <sys/mutex.h>
Message-ID:  <ZAj1i7VTdUR2%2BUSO@uriah.heep.sax.de>
In-Reply-To: <CACNAnaGUeXEyMhK7sm5HpX195agA6uw2M_T2YeHeLPDucEK5oQ@mail.gmail.com>
References:  <202303082001.328K1iMn005869@gitrepo.freebsd.org> <CACNAnaHC0nM%2BsggOjw7PA_zZOMPN8Tyy4u-L2kJnQMK_OMzxUg@mail.gmail.com> <ZAju6PJHo5OlD9tE@uriah.heep.sax.de> <CACNAnaGUeXEyMhK7sm5HpX195agA6uw2M_T2YeHeLPDucEK5oQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
As Kyle Evans wrote:

> > sys/dev/dpaa2/dpaa2_mc.c fails to compile since LA_UNLOCKED is
> > undefined. This is aliased to MA_NOTOWNED in <sys/mutex.h>.
> >
> > Sure, I can get it to compile by adding <sys/lock.h> to that file, but
> > I don't see why it could ever compile at all.  OTOH, wouldn't it make
> > sense that <sys/mutex.h> itself included <sys/lock.h>?
> >
> 
> It looks like it's getting it via pollution from ACPI headers or from
> sys/mutex.h -> sys/lock_profiling.h -> sys/lock.h with LOCK_PROFILING
> enabling.
> 
> It would make sense, but we've only semi-recently started considering
> making headers self-contained.

OK, thanks for the analysis.

As adding <sys/lock.h> to dpaa2_mc.c fixes the compile issue, and got
me a complete kernel compilation on arm64, I just committed it that
way.  If someone sees a better way, it's also fine - as it is, it
seemed the least intrusive option to me. (Just affects one file, while
touching <sys/mutex.h> would touch the entire kernel.)

-- 
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZAj1i7VTdUR2%2BUSO>