Date: Tue, 19 Dec 2017 11:49:57 +0100 From: Hans Petter Selasky <hps@selasky.org> To: Colin Percival <cperciva@tarsnap.com>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325841 - in head/sys: conf dev/mlx4 dev/mlx4/mlx4_core dev/mlx4/mlx4_en dev/mlx4/mlx4_ib modules/mlx4 Message-ID: <b668f3ee-c44f-34e4-4284-0af8fb4ba9dd@selasky.org> In-Reply-To: <010001606bd2747e-d97faaca-1910-41f5-a699-6d015315de9b-000000@email.amazonses.com> References: <201711151114.vAFBEeUb015030@repo.freebsd.org> <0100016067e203d1-fa769584-f8a1-44f2-ac39-1572e8fff087-000000@email.amazonses.com> <6d9cacd6-0f98-54e0-86be-6f202f509b17@selasky.org> <010001606bd2747e-d97faaca-1910-41f5-a699-6d015315de9b-000000@email.amazonses.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12/18/17 23:50, Colin Percival wrote: > On 12/18/17 00:15, Hans Petter Selasky wrote: >> On 12/18/17 05:29, Colin Percival wrote: >>> Also, it breaks some work I have in progress for instrumenting SYSINITs. >>> Would you mind moving the DEFINE_MUTEX line to occur immediately prior to >>> the set_port_type function, rather than being placed inside it? >> >> I'll have a look at this later today. Your point is valid! > > On further examination, it looks like DEFINE_MUTEX is something used in Linux > kernel code, and the way it works there does allow it to be used inside a > function. Is it possible to change the linuxkpi code to make it safe? (It > looks like our mutex initialization is considerably more complicated than > what Linux does, so maybe not...?) Hi, Can you explain what you mean by safe? DEFINE_MUTEX() is simply a wrapper for another SYSINIT. It has nothing to do with the function it is placed inside. > > I have a feeling that we probably don't want to end up in a position of > "every time we import code from Linux, we need to grep for DEFINE_MUTEX > and hoist all of them out of functions". > Can we continue this discussion here: https://reviews.freebsd.org/D13530 --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b668f3ee-c44f-34e4-4284-0af8fb4ba9dd>