Re: Patched gpsd and /dev/pps0 results in "sleeping thread" kernel panic

From: Warner Losh <imp_at_bsdimp.com>
Date: Wed, 01 Sep 2021 17:48:02 UTC
On Wed, Sep 1, 2021 at 11:28 AM Craig Leres <leres@freebsd.org> wrote:

> On 9/1/21 8:07 AM, Ian Lepore wrote:
> > Warner, I pointed out a small change needed to your proposed patch in
> > D31763.
>
> I was able to figure out what to change and am happy to report that it
> solves the kernel panic; thanks! Now I'm back to only fighting with gpsd.
>

That patch looks good to me. I'll update the phab here in a few minutes.


> Are the other calls to pps_init() ok?
>
>      steel 183 # find . -name '*.c' | xargs fgrep -w pps_init
>      ./dev/sio/sio.c:        pps_init(&com->pps);
>      ./i386/i386/elan-mmcr.c:        pps_init(&elan_pps);
>      ./kern/kern_tc.c:pps_init(struct pps_state *pps)
>      ./kern/kern_tc.c:       pps_init(pps);
>
> I've attached my working version of the patch.
>

Great! Thanks for testing. sio.c and elan-mmcr.c are likely not worth
updating
since they are quite old (sio.c has been removed from main, and the elan
CPU is little-used with -current). The Elan was from the late 90s or early
2000s,
give or take, and designs have moved on since it went EOL over a decade
ago. I got rid of my old gear based on that years ago as well, so I can't
easily
test it. The kern_tc.c file is fine.

Warner