Date: Tue, 3 Jul 2018 15:23:30 -0400 From: Jung-uk Kim <jkim@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org>, Niclas Zeising <zeising+freebsd@daemonic.se>, "O. Hartmann" <ohartmann@walstatt.org>, FreeBSD Current <freebsd-current@FreeBSD.org> Subject: Re: atomic changes break drm-next-kmod? Message-ID: <94747acc-dbf4-69db-aa19-687155f66dbf@FreeBSD.org> In-Reply-To: <ee0f7fce-7ce3-3784-f9e8-0f6862d59303@FreeBSD.org> References: <c640afcd-1fa4-a43e-5f36-f0bd11aad63d@protected-networks.net> <20180703170223.266dbf5b@thor.intern.walstatt.dynvpn.de> <cbd2d2f2-8ce4-871a-9aaf-75738d6c465b@daemonic.se> <ee0f7fce-7ce3-3784-f9e8-0f6862d59303@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) --vmwgeAHtBFsGVcVprwJJbz8fbnjyRVGbB Content-Type: multipart/mixed; boundary="dUhoP8y9a7ucs2eJLYD1i8CsweR27ZwmV"; protected-headers="v1" From: Jung-uk Kim <jkim@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org>, Niclas Zeising <zeising+freebsd@daemonic.se>, "O. Hartmann" <ohartmann@walstatt.org>, FreeBSD Current <freebsd-current@FreeBSD.org> Message-ID: <94747acc-dbf4-69db-aa19-687155f66dbf@FreeBSD.org> Subject: Re: atomic changes break drm-next-kmod? References: <c640afcd-1fa4-a43e-5f36-f0bd11aad63d@protected-networks.net> <20180703170223.266dbf5b@thor.intern.walstatt.dynvpn.de> <cbd2d2f2-8ce4-871a-9aaf-75738d6c465b@daemonic.se> <ee0f7fce-7ce3-3784-f9e8-0f6862d59303@FreeBSD.org> In-Reply-To: <ee0f7fce-7ce3-3784-f9e8-0f6862d59303@FreeBSD.org> --dUhoP8y9a7ucs2eJLYD1i8CsweR27ZwmV Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 07/03/2018 15:02, John Baldwin wrote: > On 7/3/18 11:28 AM, Niclas Zeising wrote: >> On 07/03/18 17:02, O. Hartmann wrote: >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA512 >>> >>> Am Tue, 3 Jul 2018 10:19:57 -0400 >>> Michael Butler <imb@protected-networks.net> schrieb: >>> >>>> It seems recent changes (SVN r335873?) may have broken drm-next-kmod= .. >>>> >>>> --- i915_drv.o --- >>>> In file included from i915_drv.c:30: >>>> In file included from >>>> /usr/ports/graphics/drm-next-kmod/work/kms-drm-a753215/linuxkpi/gplv= 2/include/linux/acpi.h:26: >>>> In file included from >>>> /usr/ports/graphics/drm-next-kmod/work/kms-drm-a753215/linuxkpi/gplv= 2/include/linux/device.h:4: >>>> In file included from >>>> /usr/src/sys/compat/linuxkpi/common/include/linux/device.h:35: >>>> In file included from >>>> /usr/src/sys/compat/linuxkpi/common/include/linux/types.h:37: >>>> In file included from /usr/src/sys/sys/systm.h:44: >>>> ./machine/atomic.h:450:29: error: invalid operand for instruction >>>> ATOMIC_ASM(clear, long, "andq %1,%0", "ir", ~v); >>>> ^ >>>> <inline asm>:1:7: note: instantiated into assembly here >>>> andq $9223372036854775807,40672(%r14) >>>> ^~~~~~~~~~~~~~~~~~~~~ >>>> 1 error generated. >>>> *** [i915_drv.o] Error code 1 >>>> >>>> make[3]: stopped in >>>> /usr/ports/graphics/drm-next-kmod/work/kms-drm-a753215/i915 >>>> --- i915_gem.o --- >>>> In file included from i915_gem.c:28: >>>> In file included from >>>> /usr/ports/graphics/drm-next-kmod/work/kms-drm-a753215/include/drm/d= rmP.h:38: >>>> In file included from /usr/src/sys/sys/malloc.h:42: >>>> In file included from /usr/src/sys/sys/systm.h:44: >>>> ./machine/atomic.h:449:29: error: invalid operand for instruction >>>> ATOMIC_ASM(set, long, "orq %1,%0", "ir", v); >>>> ^ >>>> <inline asm>:1:6: note: instantiated into assembly here >>>> orq $-9223372036854775808,40672(%r14) >>>> ^~~~~~~~~~~~~~~~~~~~~~ >>>> 1 error generated. >>>> *** [i915_gem.o] Error code 1 >>>> >>>> _______________________________________________ >>>> freebsd-current@freebsd.org mailing list >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-current >>>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebs= d.org" >>> >>> >>> It breaks also graphics/drm-stable-kmod (see PR 229484, >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229484, same erro= r as you described >>> above) and also emulators/virtualbox-ose-kmod. As long as CURRENT rev= ision is < r335873, >>> those kmod compile well. >> >> We are looking into why both the drm ports fail. >> Regards >> >=20 > I haven't yet tested an amd64 kernel with this, but I think this change= to sys/amd64/include/atomic.h > might fix it: >=20 > Index: atomic.h > =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 > --- atomic.h (revision 335896) > +++ atomic.h (working copy) > @@ -446,10 +446,10 @@ ATOMIC_ASM(clear, int, "andl %1,%0", "ir", = ~ > ATOMIC_ASM(add, int, "addl %1,%0", "ir", v); > ATOMIC_ASM(subtract, int, "subl %1,%0", "ir", v); > =20 > -ATOMIC_ASM(set, long, "orq %1,%0", "ir", v); > -ATOMIC_ASM(clear, long, "andq %1,%0", "ir", ~v); > -ATOMIC_ASM(add, long, "addq %1,%0", "ir", v); > -ATOMIC_ASM(subtract, long, "subq %1,%0", "ir", v); > +ATOMIC_ASM(set, long, "orq %1,%0", "er", v); > +ATOMIC_ASM(clear, long, "andq %1,%0", "er", ~v); > +ATOMIC_ASM(add, long, "addq %1,%0", "er", v); > +ATOMIC_ASM(subtract, long, "subq %1,%0", "er", v); > =20 > #define ATOMIC_LOADSTORE(TYPE) \ > ATOMIC_LOAD(TYPE); \ Isn't "Z" better than "e" in this case? Jung-uk Kim --dUhoP8y9a7ucs2eJLYD1i8CsweR27ZwmV-- --vmwgeAHtBFsGVcVprwJJbz8fbnjyRVGbB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAls7zTwACgkQfJ+WJvzb 8UYGQgf/Rg/ARAry+lGSlKIT+tZgXHdRIG5UQODcnX60hGJMTeL4HxbolBk/71cP 5guFbKWq7FSQpYm7wgMLkJ5XhLwJbCJ06q3GSx0nySeL8y5NtZX7cJ5fDy5Zn4vd 1mvAMLT+jWphWz1nRw6VQJcTfaYYuY37C02eIw4FJtjI8kpZ3rBYNk1dNmppElWJ /g/DDnLiTaoXRAY7MCiANp4UstcPaCgzjTW53lkkIzjRu/L2A9KDWbLY1u9NnUZK UaAg6fxggdaGT+JoRF1qbb9GaR9Zc6hcd0mvpcAbr1pseyuoKNcU9X+NrpH6f4Dq HRL4AoenHndyyzHdano99YyIWnGaVQ== =HvaC -----END PGP SIGNATURE----- --vmwgeAHtBFsGVcVprwJJbz8fbnjyRVGbB--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?94747acc-dbf4-69db-aa19-687155f66dbf>