Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4095529imu; Mon, 10 Dec 2018 13:04:12 -0800 (PST) X-Google-Smtp-Source: AFSGD/WZ/orS6b9Bd27e01CEWsW71hiYyCzhRGbRMgPQcXV7bgecf6dCW+uD6lDw2VS/zn+MEzBK X-Received: by 2002:a17:902:209:: with SMTP id 9mr13792267plc.288.1544475852854; Mon, 10 Dec 2018 13:04:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544475852; cv=none; d=google.com; s=arc-20160816; b=hnzDXeBD9Vsf+iNrxHE1+x+ROLKZ9FyPXGDmX/X5OcKXAHjHaNuibOY3giGybxqjik /TyS1vNPNtZeIeohHRnU66ygykZ5nXDm9utgs4F+AMrEgbONErSS8vuRteuhJuZwuBvl pnao3Iv1UVUjjpZ7rKPw5eHj+2jYHbEpVrqSSGsoMT+ZYMIoLiK03CuJdqvbYLCc5HFG BYqYYpLB+Gs3q2KIyeCQu0tyBoLIGC4u/Uju+c23YNKL5n0aJKoqJBiKAe2vAf4VVPR8 zWy8AvSatlnrMScJhaBL6dOnDZfvJl9FeHElt28fBgLia14/+M/C3X4buWcF6dd6WeDW fjyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=dvvUG96jrD6NMvi7c2otsFkK5iALUH8D26PGs4EMB5g=; b=zjUZFXRg7amfdPeYIBDk9+o0HtYFSgWXcl4h92c3Gp+op1KDyu74tCh3qzw06lWLhe 7z5oG9C5bwvqfWF5Kjpy5yY46YxQTqZXVWdOiK8fe5/sXoDSAmCEtjPxVZJ7W3IDHBjb jANhnDq1Nak+3RD1MOKAi+f09/9YtCpX1FxLhJ65DbNvWp44Z8erO5fc87icYe+IwWUC wVjY5jvjFSmGcbBffhPIK+yDYus4PnFXP1TDuU3NU7LB2qQxqjN7BmS2UtI+P1RHNdVY ul1NduQX2DTBEuOpeQ0b8NOUitpYzhh5IVgw6A8Om9D8VA+giax7I8VkGWg1OrjR1ObZ Sbrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t20si10165189pgl.211.2018.12.10.13.03.56; Mon, 10 Dec 2018 13:04:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729787AbeLJUto (ORCPT + 99 others); Mon, 10 Dec 2018 15:49:44 -0500 Received: from gate.crashing.org ([63.228.1.57]:53618 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726392AbeLJUtn (ORCPT ); Mon, 10 Dec 2018 15:49:43 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id wBAKnLNP015176; Mon, 10 Dec 2018 14:49:23 -0600 Message-ID: <8a2e104a6c5b745adca8e7f3310af564f3b8a75d.camel@kernel.crashing.org> Subject: Re: use generic DMA mapping code in powerpc V4 From: Benjamin Herrenschmidt To: Christoph Hellwig , Rui Salvaterra Cc: linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Tue, 11 Dec 2018 07:49:21 +1100 In-Reply-To: <20181210193317.GA31514@lst.de> References: <20181130103222.GA23393@lst.de> <42b1408cafe77ebac1b1ad909db237fe34e4d177.camel@kernel.crashing.org> <20181208171746.GB15228@lst.de> <20181210193317.GA31514@lst.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.2 (3.30.2-2.fc29) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-12-10 at 20:33 +0100, Christoph Hellwig wrote: > On Mon, Dec 10, 2018 at 05:04:46PM +0000, Rui Salvaterra wrote: > > Hi, Christoph and Ben, > > > > It just came to my mind (and this is most likely a stupid question, > > but still)… Is there any possibility of these changes having an > > (positive) effect on the long-standing problem of Power Mac machines > > with AGP graphics cards (which have to be limited to PCI transfers, > > otherwise they'll hang, due to coherence issues)? If so, I have a G4 > > machine where I'd gladly test them. > > These patches themselves are not going to affect that directly. > But IFF the problem really is that the AGP needs to be treated as not > cache coherent (I have no idea if that is true) the generic direct > mapping code has full support for a per-device coherent flag, so > support for a non-coherent AGP slot could be implemented relatively > simply. AGP is a gigantic nightmare :-) It's not just cache coherency issues (some implementations are coherent, some aren't, Apple's is ... weird). Apple has all sort of bugs, and Darwin source code only sheds light on some of them. Some implementation can only read, not write I think, for example. There are issues with transfers crossing some boundaries I beleive, but it's all unclear. Apple makes this work with a combination of hacks in the AGP "driver" and the closed source GPU driver, which we don't see. I have given up trying to make that stuff work reliably a decade ago :) Cheers, Ben.