Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-8] src/sys/external/bsd



Module Name:    src
Committed By:   martin
Date:           Tue Apr 23 10:16:52 UTC 2019

Modified Files:
        src/sys/external/bsd/common/include/linux [netbsd-8]: err.h errno.h
        src/sys/external/bsd/drm2/dist/drm/nouveau [netbsd-8]: nouveau_drm.c
            nouveau_fence.c
        src/sys/external/bsd/drm2/drm [netbsd-8]: drm_drv.c
        src/sys/external/bsd/drm2/include/drm [netbsd-8]: drm_wait_netbsd.h
        src/sys/external/bsd/drm2/linux [netbsd-8]: linux_ww_mutex.c

Log Message:
Pull up following revision(s) via patch (requested by mrg in ticket #1242):

        sys/external/bsd/common/include/linux/err.h: revision 1.3
        sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h: revision 1.15
        sys/external/bsd/common/include/linux/errno.h: revision 1.4
        sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c: revision 1.17
        sys/external/bsd/drm2/linux/linux_ww_mutex.c: revision 1.6
        sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fence.c: revision 1.14

fix various problems i've seen where cv_*wait*() return ERESTART,
which is -3 in netbsd, which we have mapped linux ERESTARTSYS to.

this has a problem because linux code often returns errors and
pointers in the same value, and pointer values between -4095 and
- -1 are considered as error returns, but -3 ends up as 3 and thus
is not considered an error, and mayhem ensues.

with this in place my kabylake system seems actually stable, i
have not triggered any of my prior issues in almost 4 weeks now.

Taylor asked me to write up a description and then wrote most of
the text below for me :-)

In Linux code, we always work with ERESTARTSYS so the code meaning
start over is a positive NetBSD errno safe for PTR_ERR/ERR_PTR.

To achieve this:

1. adapt all cv_waits that return to Linux so they map ERESTART to
   ERESTARTSYS, and

2. adapt all returns to userland so they convert ERESTARTSYS to
   ERESTART.

Leave EINTR and all other error codes alone.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.16.1 src/sys/external/bsd/common/include/linux/err.h
cvs rdiff -u -r1.3 -r1.3.24.1 \
    src/sys/external/bsd/common/include/linux/errno.h
cvs rdiff -u -r1.8 -r1.8.10.1 \
    src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c
cvs rdiff -u -r1.4.10.1 -r1.4.10.2 \
    src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fence.c
cvs rdiff -u -r1.17.10.1 -r1.17.10.2 src/sys/external/bsd/drm2/drm/drm_drv.c
cvs rdiff -u -r1.14 -r1.14.10.1 \
    src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h
cvs rdiff -u -r1.2.10.2 -r1.2.10.3 \
    src/sys/external/bsd/drm2/linux/linux_ww_mutex.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index