, Leo Weppelman <leo@wau.mis.ah.nl>
From: Matt Thomas <matt@3am-software.com>
List: tech-kern
Date: 12/18/1997 10:11:45
At 01:41 PM 12/17/97 -0800, Jason Thorpe wrote:
>On Wed, 17 Dec 1997 14:32:10 +0100
> Leo Weppelman <leo@wau.mis.ah.nl> wrote:
>
> > Yesterday, I was looking at a contributed driver that contained a line
> > like:
> >
> > uiomove((caddr_t)(sc->sc_memt + sc->sc_memh + uio->uio_offset),
> > length, uio);
> >
> > obviously, this is not correct. However, what *is* the correct solution
> > here? Should there always be an intermediate copy to a buffer like:
> > bus_space_read_multi_1(sc->sc_memt, sc->sc_memh, uio->uio_offset,
> > buf, length);
> > uiomove(buf, length, uio);
> >
> > This is not very efficient. Am I missing something obvious?
>
>What is the driver? In any case, with shared memory devices like this,
>you really don't have much of a choice.
I think he's asking for
bus_space_uio_multi_1(uio, tag, handle)
(and the obvious dot product). busdma has uio support and it seems
reasonable for bus_space to have uio support as well.
--
Matt Thomas Internet: matt@3am-software.com
3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt/
Nashua, NH Disclaimer: I disavow all knowledge of this message