提交 49dc5834 编写于 作者: J Jean-Philippe Brucker 提交者: Zheng Zengkai

PCI/ATS: Add PRI stubs

maillist inclusion
category: feature
bugzilla: 51855
CVE: NA

Reference: https://jpbrucker.net/git/linux/commit/?h=sva/2021-03-01&id=f61a8d9eceb10611c5f0bb151ad3dbc754bc6467

---------------------------------------------

The SMMUv3 driver, which can be built without CONFIG_PCI, will soon gain
support for PRI.  Partially revert commit c6e9aefb ("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: NBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: NJean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: NLijun Fang <fanglijun3@huawei.com>
Reviewed-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 d30a2a28
...@@ -30,6 +30,13 @@ int pci_reset_pri(struct pci_dev *pdev); ...@@ -30,6 +30,13 @@ int pci_reset_pri(struct pci_dev *pdev);
int pci_prg_resp_pasid_required(struct pci_dev *pdev); int pci_prg_resp_pasid_required(struct pci_dev *pdev);
bool pci_pri_supported(struct pci_dev *pdev); bool pci_pri_supported(struct pci_dev *pdev);
#else #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) static inline bool pci_pri_supported(struct pci_dev *pdev)
{ return false; } { return false; }
#endif /* CONFIG_PCI_PRI */ #endif /* CONFIG_PCI_PRI */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册