From owner-cvs-all Mon May 10 2: 2: 0 1999 Delivered-To: cvs-all@freebsd.org Received: from herring.nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (Postfix) with ESMTP id CD16E156DA; Mon, 10 May 1999 02:01:33 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id KAA51700; Mon, 10 May 1999 10:01:19 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Mon, 10 May 1999 10:01:19 +0100 (BST) From: Doug Rabson To: Bruce Evans Cc: cvs-all@freebsd.org, cvs-committers@freebsd.org, peter@freebsd.org Subject: Re: cvs commit: src/sys/isa sio.c In-Reply-To: <199905092209.IAA24862@godzilla.zeta.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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