From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93639C04EB8 for ; Sat, 8 Dec 2018 17:19:50 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 490B52083D for ; Sat, 8 Dec 2018 17:19:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 490B52083D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43Bx0h1RLdzDqTx for ; Sun, 9 Dec 2018 04:19:48 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lst.de (client-ip=213.95.11.211; helo=newverein.lst.de; envelope-from=hch@lst.de; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=lst.de Received: from newverein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43BwyP5bSpzDrBx for ; Sun, 9 Dec 2018 04:17:49 +1100 (AEDT) Received: by newverein.lst.de (Postfix, from userid 2407) id 42CC268AA6; Sat, 8 Dec 2018 18:17:46 +0100 (CET) Date: Sat, 8 Dec 2018 18:17:46 +0100 From: Christoph Hellwig To: Benjamin Herrenschmidt Subject: Re: use generic DMA mapping code in powerpc V4 Message-ID: <20181208171746.GB15228@lst.de> References: <20181130103222.GA23393@lst.de> <42b1408cafe77ebac1b1ad909db237fe34e4d177.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42b1408cafe77ebac1b1ad909db237fe34e4d177.camel@kernel.crashing.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, hch@lst.de, linux-kernel@vger.kernel.org, Rui Salvaterra Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Sun, Dec 02, 2018 at 05:11:02PM +1100, Benjamin Herrenschmidt wrote: > Talking of which ... Christoph, not sure if we can do something about > this at the DMA API level or keep hacks but some adapters such as the > nVidia GPUs have a HW hack we can use to work around their limitations > in that case. > > They have a register that can program a fixed value for the top bits > that they don't support. > > This works fine for any linear mapping with an offset, provided they > can program the offset in that register and they have enough DMA range > to cover all memory from that offset. > > I can probably get the info about this from them so we can exploit it > in nouveau. I think we can expose the direct mapping offset if people care enough, we just have to be very careful designing the API. I'll happily leave that to those that actually want to use it, but I'll gladly help reviewing it.