Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 May 1999 19:51:39 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, dfr@nlsystems.com
Cc:        cvs-all@freebsd.org, cvs-committers@freebsd.org, peter@freebsd.org
Subject:   Re: cvs commit: src/sys/isa sio.c
Message-ID:  <199905100951.TAA04277@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> I'm not very worried about the cost.  I'm worried about the invalid
>> implementation.  It is invalid to access data not managed by the driver
>> from a fast interrupt handler.
>
>After the driver is attached, the device system won't touch any memory in
>the path of devclass_get_softc() without calling DEVICE_DETACH unless a
>new device is added to that devclass (a new sio unit).

Even read access and function calls are invalid, since the complete C
environment is not necessarily set up for fast interrupt handlers.

>The interrupt routine is passed the softc directly I think so this isn't a
>problem.

It is a problem for the COM_MULTIPORT case.  That case ignores the
passed-in softc and checks all sio devices that have a non-NULL softc.
I think there are no problems in practice, but this is not easy to see
(it depends on the driver disabling interrupts on all known sio ports
in the first call to sioattach(), and pointer writes being atomic on
supported machines).

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905100951.TAA04277>