Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1999148imm; Tue, 10 Jul 2018 11:20:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc4GfodG+P5xTtQkPH7clP8nZI+G9g7napwo8ii6oyECEMI9cCln8mfCfe0+1bJlziiqkmH X-Received: by 2002:a17:902:1005:: with SMTP id b5-v6mr26062800pla.207.1531246805336; Tue, 10 Jul 2018 11:20:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531246805; cv=none; d=google.com; s=arc-20160816; b=njBujQdFmXNAyG5DhMu2RfxFgOB/lJFaDFswgh1Cf5YRWOEN4YdYS9lcPfbtm0JNQA XhLfZJhujDbGLgeNPBWSyYMYKOnLLPXf1cbHhDXu1wsDA5/94kzr2vzG7r3Eas+VuFzE he1G5Bzk8ORBtiNIo/6Rf1tjtG5sWlNvhniI4zuFKlX2LiuK7jtYt5xG/OM1cF8SE3jt qOLnhhvTrguazzGH5MzyR9dmKzXEElcQDBK+NtRYp/hBX80GGQ69P89De2MUGFe7CylL XQ5VLdxl30q+c+exzfP9N08fMSMyiVSTP7jo7CbJ1/VjxUwXMBy9JbNUZKnV4DfYSeBT p6Fg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=bFLDN82+KEl5pa1XYwe3m0A0gQzBD3XpAaB0yHCQGoQ=; b=nfLj67J+MXc5p1/5X+VSNnI0tbVl1TuStOzsNvv7p1e98CCvaxoCwqasPuyGCgBuQ6 MSntDeplehA4utAbM8MDYd/gnwPrTVKmeQrtt3giOKVBv4S7+Wd9bEEpOYO6Xv8fMXG1 kGkBidChS8e0Xlj5frIAf2nws4dybdU9/oqFhmQlW5rmRgP+JwGK578eor8iq0kWyygi EQmmTREGqtW9FoaSLbRIdOpNj3DaF3EJUpAN8+Dlma2CoyxqU16JS/LtlFadh81YeU0j y2h/wQgZnXnWaPr9vEjDUIP2Dc+0K4jjk0EvUW0DaozkkhIlqzWUA3JnkhI+14WWs8Wj dU6Q== 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 w19-v6si17491962pfn.160.2018.07.10.11.19.50; Tue, 10 Jul 2018 11:20:05 -0700 (PDT) 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 S1732424AbeGJSSh (ORCPT + 99 others); Tue, 10 Jul 2018 14:18:37 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:51616 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732373AbeGJSSh (ORCPT ); Tue, 10 Jul 2018 14:18:37 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2B1191DCB; Tue, 10 Jul 2018 11:11:43 -0700 (PDT) Received: from [10.1.210.23] (e110467-lin.cambridge.arm.com [10.1.210.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7913F3F5AD; Tue, 10 Jul 2018 11:11:40 -0700 (PDT) Subject: Re: [RFC PATCH 0/4] Stop losing firmware-set DMA masks To: Christoph Hellwig Cc: m.szyprowski@samsung.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, lorenzo.pieralisi@arm.com, hanjun.guo@linaro.org, sudeep.holla@arm.com, robh+dt@kernel.org, frowand.list@gmail.com, gregkh@linuxfoundation.org, joro@8bytes.org, x86@kernel.org, Palmer Dabbelt , linux-riscv@lists.infradead.org References: <20180710180232.GA26285@lst.de> From: Robin Murphy Message-ID: <89365af4-19fa-1dc2-27d0-37e9145134af@arm.com> Date: Tue, 10 Jul 2018 19:11:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180710180232.GA26285@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/07/18 19:02, Christoph Hellwig wrote: >> These patches attempt to deal with this in the simplest way possible by >> generalising the specific quirk for 32-bit bridges into an arbitrary >> mask which can then also be plumbed into the firmware code. In the >> interest of being minimally invasive, I've only included a point fix >> for the IOMMU issue as seen on arm64 - there may be further tweaks >> needed in DMA ops to catch all possible incarnations of this problem, >> but this initial RFC is mostly about the impact beyond the dma-mapping >> subsystem itself. > > Thanks, this looks very nice to me. > > In fact it probably solves the RISC-V/Xiling problem as well if we can > just add the dma-ranges property to the device tree for the affected > systems. Palmer, do you know how easily the DT could be updated for > that case? That would indeed be nice, but beware that the way PCI devices are bodged through of_dma_configure() only actually works for dma-coherent and is busted WRT parsing dma-ranges correctly. Fixing that is my next step after getting these basics done ;) Robin.