From owner-cvs-all Thu Sep 30 8:47: 3 1999 Delivered-To: cvs-all@freebsd.org Received: from eclogite.eps.nagoya-u.ac.jp (eclogite.eps.nagoya-u.ac.jp [133.6.124.145]) by hub.freebsd.org (Postfix) with ESMTP id ECB2914EA7; Thu, 30 Sep 1999 08:46:57 -0700 (PDT) (envelope-from kato@ganko.eps.nagoya-u.ac.jp) Received: from localhost (gneiss.eps.nagoya-u.ac.jp [133.6.124.148]) by eclogite.eps.nagoya-u.ac.jp (8.9.3/3.7W) with ESMTP id AAA09726; Fri, 1 Oct 1999 00:45:48 +0900 (JST) To: bde@zeta.org.au Cc: imp@village.org, winter@jurai.net, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, nyan@FreeBSD.org, FreeBSD98-hackers@jp.freebsd.org Subject: Re: cvs commit: src/sys/conf files src/sys/i386/conf files.i386 From: KATO Takenori In-Reply-To: Your message of "Mon, 27 Sep 1999 23:52:49 +1000 (EST)" References: X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) X-PGP-Fingerprint: 03 72 85 36 62 46 23 03 52 B1 10 22 44 10 0D 9E Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19991001004518D.kato@gneiss.eps.nagoya-u.ac.jp> Date: Fri, 01 Oct 1999 00:45:18 +0900 X-Dispatcher: imput version 980905(IM100) Lines: 31 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Bruce Evans wrote: > E.g., the line status port is accessed via com->line_status_port instead > of via (com->iobase + com_lsr). The former is always faster (since gcc > doesn't (can't?) know enough about aliasing to use a previously loaded > value of com->iobase, and the addition takes some time. Even if > com->iobase is explicitly loaded into a (register) variable, the > computation of (iobase + com_lsr) takes the same time as the load of > com->line_status_register provided the machine is an i386 and > com->line_status_register is in the L1 cache. (This is where MEMIO may > benefit if we use (iobase + com_lsr). On machines with base+index > addressing, the addition tends to be free. This is also the only excuse > for pushing the addition to the bus space functions.) Now, I think that this method has advantage because of bus stuff implementation. Both bus tag and handle are set via rman_set_* by bus_alloc_resource. Howerver, bus space stuff in FreeBSD cannot manage discontinuouse resources. This means that it is difficult to implement array-like code as Warner said. That is, I/O port addresses should be stored in variables in softc structure as Bruce said and a driver should allocate resources for each I/O port by calling bus_alloc_resource with count = 1. Hmm.... -----------------------------------------------+--------------------------+ KATO Takenori | FreeBSD | Dept. Earth Planet. Sci, Nagoya Univ. | The power to serve! | Nagoya, 464-8602, Japan | http://www.FreeBSD.org/ | ++++ FreeBSD(98) 3.2: Rev. 01 available! |http://www.jp.FreeBSD.org/| ++++ FreeBSD(98) 2.2.8: Rev. 02 available! +==========================+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message