Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Oct 1999 00:45:18 +0900
From:      KATO Takenori <kato@ganko.eps.nagoya-u.ac.jp>
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 
Message-ID:  <19991001004518D.kato@gneiss.eps.nagoya-u.ac.jp>
In-Reply-To: Your message of "Mon, 27 Sep 1999 23:52:49 %2B1000 (EST)" <Pine.BSF.4.10.9909272254200.707-100000@alphplex.bde.org>
References:  <Pine.BSF.4.10.9909272254200.707-100000@alphplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <bde@zeta.org.au> 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 <kato@ganko.eps.nagoya-u.ac.jp>  |        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




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