An error occurred fetching the project authors.
- 16 Sep, 2022 1 commit
-
-
Weili Qian authored
Before hardware V3, hardwares do not provide the feature registers, driver resolves hardware differences based on the hardware version. As a result, the driver does not support the new hardware. Hardware V3 and later versions support to obtain hardware features, such as power-gating management and doorbell isolation, through the hardware registers. To be compatible with later hardware versions, the features of the current device is obtained by reading the hardware registers instead of the hardware version. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 17 Jun, 2022 2 commits
-
-
Kai Ye authored
The base register address of V2 and V3 are different. HW V3 not needs to change the BD err detection. Signed-off-by:
Kai Ye <yekai13@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Weili Qian authored
Before stopping the function, the driver needs to flush all the remaining work about event irq. Therefore, accelerator drivers use a private workqueue(qm->wq) to handle event irq instead of the system workqueue. This patch moves alloc workqueue from sec_main.c and zip_main.c to qm.c. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 15 Apr, 2022 2 commits
-
-
Kai Ye authored
Add last word dumping function during sec engine controller reset. Signed-off-by:
Kai Ye <yekai13@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Kai Ye authored
The value of the register is changed after the task running. A debugfs file node is added to help users to check the change of register values. Signed-off-by:
Longfang Liu <liulongfang@huawei.com> Signed-off-by:
Kai Ye <yekai13@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 15 Mar, 2022 2 commits
-
-
Shameer Kolothum authored
struct pci_driver pointer is an input into the pci_iov_get_pf_drvdata(). Introduce helpers to retrieve the ACC PF dev struct pci_driver pointers as we use this in ACC vfio migration driver. Acked-by:
Zhou Wang <wangzhou1@hisilicon.com> Acked-by:
Kai Ye <yekai13@huawei.com> Acked-by:
Longfang Liu <liulongfang@huawei.com> Signed-off-by:
Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Link: https://lore.kernel.org/r/20220308184902.2242-7-shameerali.kolothum.thodi@huawei.comSigned-off-by:
Alex Williamson <alex.williamson@redhat.com>
-
Shameer Kolothum authored
Move the PCI Device IDs of HiSilicon ACC VF devices to a common header and also use a uniform naming convention. This will be useful when we introduce the vfio PCI HiSilicon ACC live migration driver in subsequent patches. Cc: Bjorn Helgaas <bhelgaas@google.com> Acked-by:
Zhou Wang <wangzhou1@hisilicon.com> Acked-by:
Longfang Liu <liulongfang@huawei.com> Acked-by:
Kai Ye <yekai13@huawei.com> Signed-off-by:
Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> # pci_ids.h Link: https://lore.kernel.org/r/20220308184902.2242-4-shameerali.kolothum.thodi@huawei.comSigned-off-by:
Alex Williamson <alex.williamson@redhat.com>
-
- 18 Feb, 2022 2 commits
-
-
Kai Ye authored
It is not need to enable sm4 extra mode in at HW V3. Here is fix it. Signed-off-by:
Kai Ye <yekai13@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Kai Ye authored
Added the register configuration of the SVA mode for HW V3. Signed-off-by:
Kai Ye <yekai13@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 26 Nov, 2021 1 commit
-
-
Kai Ye authored
Modify the value of type rate from new QM spec. Signed-off-by:
Kai Ye <yekai13@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 21 Aug, 2021 5 commits
-
-
Weili Qian authored
To avoid repeatedly obtaining 'qm' from 'filp', parameter passing of debugfs function directly use 'qm' instead of 'filp'. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Weili Qian authored
Add runtime PM support for Kunpeng930 accelerator device. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Weili Qian authored
The accelerator devices support runtime PM, when device is in suspended, an exception will occur if reading registers. Therefore, this patch uses 'debugfs_create_file' instead of 'debugfs_create_regset32' to create debugfs file, and then the driver can get the device status before reading the register. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Kai Ye authored
When the endian configuration of the hardware is abnormal, it will cause the SEC engine is faulty that reports empty message. And it will affect the normal function of the hardware. Currently the soft configuration method can't restore the faulty device. The endian needs to be configured according to the system properties. So fix it. Signed-off-by:
Kai Ye <yekai13@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Kai Ye authored
Because the algs registration process has added a judgment. So need to add the judgment for the abnormal exiting process. Signed-off-by:
Kai Ye <yekai13@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 12 Aug, 2021 1 commit
-
-
Weili Qian authored
Kunpeng930 sec device supports dynamic clock gating. When doing tasks, the algorithm core is opened, and when idle, the algorithm core is closed. This patch enables sec dynamic clock gating by writing hardware registers. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 28 Jun, 2021 1 commit
-
-
Kai Ye authored
The open interface of the sva prefetching function is distinguish the chip version. But the close interface of the sva prefetching function doesn't distinguish the chip version. As a result, the sva prefetching close operation is also performed on Kunpeng920, those registers are important on Kunpeng920, which eventually leads to abnormal hardware problems. So need to fix it immediately. Signed-off-by:
Kai Ye <yekai13@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 17 Jun, 2021 1 commit
-
-
Kai Ye authored
The SEC driver support configure each function's QoS in the Host for Kunpeng930. The SEC driver needs to configure the maximum shaper type rate. Signed-off-by:
Kai Ye <yekai13@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 28 May, 2021 1 commit
-
-
Longfang Liu authored
Kunpeng930 hardware supports address prefetching to improve performance before doing tasks in SVA scenario. This patch enables this function in device initialization by writing hardware registers. In the process of reset, address prefetching is disabled to avoid the failure of interaction between accelerator device and SMMU. Signed-off-by:
Longfang Liu <liulongfang@huawei.com> Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 23 May, 2021 2 commits
-
-
Weili Qian authored
Kunpeng930 could be able to close master ooo when NFE occurs, which will disable memory accessing from device and execute tasks. This ensures that errors do not spread. This patch enables the hardware to close master ooo when an error occurs by writing hardware registers, and ensures that the driver will not drain qp because the hardware will empty the tasks automatically. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Weili Qian authored
In order to avoid reporting an exception but the error type is not configured, the driver needs to configure the error type first, and then enable the error interrupt. Before executing the task, hardware error initialization is needed so that the hardware can detect the error in time. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 22 Apr, 2021 2 commits
-
-
Weili Qian authored
Kunpeng930 SEC adds several new hardware error types. This patch enables the new error types and configures the error types as NFE. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Weili Qian authored
'err_info' does not support dynamic configuration since it is const type. Therefore, in order to support new error type later, 'err_info' is changed to dynamic configuration. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 09 Apr, 2021 1 commit
-
-
Longfang Liu authored
ctx_q_num is a module parameter set by the user to specify the number of qp queues required to create a ctx. When the number of qp queues allocated by PF or VF is less than the ctx_q_num, an error will be reported when ctx is initialized in kernel mode, which leads to the problem that the registered algorithms cannot be used. Therefore, when PF or VF is initialized, if the number of qp queues is not enough to create a ctx, the kernel mode cannot be used, and there is no need to register the kernel mode algorithms. Signed-off-by:
Longfang Liu <liulongfang@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 02 Apr, 2021 1 commit
-
-
Hui Tang authored
It has newline already by sysfs, so delete redundant '\n' Signed-off-by:
Hui Tang <tanghui20@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 26 Mar, 2021 2 commits
-
-
Weili Qian authored
Since the code related to 'CURRENT_QM' debugfs is exactly same in sec/hpre/zip driver, move 'CURRENT_QM' to qm.c to reduce duplicate code. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Weili Qian authored
Move the configuration of the total number of queues 'ctrl_qp_num' from sec2/hpre/zip to qm.c. And get the total number of queues from the hardware register for Kunpeng930. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 19 Mar, 2021 1 commit
-
-
Longfang Liu authored
cleanup static check errors for SEC Signed-off-by:
Longfang Liu <liulongfang@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 10 Feb, 2021 3 commits
-
-
Weili Qian authored
There is no need to reset hardware when Corrected Error(CE) happens. Signed-off-by:
Weili Qian <qianweili@huawei.com> Reviewed-by:
Zaibo Xu <xuzaibo@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Weili Qian authored
Add waiting logic for resetting as removing driver, otherwise call trace will occur due to releasing resource. Signed-off-by:
Weili Qian <qianweili@huawei.com> Reviewed-by:
Zaibo Xu <xuzaibo@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Weili Qian authored
Enable PASID by setting 'sqc' and 'cqc' pasid bits per queue in Kunpeng 930. For Kunpeng 920, PASID is effective for all queues once set in SVA scenarios. Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Hui Tang <tanghui20@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 14 Jan, 2021 1 commit
-
-
Kai Ye authored
Register SEC device to uacce framework for user space. Signed-off-by:
Kai Ye <yekai13@huawei.com> Reviewed-by:
Zhou Wang <wangzhou1@hisilicon.com> Reviewed-by:
Zaibo Xu <xuzaibo@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 06 Nov, 2020 1 commit
-
-
Weili Qian authored
Since 'qm_create_debugfs_file' always returns 0, change it as 'void'. Signed-off-by:
Weili Qian <qianweili@huawei.com> Reviewed-by:
Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 30 Oct, 2020 1 commit
-
-
Longfang Liu authored
Clean up extra blank lines Signed-off-by:
Longfang Liu <liulongfang@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 25 Sep, 2020 1 commit
-
-
Yang Shen authored
The parameter type of 'pci_set_drvdata' is 'struct hisi_qm', so here the return type of 'pci_get_drvdata' should be 'struct hisi_qm' too. Signed-off-by:
Yang Shen <shenyang39@huawei.com> Signed-off-by:
Weili Qian <qianweili@huawei.com> Reviewed-by:
Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 18 Sep, 2020 1 commit
-
-
Longfang Liu authored
In order to pass kernel CRYPTO test, SEC module parameter 'pf_q_num' needs to be set as greater than 1. Signed-off-by:
Longfang Liu <liulongfang@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 21 Aug, 2020 4 commits
-
-
Yang Shen authored
When the devices are removed or not existing, the corresponding algorithms which are registered by 'hisi-zip' driver can't be used. Move 'hisi_zip_register_to_crypto' from 'hisi_zip_init' to 'hisi_zip_probe'. The algorithms will be registered to crypto only when there is device bind on the driver. And when the devices are removed, the algorithms will be unregistered. In the previous process, the function 'xxx_register_to_crypto' need a lock and a static variable to judge if the registration is the first time. Move this action into the function 'hisi_qm_alg_register'. Each device will call 'hisi_qm_alg_register' to add itself to qm list in probe process and registering algs when the qm list is empty. Signed-off-by:
Yang Shen <shenyang39@huawei.com> Reviewed-by:
Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Weili Qian authored
Call trace will appear in the Hisilicon crypto driver unbinding or disabling SRIOV during task running with TFMs on the corresponding function. The log looks like this: [ 293.908078] Call trace: [ 293.908080] __queue_work+0x494/0x548 [ 293.908081] queue_work_on+0x84/0xd8 [ 293.908092] qm_irq+0x4c/0xd0 [hisi_qm] [ 293.908096] __handle_irq_event_percpu+0x74/0x2a0 [ 293.908098] handle_irq_event_percpu+0x40/0x98 [ 293.908099] handle_irq_event+0x4c/0x80 [ 293.908101] handle_fasteoi_irq+0xb0/0x170 [ 293.908102] generic_handle_irq+0x3c/0x58 [ 293.908103] __handle_domain_irq+0x68/0xc0 [ 293.908104] gic_handle_irq+0xb4/0x298 [ 293.908105] el1_irq+0xcc/0x180 [ 293.908107] arch_cpu_idle+0x38/0x228 [ 293.908110] default_idle_call+0x20/0x40 [ 293.908113] do_idle+0x1cc/0x2b8 [ 293.908114] cpu_startup_entry+0x2c/0x30 [ 293.908115] rest_init+0xdc/0xe8 [ 293.908117] arch_call_rest_init+0x14/0x1c [ 293.908117] start_kernel+0x490/0x4c4 This patch adds a waiting logic as user doing the above two operations to avoid panic. The two operations will hold on in the driver remove function until the tasks release all their relative TFMs. Signed-off-by:
Hui Tang <tanghui20@huawei.com> Signed-off-by:
Weili Qian <qianweili@huawei.com> Signed-off-by:
Yang Shen <shenyang39@huawei.com> Reviewed-by:
Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Yang Shen authored
Since the drivers such as HPRE/SEC/ZIP do not implement 'pci_driver.shutdow', a RAS will be triggered at OS rebooting or shutting down as the hardware device is processing request. The log looks like this: NOTICE: [NimbusSecNodeType1]:[2372L]This is sec, Base = 0x141800000 NOTICE: [NimbusSecHandle]:[2319L] SecIntSt = 0x3 NOTICE: [NimbusSecHandle]:[2320L] SecQmIntStatus = 0x2 NOTICE: [PrintSecurityType]:[344L] SecurityType is RECOVERABLE! This patch offers a new API in qm to shutdown devices, and add shutdown callbacks in ACC driver based on this new API. So the running devices will be stopped when the OS reboot or shutdown. Signed-off-by:
Yang Shen <shenyang39@huawei.com> Reviewed-by:
Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Yang Shen authored
Now, there are three reasons of stopping: 'NORMAL', 'SOFT_RESET' and 'FLR'. In order to keep this, explicitly pass the stop reason as an input parameter of 'hisi_qm_stop' function. Fixes: b67202e8("crypto: hisilicon/qm - add state machine for QM") Signed-off-by:
Shukun Tan <tanshukun1@huawei.com> Signed-off-by:
Yang Shen <shenyang39@huawei.com> Reviewed-by:
Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-