From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 7 21:17:53 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9E9E1065672 for ; Thu, 7 Jan 2010 21:17:53 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6EC9F8FC0C for ; Thu, 7 Jan 2010 21:17:53 +0000 (UTC) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.3/8.14.3) with ESMTP id o07LHq0H015572 for ; Thu, 7 Jan 2010 15:17:52 -0600 (CST) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1262899072; bh=QazuTubRt8ADhD4JW3zjOH3eMOu43C738RpArd/kpNQ=; h=Date:From:Message-Id:To:Subject; b=skBYhrOQMLG2tvW6Axn9OIHuqdis/kr3oIy86LyTeYeU/HHPgyvo5cQ3uEsYp2oVb SKqvogtbguElyiISpUU+6JfpqSPpxWn0mMGfW7L40GrPRgZZOprJQaQrltCOtvjxSK lRlyC+RJys26tmKsJgMQR74o8Ytfes0f9HmK7/G8= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id o07LHq7o015571 for freebsd-hackers@freebsd.org; Thu, 7 Jan 2010 15:17:52 -0600 (CST) (envelope-from tinguely) Date: Thu, 7 Jan 2010 15:17:52 -0600 (CST) From: Mark Tinguely Message-Id: <201001072117.o07LHq7o015571@casselton.net> To: freebsd-hackers@freebsd.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.2 (casselton.net [127.0.0.1]); Thu, 07 Jan 2010 15:17:52 -0600 (CST) X-Mailman-Approved-At: Thu, 07 Jan 2010 21:23:24 +0000 Subject: bus_dmamap_load_uio() and user data X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 21:17:53 -0000 In the user space case of bus_dmamap_load_uio(), the calling thread is stored in uio->uio_td, in which the user's pmap can be determined. The ARM processor, with the possible exception of the ARMv7 MPcore with snoop control unit, needs to make the caches consistent before DMA. I noticed that the routine, _bus_dmamap_sync(), copies data into the bounce buffer using current pmap. Can/should we assume the uio sent from to bus_dmamap_load_uio() is always in the same address space as thread that is executing the _bus_dmamap_sync()? --Mark Tinguely