From patchwork Thu Dec 19 16:30:32 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: 182143 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp702596iln; Thu, 19 Dec 2019 08:31:40 -0800 (PST) X-Google-Smtp-Source: APXvYqxgs96MCvf8jF54xj/5gSB36vZn6n9wRFUTzCZf4OLt8TK9JIeFH60cZQdV2mykhKxqkWMM X-Received: by 2002:a9d:590b:: with SMTP id t11mr9794255oth.161.1576773100513; Thu, 19 Dec 2019 08:31:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576773100; cv=none; d=google.com; s=arc-20160816; b=YWipPijyhthn0nTMxVUPSEOZyP88hwAnrgDA/3Ml7457hTbJJyYWzX6kF3GygTixAg cER3nfMWbydz5iSupPGz/154ES/mhrCVnz7yvYbA4szqKpF9HGq9maiEmtoc8/AB3Ob3 r4/Bj7Bhubk6pXgmurTLY5QgO9jnsnAYRsgcbd+oyB5pWmiGZ5XwX8Db9Oq/QVo6ftq3 ZKFQLVumjTDg5BbbWVIc08kTr0qcKoqI4DvGY18JrhmoIA9zQCcKh7mObZmwj7ReWacQ U2MGBAYeoEL4jNhhTIgOCcoa3e+1JiGIUs7g7dGbEVb6A8YnTU3fHDliLiMqe+KgnzUX aLTA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=k0PTgEa8Z2EtxKNp+bXlU3gMIeIQMMd4dvAJJmx7ucE=; b=LeatkeqQGWTg1fbP9+9qBVvQlQ7bjp7xveDoTMjOK+XL3BkY+9matMG9phFBR0fIeT tZZvjCoI4+L19E6iWeZTLXC/SJjWxhcazOA0iAR4n5ezseXWta7BhMBxfNAlzXlpb/D9 bZdOqvb+joFv+vXFitT7LUkz5pntjlaUUcAz6MRp0du13BJ7tcdQ9FIhVJvp3RgdHefs jwEuQqaMqoF0WLAZBa6XIav4rR7YbZn8rELK/GvVP7eneG7O7TtklWxQiUSNEF0i8YRB kCpu+quRchTBeDiApH38VKdcHE/F8fcgMCDYhOocZEhGJQsvCLqXkmSHohcXkENUpQZl 2VsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W+Iytwj4; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n25si2200080oij.175.2019.12.19.08.31.40; Thu, 19 Dec 2019 08:31:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-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=@linaro.org header.s=google header.b=W+Iytwj4; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726984AbfLSQbj (ORCPT + 7 others); Thu, 19 Dec 2019 11:31:39 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:38536 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727002AbfLSQbh (ORCPT ); Thu, 19 Dec 2019 11:31:37 -0500 Received: by mail-wr1-f65.google.com with SMTP id y17so6640327wrh.5 for ; Thu, 19 Dec 2019 08:31:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k0PTgEa8Z2EtxKNp+bXlU3gMIeIQMMd4dvAJJmx7ucE=; b=W+Iytwj4wvUZ2mbwDVM7FzjhurcQ7XEm74cJFZdKNOpWZtf7wK2eBP0X8FsMZeSJ6x iR0hoMFIuiITseQd974oYuP4t6sCXPRf3CBmd6yCV89pn+xP+xk+w7DoS2RBpcJj2xkt 9hAy9ONlO9aTHj8k3D5PUqhPlRW8+9sBhjji/UXYjHTc2kU0B/rcTeoqySC1prww1Kh5 lDK2rbNnj95q+9W/YHUT8aL/yY4xujuGQ3Gqt7+IIi+uCEaUwCmo0aNTuAmGuF4PphBE eH7TqxdLwqXapRzKuHr8uFQZKVtKa1+hpBYpYNgTi8ckKxL0EE66EGNi9XNuHJ5DvbFx fRpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k0PTgEa8Z2EtxKNp+bXlU3gMIeIQMMd4dvAJJmx7ucE=; b=tk4pL7G1w+TW0Phj+UcLT9bP66AnjrN4w3Gg3N7c+rWnPAlJKfbDFW+ku30nas3Jnv lEvWFbl2VzQ/HGHdXYPeq5V4l3g77Ko6IcjbnvOde/dGuThk3u7o9VK0pbEOkDjSm03q R1VPBTj9gZObdMBWCVnQzy9U2XUUn1K6ifnXdXGM3/4CUEEwA/6g/xefZgL2iKnC5eHW Oz/YkGUjtb7G4aPeXBEtabxDMkezj4zDkfeIGpiAejhR2Hp361xQrFjNrHYi2651RgcG AMcTDPQu2HDdNxKnXE+lvmNEkL7fFsQ4pmrq3hGrpaIj9ALg7RggQZL0tri99AAlWSe/ SiOQ== X-Gm-Message-State: APjAAAUrcQWARlOf3LvVxZl96ysW65vYRv2OUkOTHlAPsdAjuTv9wSeE z3X/fEWi+kRJKgAsJHY/3+GLXQ== X-Received: by 2002:adf:fcc4:: with SMTP id f4mr10390218wrs.247.1576773095285; Thu, 19 Dec 2019 08:31:35 -0800 (PST) Received: from localhost.localdomain (adsl-84-227-176-239.adslplus.ch. [84.227.176.239]) by smtp.gmail.com with ESMTPSA id u22sm7092068wru.30.2019.12.19.08.31.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 08:31:34 -0800 (PST) From: Jean-Philippe Brucker To: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux-foundation.org Cc: joro@8bytes.org, robh+dt@kernel.org, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, guohanjun@huawei.com, sudeep.holla@arm.com, rjw@rjwysocki.net, lenb@kernel.org, will@kernel.org, robin.murphy@arm.com, bhelgaas@google.com, eric.auger@redhat.com, jonathan.cameron@huawei.com, zhangfei.gao@linaro.org Subject: [PATCH v4 12/13] PCI/ATS: Add PASID stubs Date: Thu, 19 Dec 2019 17:30:32 +0100 Message-Id: <20191219163033.2608177-13-jean-philippe@linaro.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219163033.2608177-1-jean-philippe@linaro.org> References: <20191219163033.2608177-1-jean-philippe@linaro.org> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The SMMUv3 driver, which may be built without CONFIG_PCI, will soon gain PASID support. Partially revert commit c6e9aefbf9db ("PCI/ATS: Remove unused PRI and PASID stubs") to re-introduce the PASID stubs, and avoid adding more #ifdefs to the SMMU driver. Acked-by: Bjorn Helgaas Reviewed-by: Eric Auger Reviewed-by: Jonathan Cameron Signed-off-by: Jean-Philippe Brucker --- include/linux/pci-ats.h | 3 +++ 1 file changed, 3 insertions(+) -- 2.24.1 diff --git a/include/linux/pci-ats.h b/include/linux/pci-ats.h index 5d62e78946a3..d08f0869f121 100644 --- a/include/linux/pci-ats.h +++ b/include/linux/pci-ats.h @@ -33,6 +33,9 @@ void pci_disable_pasid(struct pci_dev *pdev); int pci_pasid_features(struct pci_dev *pdev); int pci_max_pasids(struct pci_dev *pdev); #else /* CONFIG_PCI_PASID */ +static inline int pci_enable_pasid(struct pci_dev *pdev, int features) +{ return -EINVAL; } +static inline void pci_disable_pasid(struct pci_dev *pdev) { } static inline int pci_pasid_features(struct pci_dev *pdev) { return -EINVAL; } static inline int pci_max_pasids(struct pci_dev *pdev)