Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 May 1999 10:01:19 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        cvs-all@freebsd.org, cvs-committers@freebsd.org, peter@freebsd.org
Subject:   Re: cvs commit: src/sys/isa sio.c
Message-ID:  <Pine.BSF.4.05.9905100959070.447-100000@herring.nlsystems.com>
In-Reply-To: <199905092209.IAA24862@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 10 May 1999, Bruce Evans wrote:

> >  Modified files:
> >    sys/isa              sio.c 
> >  Log:
> >  Optimize out a couple of places where com_addr() is used twice in a row,
> >  although this is pretty trivial.  devclass_get_softc() is a tad more
> >  expensive than the old com_addr() implementation.  If Bruce is really
> >  worried about the cost of this, it could always be changed so that the
> >  softc pointer is stored in a local array again.
> 
> 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).

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

--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 442 9037




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?Pine.BSF.4.05.9905100959070.447-100000>