From patchwork Wed Apr 17 18:24:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 10905781 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DAB9517E0 for ; Wed, 17 Apr 2019 18:28:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C02E928B74 for ; Wed, 17 Apr 2019 18:28:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B485528B79; Wed, 17 Apr 2019 18:28:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 19C5128B75 for ; Wed, 17 Apr 2019 18:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=4fXT73AdujV/HD37KcuaC5n24g3qdDUiyhrL0dDWRlk=; b=ugCtZEqXMuFMfT aXT+T3fnhaG3x00kD+oqADb7j9DLnTaottfFoIecNQDf7sp8v8gC2PMMVjuoLcVcE9HjOa68tC7O0 feN3/Yr1ZkcquF2CaA3nucGvn3TDxfKQN356Osa7Fg6Lt/1KVGPghdelVIvoC+RjfvfcsUL/ID1WA oAr8/NtsR0i9i41ovbgeByF1jAEDsHjq6cUUpwO3ojgb4eQYGrXTroF7tqkTMpJLtgJby3xC9SGoq v1jc5LMP6ldNCrG81rqMMUzJ8f3acb82cnJ/0qObnO8+de2tNJBklXJ5XMtvlpmbGUqYEQ4jTWF2P aOwRcumSlXOETT0N1tcg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGpI7-0003RU-CS; Wed, 17 Apr 2019 18:28:15 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGpI3-0003QN-Sj for linux-arm-kernel@lists.infradead.org; Wed, 17 Apr 2019 18:28:13 +0000 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 7675E15AB; Wed, 17 Apr 2019 11:28:09 -0700 (PDT) Received: from ostrya.cambridge.arm.com (ostrya.cambridge.arm.com [10.1.196.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C687B3F59C; Wed, 17 Apr 2019 11:28:06 -0700 (PDT) From: Jean-Philippe Brucker To: will.deacon@arm.com, lorenzo.pieralisi@arm.com, bhelgaas@google.com Subject: [PATCH v3 0/9] Add PCI ATS support to Arm SMMUv3 Date: Wed, 17 Apr 2019 19:24:39 +0100 Message-Id: <20190417182448.12382-1-jean-philippe.brucker@arm.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190417_112811_927260_1C020FCF X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: eric.auger@redhat.com, zhongmiao@hisilicon.com, okaya@kernel.org, joro@8bytes.org, rjw@rjwysocki.net, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, hanjun.guo@linaro.org, sudeep.holla@arm.com, robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org, lenb@kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This series enables PCI ATS in SMMUv3. Changes since v2 [1]: * Fix build failure when building arm-smmu-v3 without CONFIG_PCI Patches 1 and 2 are new. * Only enable ATS if the root complex supports it. For the moment, only IORT provides this information. I have patches for devicetree but they are less mature and I'd rather make it a separate series. * Tried to address most comments. I'll see if I can improve the firmware code when adding devicetree support (see [2]). Note that there is a small conflict with the SVA API. This series applies on top of Joerg's api-features branch for v5.2. [1] https://www.spinics.net/lists/arm-kernel/msg719722.html [2] git://linux-arm.org/linux-jpb.git ats/current Jean-Philippe Brucker (9): PCI: Move ATS declarations outside of CONFIG_PCI PCI: Add a stub for pci_ats_disabled() ACPI/IORT: Check ATS capability in root complex nodes iommu/arm-smmu-v3: Rename arm_smmu_master_data to arm_smmu_master iommu/arm-smmu-v3: Store SteamIDs in master iommu/arm-smmu-v3: Add a master->domain pointer iommu/arm-smmu-v3: Link domains and devices iommu/arm-smmu-v3: Add support for PCI ATS iommu/arm-smmu-v3: Disable tagged pointers drivers/acpi/arm64/iort.c | 11 ++ drivers/iommu/arm-smmu-v3.c | 345 ++++++++++++++++++++++++++++-------- include/linux/iommu.h | 4 + include/linux/pci.h | 31 ++-- 4 files changed, 306 insertions(+), 85 deletions(-)