Home | History | Annotate | Download | only in linux
History log of /src/sys/external/bsd/common/include/linux/errno.h
RevisionDateAuthorComments
 1.5  19-Dec-2021  riastradh EHWPOISON
 1.4  16-Apr-2019  mrg 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.
 1.3  16-Jul-2014  riastradh branches: 1.3.2; 1.3.6; 1.3.24; 1.3.32;
Make it build and boot on my test machines.

Screen blanks on boot on the Ivy Bridge system with

DRM error in cpt_serr_int_handler: PCH transcoder A FIFO underrun

But after that everything is OK. Appears to be an upstream problem.
To investigate...

I think there's a cache flushing issue somewhere -- there are little
display artefacts on my T60.
 1.2  03-Jul-2014  riastradh Add some notes on using these shims to port Linux kernel code.
 1.1  07-Apr-2014  riastradh branches: 1.1.2; 1.1.4;
Move <linux/errno.h> from drm2 to common.
 1.1.4.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1  07-Apr-2014  yamt file errno.h was added on branch yamt-pagecache on 2014-05-22 11:40:42 +0000
 1.1.2.2  18-May-2014  rmind sync with head
 1.1.2.1  07-Apr-2014  rmind file errno.h was added on branch rmind-smpnet on 2014-05-18 17:45:53 +0000
 1.3.32.1  10-Jun-2019  christos Sync with HEAD
 1.3.24.1  23-Apr-2019  martin 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.
 1.3.6.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.6.1  16-Jul-2014  tls file errno.h was added on branch tls-maxphys on 2014-08-20 00:03:56 +0000
 1.3.2.2  10-Aug-2014  tls Rebase.
 1.3.2.1  16-Jul-2014  tls file errno.h was added on branch tls-earlyentropy on 2014-08-10 06:55:27 +0000

RSS XML Feed