Received: by 10.223.164.202 with SMTP id h10csp335793wrb; Wed, 29 Nov 2017 23:29:18 -0800 (PST) X-Google-Smtp-Source: AGs4zMbl7vZU7evYQl9SSl9twkVpQiWWwcJfq2xxfmXp3vvkffwzjtFunsNW/CHkffDjd2u42noM X-Received: by 10.84.128.197 with SMTP id a63mr1679272pla.210.1512026958814; Wed, 29 Nov 2017 23:29:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512026958; cv=none; d=google.com; s=arc-20160816; b=zl7Vi+jmWAQHPH0RQteljpRkFgZCmfJjl2e5c22hBrryWqV4tLIof9wNh3C8i8Uo4M Jeh4peBflD1u68rXOAItsL1OE61ZdyChg3VK4cN9rdubLcESRMQVSnfPbl0Q4pAXFMuX 1MwO7UN1wMEE8Ry2h4dX8HIpoLkI3K5FtwqrsBN9Stw8YFp0qjuvTeRQMWBLcF6Z9LJN hiOfxB4x7dFu6+X4wIhVnT0aQZ2y2KhRk/yrD/9g1aOsPaDyXGCeM0DCo6560cp80w0t U4zF+b49oINRJ16DfppX/GXnDc0HdXrMQMOQe19pRuNWKGd9Rq2qL/ZRXeEN9uQ7ZEh7 AcaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=7ycZrMy5GuXXPWBL/4bbNOqgAMnhFJirAEeNOo8wN4c=; b=tk08r+riJjIa0tEj6tvrRLPtTAm3h0getmUoBiDMbuxXB5oh2Ms5rfFUqsKNB71Psd QXHtvYchDjbu7mQQdzcguiSL1fJD6/Pvhj383MKasEfU83zj91in5TQbNQvzo/C//3Iu uzx++Bw7cMakj/t+rQutPvabgWwSLv4rFFsmCLvhqfmoVDy26GfbBl9YE/yODeLDJM6u CXvCuBf/Rz7YgKYFabesytdILBFTQsKu9tMBAXT67srMZNJ2CyJkbJ8T8HPFL0yp+/+H 3gp4FF63kMrdGGfIZl8dWyOa/ZQj8nrEthnVZzU9F6rxZqXPaodXDNZctntdSS3YHOx8 cZdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@apm.com header.s=apm header.b=d8qMYz2x; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=apm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r39si2615971pld.235.2017.11.29.23.29.05; Wed, 29 Nov 2017 23:29:18 -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; dkim=pass header.i=@apm.com header.s=apm header.b=d8qMYz2x; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=apm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750978AbdK3H2S (ORCPT + 99 others); Thu, 30 Nov 2017 02:28:18 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:43226 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810AbdK3H2Q (ORCPT ); Thu, 30 Nov 2017 02:28:16 -0500 Received: by mail-wr0-f194.google.com with SMTP id z34so5633144wrz.10 for ; Wed, 29 Nov 2017 23:28:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7ycZrMy5GuXXPWBL/4bbNOqgAMnhFJirAEeNOo8wN4c=; b=d8qMYz2xDURkGyfi/4Yrf6O06vhsEra0qHu76Zbmu0WdW5GXfsHtnMR9aA5dn5Dtmv EPUQAulPl3KuN7xZkS/SW9IEZqNXVsYYGrhBrn3gfjzzcaLNIdIsUqt8KSgnIjsgNIa4 wCLlKLEPwXDAzBS0ge8u8kncXvJf0jcO8kKPM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7ycZrMy5GuXXPWBL/4bbNOqgAMnhFJirAEeNOo8wN4c=; b=INMoh9ZOd6EJDW8YrgAET4Lalk/4xTE5HuYZ0E9tSUg1qxbhFfHu8ZSCY92QNCdT2p gNrpkxTM3+rbk52NEk2LCvP11KHnHu6SYEVrTd4uWUuAWZma9Y70cy+WF/tJA0sms47W JY+RKQWumebFsSwVLtowcr/mc/K1IGxlKcjK9qfhENB4hkkbq3e+0Amp3Yp/dkGCaEpn mE8ECEPz549wKTdfu+zM5G/J3OBfyrkRFchJsHhimt5pQ7c9U2QCDm8PdewUDo7ifX0w A5wdm4avQuIBzyQw7yOzDpaTBtao6SOkXBoxhqtJBWbQetzlGuIc+p0LWysV5SvFJoVb hekA== X-Gm-Message-State: AJaThX4EiD8liA5OoFcbkJimWzqpyrnkEqDYv7IEjjhBM6VgcxMs5Gn/ NjHawZ/Gbh4EVMtX3Y7NuzElXOY64BUr/YBJoCLguw== X-Received: by 10.223.191.13 with SMTP id p13mr1201856wrh.69.1512026894818; Wed, 29 Nov 2017 23:28:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.66.76 with HTTP; Wed, 29 Nov 2017 23:28:14 -0800 (PST) In-Reply-To: <20170803123239.11359-1-lorenzo.pieralisi@arm.com> References: <20170803123239.11359-1-lorenzo.pieralisi@arm.com> From: Feng Kan Date: Wed, 29 Nov 2017 23:28:14 -0800 Message-ID: Subject: Re: [PATCH v3 0/5] ACPI: DMA ranges management To: Lorenzo Pieralisi Cc: "linux-acpi@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Will Deacon , Hanjun Guo , Jon Masters , Robert Moore , Robin Murphy , Zhang Rui , "Rafael J. Wysocki" , Nate Watterson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 3, 2017 at 5:32 AM, Lorenzo Pieralisi wrote: > This patch series is v3 of a previous posting: > > v2->v3: > - Fixed DMA masks computation > - Fixed size computation overflow in acpi_dma_get_range() > > v1->v2: > - Reworked acpi_dma_get_range() flow and logs > - Added IORT named component address limits > - Renamed acpi_dev_get_resources() helper function > - Rebased against v4.13-rc3 > > v2: http://lkml.kernel.org/r/20170731152323.32488-1-lorenzo.pieralisi@arm.com > v1: http://lkml.kernel.org/r/20170720144517.32529-1-lorenzo.pieralisi@arm.com > > -- Original cover letter -- > > As reported in: > > http://lkml.kernel.org/r/CAL85gmA_SSCwM80TKdkZqEe+S1beWzDEvdki1kpkmUTDRmSP7g@mail.gmail.com > > the bus connecting devices to an IOMMU bus can be smaller in size than > the IOMMU input address bits which results in devices DMA HW bugs in > particular related to IOVA allocation (ie chopping of higher address > bits owing to system bus HW capabilities mismatch with the IOMMU). > > Fortunately this problem can be solved through an already present but never > used ACPI 6.2 firmware bindings (ie _DMA object) allowing to define the DMA > window for a specific bus in ACPI and therefore all upstream devices > connected to it. > > This small patch series enables _DMA parsing in ACPI core code and > use it in ACPI IORT code in order to detect DMA ranges for devices and > update their data structures to make them work with their related DMA > addressing restrictions. > > Cc: Will Deacon > Cc: Hanjun Guo > Cc: Feng Kan > Cc: Jon Masters > Cc: Robert Moore > Cc: Robin Murphy > Cc: Zhang Rui > Cc: "Rafael J. Wysocki" > > Lorenzo Pieralisi (5): > ACPICA: resource_mgr: Allow _DMA method in walk resources > ACPI: Make acpi_dev_get_resources() method agnostic > ACPI: Introduce DMA ranges parsing > ACPI: Make acpi_dma_configure() DMA regions aware > ACPI/IORT: Add IORT named component memory address limits > > drivers/acpi/acpica/rsxface.c | 7 ++-- > drivers/acpi/arm64/iort.c | 57 ++++++++++++++++++++++++++- > drivers/acpi/resource.c | 82 +++++++++++++++++++++++++++++--------- > drivers/acpi/scan.c | 91 +++++++++++++++++++++++++++++++++++++++---- > include/acpi/acnames.h | 1 + > include/acpi/acpi_bus.h | 2 + > include/linux/acpi.h | 8 ++++ > include/linux/acpi_iort.h | 5 ++- > 8 files changed, 219 insertions(+), 34 deletions(-) > > -- > 2.10.0 > Lorenzo: A network driver can use pci_set_dma_mask or its like to override what is done with this patch here. Which would result in iova allocation greater than the original _DMA aperture. Should we force the dma_set_mask to not change if an existing mask is already set? From 1575733072641928254@xxx Mon Aug 14 18:42:40 +0000 2017 X-GM-THRID: 1574713251984889929 X-Gmail-Labels: Inbox,Category Forums