From owner-freebsd-arch Tue Dec 10 14: 8:47 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BEC037B401; Tue, 10 Dec 2002 14:08:46 -0800 (PST) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0529E43EA9; Tue, 10 Dec 2002 14:08:37 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 4A9862A8A5; Tue, 10 Dec 2002 14:08:28 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Robert Watson Cc: arch@FreeBSD.org Subject: Re: busdma support in various device drivers In-Reply-To: Date: Tue, 10 Dec 2002 14:08:28 -0800 From: Peter Wemm Message-Id: <20021210220828.4A9862A8A5@canning.wemm.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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