From patchwork Thu Nov 12 12:55:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 324186 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp313530ils; Thu, 12 Nov 2020 05:03:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJmhqa8ZJSB05x/Jr4o0O/tHmxS5UKfnkQRGLmW1v/k2tYk10TD6ER8eR/QUhzi8y5il0d X-Received: by 2002:a17:906:329a:: with SMTP id 26mr2321902ejw.227.1605186220358; Thu, 12 Nov 2020 05:03:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605186220; cv=none; d=google.com; s=arc-20160816; b=Rz7tRhTkZonzFo22QIBgcNGA3nrD3ndp5nkBVJU0KKJBtnffktzu3kZH6F0YX9QDFL 78XbNSGxOq9V40wcjf+tBSsj+YGkyvSU5lVHanTpfVFGOrcmf1O6qr8b2S2+c6VU4MPg o8d89fGjBanWlAoH1KJa30Jh2EYLIkP5N0/DZ7xqG9ludi8vyh724c7PpVemfms4jdVP 0bXpZPV4szgGIV1xHYbrxmpx0yWDKWayb82Ivp/LU9MfbvKOwmxhP6L6Kv1hyNBvhrU8 t//3TGl+N80q5hpQJH0BWIagQ16ZpAUJD9J4j8GLENhbOb19WjOiSh+8NanTNu5ku8AC Stbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YNIotbOC7bka5Z9BLnFVmsCtOLB6kJ/rhFA9CsCNoBU=; b=ZABYc/fxgi5d/2WQN5JJe3PorBsDFp44djQBhSscLj5hV5J5Tb13lCiV92GXDBW2vH rqbEeT9LWi9lsgBpeSeAOwvGsYD6DbTMRcfwbwcezS1+2lgQ/h2RYrwU2mgCtSRXAi/P RaDx3S2HThGjDQ8khrWpGH0ZLBe+apgogV5nNeq2lK3lFzW27LqMiq4WYJr3d3jyo2D2 N07B71cLQsMsT4A2qNjrvfnIbDcSFqIVlE7/ondQ/4KDNWcAKxcKlbiBf6m2XEfS0ECi e4KeXOew8XLeyyJjCctiw31bY3RkNph+LgLnr7NSgqvCNrK4vuEiC1khVe9R/WKtovqX OE2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QZfgK97B; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id u20si3713663edr.287.2020.11.12.05.03.39; Thu, 12 Nov 2020 05:03:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QZfgK97B; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 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 S1727796AbgKLNDd (ORCPT + 7 others); Thu, 12 Nov 2020 08:03:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728228AbgKLND0 (ORCPT ); Thu, 12 Nov 2020 08:03:26 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2C7FC061A49 for ; Thu, 12 Nov 2020 05:03:25 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id a65so5457383wme.1 for ; Thu, 12 Nov 2020 05:03:25 -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=YNIotbOC7bka5Z9BLnFVmsCtOLB6kJ/rhFA9CsCNoBU=; b=QZfgK97B8RvBj1vgMXgdtAlJTXGErNY2MHWaYeZJYcihAKpzxznX+f3QupErxyW+y7 vl5dFcj/SwiTM7AoiBl8Ekh/VI2I+MV6RRDXOcrbDCGTkeMw66SFzS1DgJvxjcaDuKjk 2bmfttuRd5KL3r+eSvLlVqZxie8jGCaK6VIEInNDm+bzEK1xUWxTL3t2xMOYv4Bass5p gBiBnUXUjVBFvCB1BrWOR56d6TtjFa2TYTFOwxI7fDliFlDQVEIWqgTYl5sIlbDUR1ej iCxbPa+0gIBZXHXjDH2ssbGlbO7TSEgUjnx9UYgYtW9ALf/I+qK3xCqik9HnPlfBcF/J Vzrw== 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=YNIotbOC7bka5Z9BLnFVmsCtOLB6kJ/rhFA9CsCNoBU=; b=LCWt2+wIzmTizZbMKjPeYDx7TZ5/GYKPgJCuRlIO1r+2S+5zsA22dH66sl1a253hY2 CaLGWl3/y8jbQXx6Gol7TGKdwIMfAOyixWARWWPhkr7/eaKKb/ldovnTHyLD2LJADFyu CteKoY4P3oLXip+jVx+SE7qSHefSMtjYvTXRQePAo02IUymHTNJ1kyaMTRN7pzouowPk OH7tTLvMspl3dz4HiBdsPUrlyPChaReVi6Iekt3Cjhw8VmYDv8qI4SJEDt1c1qaMsylG xUJWmOjJz9yXTa41exEdMy9NReiPb/gKrVeBoiNWPygA2W0FQG16rBfipAEOMZLosrZ1 pPLA== X-Gm-Message-State: AOAM531ezwZjl1guBmqKeDvIjKIo5dJWR8tij0okZACMtMpc4qA6gPmp E0M0UBf/0RxWmdLlUMfe86SPby+zRHsCnA== X-Received: by 2002:a1c:2586:: with SMTP id l128mr9104219wml.149.1605186204490; Thu, 12 Nov 2020 05:03:24 -0800 (PST) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id m22sm6877508wrb.97.2020.11.12.05.03.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 05:03:23 -0800 (PST) From: Jean-Philippe Brucker To: joro@8bytes.org, will@kernel.org, lorenzo.pieralisi@arm.com, robh+dt@kernel.org Cc: guohanjun@huawei.com, sudeep.holla@arm.com, rjw@rjwysocki.net, lenb@kernel.org, robin.murphy@arm.com, bhelgaas@google.com, Jonathan.Cameron@huawei.com, eric.auger@redhat.com, iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, baolu.lu@linux.intel.com, zhangfei.gao@linaro.org, shameerali.kolothum.thodi@huawei.com, vivek.gautam@arm.com, Jean-Philippe Brucker , Kuppuswamy Sathyanarayanan Subject: [PATCH v8 7/9] PCI/ATS: Add PRI stubs Date: Thu, 12 Nov 2020 13:55:19 +0100 Message-Id: <20201112125519.3987595-8-jean-philippe@linaro.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201112125519.3987595-1-jean-philippe@linaro.org> References: <20201112125519.3987595-1-jean-philippe@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The SMMUv3 driver, which can be built without CONFIG_PCI, will soon gain support for PRI. Partially revert commit c6e9aefbf9db ("PCI/ATS: Remove unused PRI and PASID stubs") to re-introduce the PRI stubs, and avoid adding more #ifdefs to the SMMU driver. Acked-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Signed-off-by: Jean-Philippe Brucker --- include/linux/pci-ats.h | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.29.1 diff --git a/include/linux/pci-ats.h b/include/linux/pci-ats.h index df54cd5b15db..ccfca09fd232 100644 --- a/include/linux/pci-ats.h +++ b/include/linux/pci-ats.h @@ -30,6 +30,13 @@ int pci_reset_pri(struct pci_dev *pdev); int pci_prg_resp_pasid_required(struct pci_dev *pdev); bool pci_pri_supported(struct pci_dev *pdev); #else +static inline int pci_enable_pri(struct pci_dev *pdev, u32 reqs) +{ return -ENODEV; } +static inline void pci_disable_pri(struct pci_dev *pdev) { } +static inline int pci_reset_pri(struct pci_dev *pdev) +{ return -ENODEV; } +static inline int pci_prg_resp_pasid_required(struct pci_dev *pdev) +{ return 0; } static inline bool pci_pri_supported(struct pci_dev *pdev) { return false; } #endif /* CONFIG_PCI_PRI */