Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2097686imm; Tue, 10 Jul 2018 13:13:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdPufQwONeQe+dLoZw2E5vCG7QXu6RhRRmKfRdm6CiAYcmrcOtaLo2MICNEZLNPJIEKKu0n X-Received: by 2002:a62:c410:: with SMTP id y16-v6mr27062253pff.161.1531253636647; Tue, 10 Jul 2018 13:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531253636; cv=none; d=google.com; s=arc-20160816; b=U4ySTx511CmHI6RZLHBPXjzwoB2BAUBElH+iVhX1FapTYaj08xLrJGdfBfvpLzd2xW k60JDk5/p8BD9KxInenKqoHViGx9trRZRQGIL2lnANIrCor+iuYqc4u41koRIdAKgVq+ Crx3qcSAlzD74GaaL+ZWxBdUbbThUDLiGxnvGp38mlJsxapaeLtK3quxa+/boa9HtuXN aTm+DwolyQ0rcUhZhyON9kOa1q6kRji4Jpd0RFZSz4vnwBkNj+22qSlc37RdCPDPdYAt jeZf1c4siI8pTHEa0HSCFgN+yE7A5Qkf2yCAwsAWid51+Bi816zuCCOcF1aS5z8ZvveI FMkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=WhVGatUnXUhjC+9r3iaJ/FiXDN28KZ0FXtUpV9q4UY4=; b=K7RV5oGumjkl0HhujCxN0exj4f0XqirKiSDbsrCwfwNQ6n0ncr389gvlNHrpR7hTlG nrJrPjI1ApLT0Wo5ucQiQZt4aIjeMvoYQNFD3lAG/y1LtNF/gH2ZLOPdTKRTnHXTUEM7 41kCzNz0ULUSn3/0pyhFg0b5qDZJkUPFciIiE2Z/vnG2n2Vwe9uWmUhlDK2v/PQ3snCx oT3PeDs4Z6WAaRYoYG5SyGMBc0Gg/HoX8hM9a4dX2OKObcvhj13ob2S/zfBhAER5IKqH U7AAB5XJOuyFWoWM7yf85r/Ag6d3jaVtQap4O3QtijoQTg22vIXCQDIpRz0SUlLcrFoY 8+kw== 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 x65-v6si19180452pff.196.2018.07.10.13.13.41; Tue, 10 Jul 2018 13:13:56 -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 S1732472AbeGJSSt (ORCPT + 99 others); Tue, 10 Jul 2018 14:18:49 -0400 Received: from verein.lst.de ([213.95.11.211]:49077 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732443AbeGJSSs (ORCPT ); Tue, 10 Jul 2018 14:18:48 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 8913D6FB7B; Tue, 10 Jul 2018 20:02:32 +0200 (CEST) Date: Tue, 10 Jul 2018 20:02:32 +0200 From: Christoph Hellwig To: Robin Murphy 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 Subject: Re: [RFC PATCH 0/4] Stop losing firmware-set DMA masks Message-ID: <20180710180232.GA26285@lst.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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? > > Robin. > > > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-May/580804.html > [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-December/474443.html > > Robin Murphy (4): > dma-mapping: Generalise dma_32bit_limit flag > ACPI/IORT: Set bus DMA mask as appropriate > of/device: Set bus DMA mask as appropriate > iommu/dma: Respect bus DMA limit for IOVAs > > arch/x86/kernel/pci-dma.c | 2 +- > drivers/acpi/arm64/iort.c | 1 + > drivers/iommu/dma-iommu.c | 3 +++ > drivers/of/device.c | 1 + > include/linux/device.h | 6 +++--- > kernel/dma/direct.c | 2 +- > 6 files changed, 10 insertions(+), 5 deletions(-) > > -- > 2.17.1.dirty ---end quoted text---