[PATCH v8 2/3] uacce: add uacce driver

2019-11-08 Thread Zhangfei Gao
ed-off-by: Kenneth Lee Signed-off-by: Zaibo Xu Signed-off-by: Zhou Wang Signed-off-by: Jean-Philippe Brucker Signed-off-by: Zhangfei Gao --- Documentation/ABI/testing/sysfs-driver-uacce | 53 +++ drivers/misc/Kconfig | 1 + drivers/misc/Makefile

[PATCH v8 0/3] Add uacce module for Accelerator

2019-11-08 Thread Zhangfei Gao
=== .. [1] https://lwn.net/Articles/774411/ Kenneth Lee (2): uacce: Add documents for uacce uacce: add uacce driver Zhangfei Gao (1): crypto: hisilicon - register zip engine to uacce Documentation/ABI/testing/sysfs-driver-uacce | 53 +++ Documentation/misc-devices/uacce.rst | 159

[PATCH v8 1/3] uacce: Add documents for uacce

2019-11-08 Thread Zhangfei Gao
Signed-off-by: Zhou Wang Signed-off-by: Zhangfei Gao --- Documentation/misc-devices/uacce.rst | 159 +++ 1 file changed, 159 insertions(+) create mode 100644 Documentation/misc-devices/uacce.rst diff --git a/Documentation/misc-devices/uacce.rst b/Documentation

[PATCH v8 3/3] crypto: hisilicon - register zip engine to uacce

2019-11-08 Thread Zhangfei Gao
Register qm to uacce framework for user crypto driver Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 256 ++-- drivers/crypto/hisilicon/qm.h | 11 ++ drivers/crypto/hisilicon/zip/zip_main.c | 38

[RESEND PATCH v8 0/3] Add uacce module for Accelerator

2019-11-08 Thread Zhangfei Gao
=== .. [1] https://lwn.net/Articles/774411/ Kenneth Lee (2): uacce: Add documents for uacce uacce: add uacce driver Zhangfei Gao (1): crypto: hisilicon - register zip engine to uacce Documentation/ABI/testing/sysfs-driver-uacce | 53 +++ Documentation/misc-devices/uacce.rst | 159

[RESEND PATCH v8 3/3] crypto: hisilicon - register zip engine to uacce

2019-11-08 Thread Zhangfei Gao
Register qm to uacce framework for user crypto driver Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 256 ++-- drivers/crypto/hisilicon/qm.h | 11 ++ drivers/crypto/hisilicon/zip/zip_main.c | 38

[RESEND PATCH v8 1/3] uacce: Add documents for uacce

2019-11-08 Thread Zhangfei Gao
Signed-off-by: Zhou Wang Signed-off-by: Zhangfei Gao --- Documentation/misc-devices/uacce.rst | 159 +++ 1 file changed, 159 insertions(+) create mode 100644 Documentation/misc-devices/uacce.rst diff --git a/Documentation/misc-devices/uacce.rst b/Documentation

[RESEND PATCH v8 2/3] uacce: add uacce driver

2019-11-08 Thread Zhangfei Gao
ed-off-by: Kenneth Lee Signed-off-by: Zaibo Xu Signed-off-by: Zhou Wang Signed-off-by: Jean-Philippe Brucker Signed-off-by: Zhangfei Gao --- Documentation/ABI/testing/sysfs-driver-uacce | 53 +++ drivers/misc/Kconfig | 1 + drivers/misc/Makefile

[PATCH v9 3/4] crypto: hisilicon - Remove module_param uacce_mode

2019-11-22 Thread Zhangfei Gao
Remove the module_param uacce_mode, which is not used currently. Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 31 ++- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/drivers/crypto/hisilicon/zip

[PATCH v9 4/4] crypto: hisilicon - register zip engine to uacce

2019-11-22 Thread Zhangfei Gao
Register qm to uacce framework for user crypto driver Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 234 +++- drivers/crypto/hisilicon/qm.h | 11 ++ drivers/crypto/hisilicon/zip/zip_main.c | 16

[PATCH v9 1/4] uacce: Add documents for uacce

2019-11-22 Thread Zhangfei Gao
Signed-off-by: Zhou Wang Signed-off-by: Zhangfei Gao --- Documentation/misc-devices/uacce.rst | 176 +++ 1 file changed, 176 insertions(+) create mode 100644 Documentation/misc-devices/uacce.rst diff --git a/Documentation/misc-devices/uacce.rst b/Documentation

[PATCH v9 0/4] Add uacce module for Accelerator

2019-11-22 Thread Zhangfei Gao
the process have the same address space. References == .. [1] https://lwn.net/Articles/774411/ Subject: [PATCH 0/3] *** SUBJECT HERE *** Kenneth Lee (2): uacce: Add documents for uacce uacce: add uacce driver Zhangfei Gao (2): crypto: hisilicon - Remove module_param uacce_mode

[PATCH v9 2/4] uacce: add uacce driver

2019-11-22 Thread Zhangfei Gao
ed-off-by: Kenneth Lee Signed-off-by: Zaibo Xu Signed-off-by: Zhou Wang Signed-off-by: Jean-Philippe Brucker Signed-off-by: Zhangfei Gao --- Documentation/ABI/testing/sysfs-driver-uacce | 37 ++ drivers/misc/Kconfig | 1 + drivers/misc/Makefile

[PATCH v10 2/4] uacce: add uacce driver

2019-12-15 Thread Zhangfei Gao
ed-off-by: Kenneth Lee Signed-off-by: Zaibo Xu Signed-off-by: Zhou Wang Signed-off-by: Jean-Philippe Brucker Signed-off-by: Zhangfei Gao --- Documentation/ABI/testing/sysfs-driver-uacce | 37 ++ drivers/misc/Kconfig | 1 + drivers/misc/Makefile

[PATCH v10 4/4] crypto: hisilicon - register zip engine to uacce

2019-12-15 Thread Zhangfei Gao
Register qm to uacce framework for user crypto driver Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 236 +++- drivers/crypto/hisilicon/qm.h | 11 ++ drivers/crypto/hisilicon/zip/zip_main.c | 16

[PATCH v10 0/4] Add uacce module for Accelerator

2019-12-15 Thread Zhangfei Gao
ort some of the resources to the user space. Uacce than can make sure the device and the process have the same address space. References == .. [1] https://lwn.net/Articles/774411/ Kenneth Lee (2): uacce: Add documents for uacce uacce: add uacce driver Zhangfei Gao (2): crypto: hisilicon - Remo

[PATCH v10 1/4] uacce: Add documents for uacce

2019-12-15 Thread Zhangfei Gao
Signed-off-by: Zhou Wang Signed-off-by: Zhangfei Gao --- Documentation/misc-devices/uacce.rst | 176 +++ 1 file changed, 176 insertions(+) create mode 100644 Documentation/misc-devices/uacce.rst diff --git a/Documentation/misc-devices/uacce.rst b/Documentation

[PATCH v10 3/4] crypto: hisilicon - Remove module_param uacce_mode

2019-12-15 Thread Zhangfei Gao
Remove the module_param uacce_mode, which is not used currently. Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 31 ++- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/drivers/crypto/hisilicon/zip

[RESEND PATCH v9 0/4] Add uacce module for Accelerator

2019-12-09 Thread Zhangfei Gao
and the process have the same address space. References == .. [1] https://lwn.net/Articles/774411/ Kenneth Lee (2): uacce: Add documents for uacce uacce: add uacce driver Zhangfei Gao (2): crypto: hisilicon - Remove module_param uacce_mode crypto: hisilicon - register zip

[RESEND PATCH v9 1/4] uacce: Add documents for uacce

2019-12-09 Thread Zhangfei Gao
Signed-off-by: Zhou Wang Signed-off-by: Zhangfei Gao --- Documentation/misc-devices/uacce.rst | 176 +++ 1 file changed, 176 insertions(+) create mode 100644 Documentation/misc-devices/uacce.rst diff --git a/Documentation/misc-devices/uacce.rst b/Documentation

[RESEND PATCH v9 3/4] crypto: hisilicon - Remove module_param uacce_mode

2019-12-09 Thread Zhangfei Gao
Remove the module_param uacce_mode, which is not used currently. Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 31 ++- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/drivers/crypto/hisilicon/zip

[RESEND PATCH v9 2/4] uacce: add uacce driver

2019-12-09 Thread Zhangfei Gao
ed-off-by: Kenneth Lee Signed-off-by: Zaibo Xu Signed-off-by: Zhou Wang Signed-off-by: Jean-Philippe Brucker Signed-off-by: Zhangfei Gao --- Documentation/ABI/testing/sysfs-driver-uacce | 37 ++ drivers/misc/Kconfig | 1 + drivers/misc/Makefile

[PATCH v7 0/3] Add uacce module for Accelerator

2019-10-29 Thread Zhangfei Gao
or the accelerator device, so the device driver can export some of the resources to the user space. Uacce than can make sure the device and the process have the same address space. References == .. [1] https://lwn.net/Articles/774411/ Kenneth Lee (2): uacce: Add documents for uacce uacce: add

[PATCH v7 2/3] uacce: add uacce driver

2019-10-29 Thread Zhangfei Gao
the hardware resource by interact with the queue file. By mmap the queue file space to user space, the process can directly put requests to the hardware without syscall to the kernel space. Signed-off-by: Kenneth Lee Signed-off-by: Zaibo Xu Signed-off-by: Zhou Wang Signed-off-by: Zhangfei Gao

[PATCH v7 1/3] uacce: Add documents for uacce

2019-10-29 Thread Zhangfei Gao
Signed-off-by: Zhou Wang Signed-off-by: Zhangfei Gao --- Documentation/misc-devices/uacce.rst | 160 +++ 1 file changed, 160 insertions(+) create mode 100644 Documentation/misc-devices/uacce.rst diff --git a/Documentation/misc-devices/uacce.rst b/Documentation

[PATCH v7 3/3] crypto: hisilicon - register zip engine to uacce

2019-10-29 Thread Zhangfei Gao
Register qm to uacce framework for user crypto driver Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 253 ++-- drivers/crypto/hisilicon/qm.h | 13 +- drivers/crypto/hisilicon/zip/zip_main.c | 39

[PATCH v2] MAINTAINERS: add maintainers for uacce

2020-02-25 Thread Zhangfei Gao
Add Zhangfei Gao and Zhou Wang as maintainers for uacce Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- Add list, suggested by Dave MAINTAINERS | 12 1 file changed, 12 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 38fe2f3..b5bdef8 100644 --- a/MAINTAINERS

[PATCH v2] uacce: unmap remaining mmapping from user space

2020-02-25 Thread Zhangfei Gao
. Suggested-by: Dave Jiang Signed-off-by: Zhangfei Gao --- v2: Unmap before put_queue, where memory is freed, commented from Zaibo. drivers/misc/uacce/uacce.c | 16 include/linux/uacce.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/drivers/misc/uacce/uacce.c b

[PATCH] MAINTAINERS: add maintainers for uacce

2020-02-24 Thread Zhangfei Gao
Add Zhangfei Gao and Zhou Wang as maintainers for uacce Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 38fe2f3..22e647f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17039,6

[PATCH] uacce: unmap remaining mmapping from user space

2020-02-23 Thread Zhangfei Gao
. Suggested-by: Dave Jiang Signed-off-by: Zhangfei Gao --- drivers/misc/uacce/uacce.c | 17 + include/linux/uacce.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index ffced4d..1bcc5e6 100644 --- a/drivers/misc

[PATCH v13 4/4] crypto: hisilicon - register zip engine to uacce

2020-02-10 Thread Zhangfei Gao
Register qm to uacce framework for user crypto driver Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jonathan Cameron Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 239 +++- drivers/crypto/hisilicon/qm.h | 11

[PATCH v13 2/4] uacce: add uacce driver

2020-02-10 Thread Zhangfei Gao
: Greg Kroah-Hartman Reviewed-by: Jonathan Cameron Signed-off-by: Kenneth Lee Signed-off-by: Zaibo Xu Signed-off-by: Zhou Wang Signed-off-by: Jean-Philippe Brucker Signed-off-by: Zhangfei Gao --- Documentation/ABI/testing/sysfs-driver-uacce | 39 ++ drivers/misc/Kconfig

[PATCH v13 1/4] uacce: Add documents for uacce

2020-02-10 Thread Zhangfei Gao
Cameron Signed-off-by: Kenneth Lee Signed-off-by: Zaibo Xu Signed-off-by: Zhou Wang Signed-off-by: Zhangfei Gao --- Documentation/misc-devices/uacce.rst | 176 +++ 1 file changed, 176 insertions(+) create mode 100644 Documentation/misc-devices/uacce.rst diff --git

[PATCH v13 0/4] Add uacce module for Accelerator

2020-02-10 Thread Zhangfei Gao
process have the same address space. References ====== .. [1] https://lwn.net/Articles/774411/ Kenneth Lee (2): uacce: Add documents for uacce uacce: add uacce driver Zhangfei Gao (2): crypto: hisilicon - Remove module_param uacce_mode crypto: hisilicon - register zip engine to uacc

[PATCH v13 3/4] crypto: hisilicon - Remove module_param uacce_mode

2020-02-10 Thread Zhangfei Gao
Remove the module_param uacce_mode, which is not used currently. Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jonathan Cameron Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 31 + 1 file changed, 6 insertions(+), 25

[PATCH v11 2/4] uacce: add uacce driver

2020-01-10 Thread Zhangfei Gao
viewed-by: Jonathan Cameron Signed-off-by: Kenneth Lee Signed-off-by: Zaibo Xu Signed-off-by: Zhou Wang Signed-off-by: Jean-Philippe Brucker Signed-off-by: Zhangfei Gao --- Documentation/ABI/testing/sysfs-driver-uacce | 39 ++ drivers/misc/Kconfig | 1 + drivers/misc/Ma

[PATCH v11 1/4] uacce: Add documents for uacce

2020-01-10 Thread Zhangfei Gao
Lee Signed-off-by: Zaibo Xu Signed-off-by: Zhou Wang Signed-off-by: Zhangfei Gao --- Documentation/misc-devices/uacce.rst | 176 +++ 1 file changed, 176 insertions(+) create mode 100644 Documentation/misc-devices/uacce.rst diff --git a/Documentation/misc-devices

[PATCH v11 0/4] Add uacce module for Accelerator

2020-01-10 Thread Zhangfei Gao
ave the same address space. References ====== .. [1] https://lwn.net/Articles/774411/ Kenneth Lee (2): uacce: Add documents for uacce uacce: add uacce driver Zhangfei Gao (2): crypto: hisilicon - Remove module_param uacce_mode crypto: hisilicon - register zip engine to uacce Document

[PATCH v11 3/4] crypto: hisilicon - Remove module_param uacce_mode

2020-01-10 Thread Zhangfei Gao
Remove the module_param uacce_mode, which is not used currently. Reviewed-by: Jonathan Cameron Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 31 ++- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git

[PATCH v12 0/4] Add uacce module for Accelerator

2020-01-15 Thread Zhangfei Gao
on. Uacce manages the IOMMU interface for the accelerator device, so the device driver can export some of the resources to the user space. Uacce than can make sure the device and the process have the same address space. References ====== .. [1] https://lwn.net/Articles/774411/ Kenneth Lee (2)

[PATCH v12 1/4] uacce: Add documents for uacce

2020-01-15 Thread Zhangfei Gao
Lee Signed-off-by: Zaibo Xu Signed-off-by: Zhou Wang Signed-off-by: Zhangfei Gao --- Documentation/misc-devices/uacce.rst | 176 +++ 1 file changed, 176 insertions(+) create mode 100644 Documentation/misc-devices/uacce.rst diff --git a/Documentation/misc-devices

[PATCH v12 2/4] uacce: add uacce driver

2020-01-15 Thread Zhangfei Gao
viewed-by: Jonathan Cameron Signed-off-by: Kenneth Lee Signed-off-by: Zaibo Xu Signed-off-by: Zhou Wang Signed-off-by: Jean-Philippe Brucker Signed-off-by: Zhangfei Gao --- Documentation/ABI/testing/sysfs-driver-uacce | 39 ++ drivers/misc/Kconfig | 1 + drivers/misc/Ma

[PATCH v12 3/4] crypto: hisilicon - Remove module_param uacce_mode

2020-01-15 Thread Zhangfei Gao
Remove the module_param uacce_mode, which is not used currently. Reviewed-by: Jonathan Cameron Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 31 ++- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git

[PATCH v12 4/4] crypto: hisilicon - register zip engine to uacce

2020-01-15 Thread Zhangfei Gao
Register qm to uacce framework for user crypto driver Reviewed-by: Jonathan Cameron Signed-off-by: Zhangfei Gao Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 239 +++- drivers/crypto/hisilicon/qm.h | 11 ++ drivers/crypto

Re: [PATCH 1/2] uacce: Remove mm_exit() op

2020-04-09 Thread Zhangfei Gao
the queue management. The uacce_mm struct, that tracks all queues bound to an mm, was only used by the mm_exit() callback. Remove it. Signed-off-by: Jean-Philippe Brucker Thanks Jean for doing this. Tested-by: Zhangfei Gao Except one line. -static void uacce_mm_put(struct uacce_queue *q

Re: [PATCH v11 00/13] SMMUv3 Nested Stage Setup (IOMMU part)

2020-04-15 Thread Zhangfei Gao
On 2020/4/14 下午11:05, Eric Auger wrote: This version fixes an issue observed by Shameer on an SMMU 3.2, when moving from dual stage config to stage 1 only config. The 2 high 64b of the STE now get reset. Otherwise, leaving the S2TTB set may cause a C_BAD_STE error. This series can be found

Re: [PATCH v2 1/2] uacce: Remove mm_exit() op

2020-04-23 Thread Zhangfei Gao
the queue management. The uacce_mm struct, that tracks all queues bound to an mm, was only used by the mm_exit() callback. Remove it. Signed-off-by: Jean-Philippe Brucker Thanks Jean Acked-by: Zhangfei Gao --- v1->v2: clear q->handle after unbind

[PATCH 1/2] iommu/of: Let pci_fixup_final access iommu_fwnode

2020-05-11 Thread Zhangfei Gao
Calling pci_fixup_final after of_pci_iommu_init, which alloc iommu_fwnode. Some platform devices appear as PCI but are actually on the AMBA bus, and they need fixup in drivers/pci/quirks.c handling iommu_fwnode. So calling pci_fixup_final after iommu_fwnode is allocated. Signed-off-by: Zhangfei

[PATCH 2/2] ACPI/IORT: Let pci_fixup_final access iommu_fwnode

2020-05-11 Thread Zhangfei Gao
Calling pci_fixup_final after iommu_fwspec_init, which alloc iommu_fwnode. Some platform devices appear as PCI but are actually on the AMBA bus, and they need fixup in drivers/pci/quirks.c handling iommu_fwnode. So calling pci_fixup_final after iommu_fwnode is allocated. Signed-off-by: Zhangfei

[PATCH 0/2] Let pci_fixup_final access iommu_fwnode

2020-05-11 Thread Zhangfei Gao
_pcie_sva); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_HUAWEI, 0xa251, quirk_huawei_pcie_sva); Zhangfei Gao (2): iommu/of: Let pci_fixup_final access iommu_fwnode ACPI/IORT: Let pci_fixup_final access iommu_fwnode drivers/acpi/arm64/iort.c | 1 + drivers/iommu/of_iommu.c | 1 + 2 files c

Re: [PATCH 0/2] Let pci_fixup_final access iommu_fwnode

2020-05-21 Thread Zhangfei Gao
Hi, Joerg On 2020/5/12 下午12:08, Zhangfei Gao wrote: Some platform devices appear as PCI but are actually on the AMBA bus, and they need fixup in drivers/pci/quirks.c handling iommu_fwnode. So calling pci_fixup_final after iommu_fwnode is allocated. For example: Hisilicon platform device need

Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-05-27 Thread Zhangfei Gao
On 2020/5/27 下午5:53, Arnd Bergmann wrote: On Wed, May 27, 2020 at 11:00 AM Greg Kroah-Hartman wrote: On Tue, May 26, 2020 at 07:49:07PM +0800, Zhangfei Gao wrote: Some platform devices appear as PCI but are actually on the AMBA bus, Why would these devices not just show up on the AMBA bus

Re: [PATCH 0/2] Let pci_fixup_final access iommu_fwnode

2020-05-26 Thread Zhangfei Gao
On 2020/5/25 下午9:43, Joerg Roedel wrote: On Tue, May 12, 2020 at 12:08:29PM +0800, Zhangfei Gao wrote: Some platform devices appear as PCI but are actually on the AMBA bus, and they need fixup in drivers/pci/quirks.c handling iommu_fwnode. So calling pci_fixup_final after iommu_fwnode

Re: [PATCH 1/2] PCI: Introduce PCI_FIXUP_IOMMU

2020-05-26 Thread Zhangfei Gao
Hi, Christoph On 2020/5/26 下午10:46, Christoph Hellwig wrote: On Tue, May 26, 2020 at 07:49:08PM +0800, Zhangfei Gao wrote: Some platform devices appear as PCI but are actually on the AMBA bus, and they need fixup in drivers/pci/quirks.c handling iommu_fwnode. Here introducing PCI_FIXUP_IOMMU

Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-05-28 Thread Zhangfei Gao
Hi, Bjorn On 2020/5/28 上午2:18, Bjorn Helgaas wrote: On Tue, May 26, 2020 at 07:49:07PM +0800, Zhangfei Gao wrote: Some platform devices appear as PCI but are actually on the AMBA bus, and they need fixup in drivers/pci/quirks.c handling iommu_fwnode. Here introducing PCI_FIXUP_IOMMU, which

Re: [PATCH 2/2] iommu: calling pci_fixup_iommu in iommu_fwspec_init

2020-05-28 Thread Zhangfei Gao
On 2020/5/27 下午5:01, Greg Kroah-Hartman wrote: On Tue, May 26, 2020 at 07:49:09PM +0800, Zhangfei Gao wrote: Calling pci_fixup_iommu in iommu_fwspec_init, which alloc iommu_fwnode. Some platform devices appear as PCI but are actually on the AMBA bus, and they need fixup in drivers/pci

[PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-05-26 Thread Zhangfei Gao
e_sva); [1] https://www.spinics.net/lists/iommu/msg44591.html [2] https://www.spinics.net/lists/linux-pci/msg94559.html Zhangfei Gao (2): PCI: Introduce PCI_FIXUP_IOMMU iommu: calling pci_fixup_iommu in iommu_fwspec_init drivers/iommu/iommu.c | 4 drivers/pci/quirks.c

[PATCH 1/2] PCI: Introduce PCI_FIXUP_IOMMU

2020-05-26 Thread Zhangfei Gao
as all devices in fixup final list will be reprocessed. Suggested-by: Joerg Roedel Signed-off-by: Zhangfei Gao --- drivers/pci/quirks.c | 7 +++ include/asm-generic/vmlinux.lds.h | 3 +++ include/linux/pci.h | 8 3 files changed, 18 insertions(+) diff --git

[PATCH 2/2] iommu: calling pci_fixup_iommu in iommu_fwspec_init

2020-05-26 Thread Zhangfei Gao
Calling pci_fixup_iommu in iommu_fwspec_init, which alloc iommu_fwnode. Some platform devices appear as PCI but are actually on the AMBA bus, and they need fixup in drivers/pci/quirks.c handling iommu_fwnode. So calling pci_fixup_iommu after iommu_fwnode is allocated. Signed-off-by: Zhangfei Gao

Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-06-23 Thread Zhangfei Gao
Hi, Joerg On 2020/6/22 下午7:55, Joerg Roedel wrote: On Thu, Jun 04, 2020 at 09:33:07PM +0800, Zhangfei Gao wrote: +++ b/drivers/iommu/iommu.c @@ -2418,6 +2418,10 @@ int iommu_fwspec_init(struct device *dev, struct fwnode_handle *iommu_fwnode,     fwspec->iommu_fwnode = iommu_fwn

[PATCH] uacce: remove uacce_vma_fault

2020-06-15 Thread Zhangfei Gao
off-by: Zhangfei Gao --- drivers/misc/uacce/uacce.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index 107028e..aa91f69 100644 --- a/drivers/misc/uacce/uacce.c +++ b/drivers/misc/uacce/uacce.c @@ -179,14 +179,6 @@ static

Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-06-18 Thread Zhangfei Gao
Hi, Bjorn On 2020/6/16 上午7:52, Bjorn Helgaas wrote: On Sat, Jun 13, 2020 at 10:30:56PM +0800, Zhangfei Gao wrote: On 2020/6/11 下午9:44, Bjorn Helgaas wrote: +++ b/drivers/iommu/iommu.c @@ -2418,6 +2418,10 @@ int iommu_fwspec_init(struct device *dev, struct fwnode_handle *iommu_fwnode

Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-06-07 Thread Zhangfei Gao
Hi, Bjorn On 2020/6/6 上午7:19, Bjorn Helgaas wrote: On Thu, Jun 04, 2020 at 09:33:07PM +0800, Zhangfei Gao wrote: On 2020/6/2 上午1:41, Bjorn Helgaas wrote: On Thu, May 28, 2020 at 09:33:44AM +0200, Joerg Roedel wrote: On Wed, May 27, 2020 at 01:18:42PM -0500, Bjorn Helgaas wrote

Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-06-04 Thread Zhangfei Gao
On 2020/6/2 上午1:41, Bjorn Helgaas wrote: On Thu, May 28, 2020 at 09:33:44AM +0200, Joerg Roedel wrote: On Wed, May 27, 2020 at 01:18:42PM -0500, Bjorn Helgaas wrote: Is this slowdown significant? We already iterate over every device when applying PCI_FIXUP_FINAL quirks, so if we used the

Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-06-10 Thread Zhangfei Gao
On 2020/6/10 上午12:49, Bjorn Helgaas wrote: On Tue, Jun 09, 2020 at 11:15:06AM +0200, Arnd Bergmann wrote: On Tue, Jun 9, 2020 at 6:02 AM Zhangfei Gao wrote: On 2020/6/9 上午12:41, Bjorn Helgaas wrote: On Mon, Jun 08, 2020 at 10:54:15AM +0800, Zhangfei Gao wrote: On 2020/6/6 上午7:19, Bjorn

Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-06-13 Thread Zhangfei Gao
On 2020/6/11 下午9:44, Bjorn Helgaas wrote: +++ b/drivers/iommu/iommu.c @@ -2418,6 +2418,10 @@ int iommu_fwspec_init(struct device *dev, struct fwnode_handle *iommu_fwnode, fwspec->iommu_fwnode = iommu_fwnode; fwspec->ops = ops; dev_iommu_fwspec_set(dev,

Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-06-08 Thread Zhangfei Gao
Hi, Bjorn On 2020/6/9 上午12:41, Bjorn Helgaas wrote: On Mon, Jun 08, 2020 at 10:54:15AM +0800, Zhangfei Gao wrote: On 2020/6/6 上午7:19, Bjorn Helgaas wrote: On Thu, Jun 04, 2020 at 09:33:07PM +0800, Zhangfei Gao wrote: On 2020/6/2 上午1:41, Bjorn Helgaas wrote: On Thu, May 28, 2020 at 09:33

Re: [PATCH v8 4/9] of/iommu: Support dma-can-stall property

2020-12-17 Thread Zhangfei Gao
On 2020/12/14 下午8:51, Jean-Philippe Brucker wrote: On Thu, Nov 26, 2020 at 06:09:26PM +, Robin Murphy wrote: On 2020-11-12 12:55, Jean-Philippe Brucker wrote: Copy the dma-can-stall property into the fwspec structure. Can't we just handle this as a regular device property? It's not part

Re: [PATCH v9 00/10] iommu: I/O page faults for SMMUv3

2021-01-10 Thread Zhangfei Gao
ure dt-bindings: document stall property for IOMMU masters ACPI/IORT: Enable stall support for platform devices iommu/arm-smmu-v3: Add stall support for platform devices Thanks Jean I have tested on Hisilicon Kunpeng920 board.  Tested-by: Zhangfei Gao Tha

Re: [PATCH v9 05/10] uacce: Enable IOMMU_DEV_FEAT_IOPF

2021-01-10 Thread Zhangfei Gao
enabling SVA for now. In the future, if a device driver implementing a uacce interface doesn't need IOPF support, it will need to tell the uacce module, for example with a new flag. Signed-off-by: Jean-Philippe Brucker --- Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Zhangfei Gao Cc: Zhou Wang

[RFC PATCH] iommu: add domain->nested

2021-06-16 Thread Zhangfei Gao
Add domain->nested to decide whether domain is in nesting mode, since attr DOMAIN_ATTR_NESTING is removed in the patches: 7876a83 iommu: remove iommu_domain_{get,set}_attr 7e14754 iommu: remove DOMAIN_ATTR_NESTING Signed-off-by: Zhangfei Gao --- Nesting info is still required for vsva accord

Re: [RFC PATCH] iommu: add domain->nested

2021-06-16 Thread Zhangfei Gao
On 2021/6/16 下午10:44, Christoph Hellwig wrote: On Wed, Jun 16, 2021 at 10:38:02PM +0800, Zhangfei Gao wrote: +++ b/include/linux/iommu.h @@ -87,6 +87,7 @@ struct iommu_domain { void *handler_token; struct iommu_domain_geometry geometry; void *iova_cookie; + int

Re: [PATCH v14 10/10] iommu/arm-smmu-v3: Add stall support for platform devices

2021-04-01 Thread Zhangfei Gao
Hi, Will On 2021/4/2 上午1:11, Will Deacon wrote: On Thu, Apr 01, 2021 at 05:47:19PM +0200, Jean-Philippe Brucker wrote: The SMMU provides a Stall model for handling page faults in platform devices. It is similar to PCIe PRI, but doesn't require devices to have their own translation cache.