Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jul 2018 11:02:06 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Matt Macy <mmacy@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r335879 - in head/sys: conf kern sys
Message-ID:  <dcb9eaa8-71ab-1830-e3d5-583a9e324794@FreeBSD.org>
In-Reply-To: <201807030155.w631tARo009470@repo.freebsd.org>
References:  <201807030155.w631tARo009470@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--qZEWcDA7eghFgBt6Qdfww1zpUx2AfipFd
Content-Type: multipart/mixed; boundary="mqVc29nT1NLGjktFNs0IMbo6ULtTzQ98i";
 protected-headers="v1"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: Matt Macy <mmacy@FreeBSD.org>, src-committers@freebsd.org,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
Message-ID: <dcb9eaa8-71ab-1830-e3d5-583a9e324794@FreeBSD.org>
Subject: Re: svn commit: r335879 - in head/sys: conf kern sys
References: <201807030155.w631tARo009470@repo.freebsd.org>
In-Reply-To: <201807030155.w631tARo009470@repo.freebsd.org>

--mqVc29nT1NLGjktFNs0IMbo6ULtTzQ98i
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 7/2/2018 6:55 PM, Matt Macy wrote:
> Author: mmacy
> Date: Tue Jul  3 01:55:09 2018
> New Revision: 335879
> URL: https://svnweb.freebsd.org/changeset/base/335879
>=20
> Log:
>   make critical_{enter, exit} inline
>  =20
>   Avoid pulling in all of the <sys/proc.h> dependencies by
>   automatically generating a stripped down thread_lite exporting
>   only the fields of interest. The field declarations are type checked
>   against the original and the offsets of the generated result is
>   automatically checked.
>  =20
>   kib has expressed disagreement and would have preferred to simply
>   use genassym style offsets (which loses type check enforcement).
>   jhb has expressed dislike of it due to header pollution and a
>   duplicate structure. He would have preferred to just have defined
>   thread in _thread.h. Nonetheless, he admits that this is the only
>   viable solution at the moment.
>  =20
>   The impetus for this came from mjg's D15331:
>   "Inline critical_enter/exit for amd64"
>  =20
>   Reviewed by: jeff
>   Differential Revision: https://reviews.freebsd.org/D16078
>=20
> Added:
>   head/sys/kern/genoffset.c   (contents, props changed)
>   head/sys/kern/genoffset.sh   (contents, props changed)
>   head/sys/sys/kpilite.h   (contents, props changed)
> Modified:
>   head/sys/conf/kern.post.mk
>   head/sys/conf/kern.pre.mk
>   head/sys/kern/kern_switch.c
>   head/sys/sys/assym.h
>   head/sys/sys/systm.h
>=20
> Modified: head/sys/conf/kern.post.mk
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/conf/kern.post.mk	Mon Jul  2 22:59:29 2018	(r335878)
> +++ head/sys/conf/kern.post.mk	Tue Jul  3 01:55:09 2018	(r335879)
> @@ -185,13 +185,25 @@ hack.pico: Makefile
>  	${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.pico
>  	rm -f hack.c
> =20
> -assym.inc: $S/kern/genassym.sh genassym.o
> +offset.inc: $S/kern/genoffset.sh genoffset.o
> +	NM=3D'${NM}' NMFLAGS=3D'${NMFLAGS}' sh $S/kern/genoffset.sh genoffset=
=2Eo > ${.TARGET}
> +
> +genoffset.o: $S/kern/genoffset.c
> +	${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/kern/genoffset.c
> +
> +genoffset_test.c: $S/kern/genoffset.c
> +	cp $S/kern/genoffset.c genoffset_test.c
> +
> +genoffset_test.o: genoffset_test.c offset.inc
> +	${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST genoffset_test.c=

> +
> +assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o
>  	NM=3D'${NM}' NMFLAGS=3D'${NMFLAGS}' sh $S/kern/genassym.sh genassym.o=
 > ${.TARGET}

What's genoffset_test? Nothing seems to use it.

--=20
Regards,
Bryan Drewery


--mqVc29nT1NLGjktFNs0IMbo6ULtTzQ98i--

--qZEWcDA7eghFgBt6Qdfww1zpUx2AfipFd
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJbO7ofAAoJEDXXcbtuRpfPktoIAMZ7a+CYLcFoTzJBaMKGmDVd
+JXI6aRvXjDfZeD8qWqqnqgXTA3dB6EYl2l/LgeDXcyqoLCKULIparvwiaMvvfmN
DiA74JydeI9kmXf1QSoemlgVK6UMelyvg7hE4WSUscRPYQci/20cFz4DTJ4+jCVT
jES5LkCwjAqWh7AwTeff0wouD0l+SrkrTMBC09MPzrlYE4s2wvp/trQ8Eal5Q48P
TZbKGjNBO/Zmj48dmpEbKCeRG9GHHlbntH8uyHvcQPV15hL4WZmVUz2N+ZH8590O
HboqlO+srE1QmUwYNfuROSYysembGGebJJ84vAq44PyQ1zKh727ckKF/NDnXz8M=
=a7ek
-----END PGP SIGNATURE-----

--qZEWcDA7eghFgBt6Qdfww1zpUx2AfipFd--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?dcb9eaa8-71ab-1830-e3d5-583a9e324794>