From patchwork Mon Dec 9 18:05:13 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: 181079 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4693832ile; Mon, 9 Dec 2019 10:12:13 -0800 (PST) X-Google-Smtp-Source: APXvYqx5JHjjXmH9nS41XU3fpP5EhmNFWS7gSzH04P7iIBjEGE9EtDGvznJ8XEilf4E3TRdOqLrU X-Received: by 2002:a05:6830:1e5c:: with SMTP id e28mr13771611otj.293.1575915133161; Mon, 09 Dec 2019 10:12:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575915133; cv=none; d=google.com; s=arc-20160816; b=MeUfOm6OFQaCZt3R4xBuQyf9PidYR3wAkkT5LY86ulsg/9JVETrT2jQYWId96JXF4q qQckbbdjZSxKIpfoDU7+hRk5hVZhDi7HIImsnV3ATQc7fzilkcvbvb1hLeftDoJqnQwY 7zo+3ZkQBOWt1CX6aLrv6uDIwumgnlm//lyDUeoKgPOpT5X9Df93WLCU2scq97FZIYX3 UOS9TRYpQTY4h0k4n8Or9dCVvbDC6a2dxmXqFz9a60kxVoxFMVC9f+I7z9ZGjbjXrEUn t3e7z9JkqxrJvoCyoDjf3j+TVKRrpBRpw5RDaVQ/QMIXcPFD7pN2Kja8tYksOKuF+8ur DQjw== 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=+bUNvcbVur0Ef2VA51V4gsgr3fHJGR70sEezlRR2RXc=; b=QMjTTy2V+387yAvj0ccJ4etIA0A6RIzu8GKFuo6pQicSu3yJYbCNr23Sjvy/I9X/ox QNJV9AgodmfiRAUoLXZeTlIDKBrRkSChely0TiSQclPEYtUdntgC92M8yTdzusl7Gx3d +e07UH3h2j6QEJ/LbevTiACnz+nJSDIVYo8fHLsbIn8BlJvkqxIFLoRpWRayK1WIMxzV YjEodl+ABn4/vNqsV91VUofh4OQud+lOwwt2Sca0ckre5zboGo9ew8RBJisErX3Sj69X RlEEDRr29jTCg0H6yQ5eK64dc/WY/2u/tUd6HMk+L04zwgRBqQhn3EN+icJyKqQ1allu yiAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QWVvbh0J; 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 j23si266311otr.48.2019.12.09.10.12.12; Mon, 09 Dec 2019 10:12:13 -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=QWVvbh0J; 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 S1726847AbfLISMM (ORCPT + 7 others); Mon, 9 Dec 2019 13:12:12 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46492 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726826AbfLISMK (ORCPT ); Mon, 9 Dec 2019 13:12:10 -0500 Received: by mail-wr1-f68.google.com with SMTP id z7so17177897wrl.13 for ; Mon, 09 Dec 2019 10:12:09 -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=+bUNvcbVur0Ef2VA51V4gsgr3fHJGR70sEezlRR2RXc=; b=QWVvbh0Jpp5+Hw8827sqJaAjar+vbOSxAvAj30oTykn3fZunkMM+V0TpMe8znZSIwt kVb7o3GmlRpgmGRwqFd9IL7O0Rr/xOSf3Ou712l2rKwvJ+ientMioZnVc1lDF91iu51I UHJUu2zRarBoJs8L2yoNmEOFKcoFuBaNk3ypQxZ80un+15jE6DMxi+ZjCVVZZ43p9sG2 IBBhzFgwwrNysh5v+q2LdP7dwwQvTzT0h9awcGtfIkraKUYda6YASGA0COj5K+NLIQlU vc+Klj7osrnuHxQ7nzumbvGR2a/QpWUNgVCUK01W87GXIit9vGNapGS5T4f3bqCJiksT E9lw== 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=+bUNvcbVur0Ef2VA51V4gsgr3fHJGR70sEezlRR2RXc=; b=nJidNII0eDGIDHhLH5MHqaUgN1FOrQngIqDKwqiGXCvZCBdiSA0iWXUPRGghYGV55c 6SEJly4hZ/GX9TJaaSqk/rIqE3ISL2IHz6OjGgyqWYmhAlkTq6gAKHExCTtocZc3XaCG rGv8/XsEVDN99c5Qx3PPcHIGLMiOxVUD8jR3YUv3xKMwMUdaMQrCqPyoA4LE7AgKcSfa A/f6HvZLpvD+CThC9a3UwqLdgkp/NtpQtIHx3ead5+tLrl0A1Wh21ySswduMOd9M/AIk 3A+yOYfa8bCNj8hjhMmuGUW33d2K7dXdvu6xEeERhW3n6VglQxb8n3Pk83TXNj7jUGuS fukA== X-Gm-Message-State: APjAAAVu/rSpVsjOITV75eOcbeVIQkJnJ/71nJAZpufVKGvRz6jsxllI FSsyxB0oylI0oCd/X+4BsyK7iw== X-Received: by 2002:a5d:4602:: with SMTP id t2mr3528279wrq.37.1575915129138; Mon, 09 Dec 2019 10:12:09 -0800 (PST) Received: from localhost.localdomain (adsl-62-167-101-88.adslplus.ch. [62.167.101.88]) by smtp.gmail.com with ESMTPSA id h2sm309838wrv.66.2019.12.09.10.12.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 10:12:08 -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 v3 12/13] PCI/ATS: Add PASID stubs Date: Mon, 9 Dec 2019 19:05:13 +0100 Message-Id: <20191209180514.272727-13-jean-philippe@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191209180514.272727-1-jean-philippe@linaro.org> References: <20191209180514.272727-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. Signed-off-by: Jean-Philippe Brucker --- include/linux/pci-ats.h | 3 +++ 1 file changed, 3 insertions(+) -- 2.24.0 Acked-by: Bjorn Helgaas Reviewed-by: Eric Auger 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)