Date: Tue, 10 Dec 2002 14:08:28 -0800 From: Peter Wemm <peter@wemm.org> To: Robert Watson <rwatson@FreeBSD.org> Cc: arch@FreeBSD.org Subject: Re: busdma support in various device drivers Message-ID: <20021210220828.4A9862A8A5@canning.wemm.org> In-Reply-To: <Pine.NEB.3.96L.1021210101643.62186A-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson wrote: > In general, the use of the folowing routines > connotes a non-portable use of VM: > > vtophys() > kvtop() You forgot pmap_kextract(). This routine REALLY shouldn't be used outside of pmap/machdep/vm*. vtophys() is the public interface to this subsystem. Anywhere that uses pmap_kextract() in drivers should be changed to vtophys(), before we let more bad examples out the door. Imagine what happens if pmap_kextract() returns a pt_entry_t that is a page frame number instead of a physical address? It isn't defined to return a physical address - it just happens to on our current platforms. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021210220828.4A9862A8A5>