* [PATCH] accel/amdxdna: Delete pci_free_irq_vectors()
@ 2025-07-19 6:33 Salah Triki
2025-07-22 7:55 ` Jacek Lawrynowicz
0 siblings, 1 reply; 3+ messages in thread
From: Salah Triki @ 2025-07-19 6:33 UTC (permalink / raw)
To: Min Ma, Lizhi Hou, Oded Gabbay, dri-devel, linux-kernel; +Cc: salah.triki
The device is managed so pci_free_irq_vectors() is called automatically
no need to do it manually.
Signed-off-by: Salah Triki <salah.triki@gmail.com>
---
drivers/accel/amdxdna/aie2_pci.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/accel/amdxdna/aie2_pci.c b/drivers/accel/amdxdna/aie2_pci.c
index c6cf7068d23c..3474a8d4e560 100644
--- a/drivers/accel/amdxdna/aie2_pci.c
+++ b/drivers/accel/amdxdna/aie2_pci.c
@@ -520,14 +520,14 @@ static int aie2_init(struct amdxdna_dev *xdna)
if (!ndev->psp_hdl) {
XDNA_ERR(xdna, "failed to create psp");
ret = -ENOMEM;
- goto free_irq;
+ goto release_fw;
}
xdna->dev_handle = ndev;
ret = aie2_hw_start(xdna);
if (ret) {
XDNA_ERR(xdna, "start npu failed, ret %d", ret);
- goto free_irq;
+ goto release_fw;
}
ret = aie2_mgmt_fw_query(ndev);
@@ -578,8 +578,6 @@ static int aie2_init(struct amdxdna_dev *xdna)
aie2_error_async_events_free(ndev);
stop_hw:
aie2_hw_stop(xdna);
-free_irq:
- pci_free_irq_vectors(pdev);
release_fw:
release_firmware(fw);
@@ -588,12 +586,10 @@ static int aie2_init(struct amdxdna_dev *xdna)
static void aie2_fini(struct amdxdna_dev *xdna)
{
- struct pci_dev *pdev = to_pci_dev(xdna->ddev.dev);
struct amdxdna_dev_hdl *ndev = xdna->dev_handle;
aie2_hw_stop(xdna);
aie2_error_async_events_free(ndev);
- pci_free_irq_vectors(pdev);
}
static int aie2_get_aie_status(struct amdxdna_client *client,
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] accel/amdxdna: Delete pci_free_irq_vectors()
2025-07-19 6:33 [PATCH] accel/amdxdna: Delete pci_free_irq_vectors() Salah Triki
@ 2025-07-22 7:55 ` Jacek Lawrynowicz
2025-07-22 16:57 ` Lizhi Hou
0 siblings, 1 reply; 3+ messages in thread
From: Jacek Lawrynowicz @ 2025-07-22 7:55 UTC (permalink / raw)
To: Salah Triki, Min Ma, Lizhi Hou, Oded Gabbay, dri-devel,
linux-kernel
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
On 7/19/2025 8:33 AM, Salah Triki wrote:
> The device is managed so pci_free_irq_vectors() is called automatically
> no need to do it manually.
>
> Signed-off-by: Salah Triki <salah.triki@gmail.com>
> ---
> drivers/accel/amdxdna/aie2_pci.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/accel/amdxdna/aie2_pci.c b/drivers/accel/amdxdna/aie2_pci.c
> index c6cf7068d23c..3474a8d4e560 100644
> --- a/drivers/accel/amdxdna/aie2_pci.c
> +++ b/drivers/accel/amdxdna/aie2_pci.c
> @@ -520,14 +520,14 @@ static int aie2_init(struct amdxdna_dev *xdna)
> if (!ndev->psp_hdl) {
> XDNA_ERR(xdna, "failed to create psp");
> ret = -ENOMEM;
> - goto free_irq;
> + goto release_fw;
> }
> xdna->dev_handle = ndev;
>
> ret = aie2_hw_start(xdna);
> if (ret) {
> XDNA_ERR(xdna, "start npu failed, ret %d", ret);
> - goto free_irq;
> + goto release_fw;
> }
>
> ret = aie2_mgmt_fw_query(ndev);
> @@ -578,8 +578,6 @@ static int aie2_init(struct amdxdna_dev *xdna)
> aie2_error_async_events_free(ndev);
> stop_hw:
> aie2_hw_stop(xdna);
> -free_irq:
> - pci_free_irq_vectors(pdev);
> release_fw:
> release_firmware(fw);
>
> @@ -588,12 +586,10 @@ static int aie2_init(struct amdxdna_dev *xdna)
>
> static void aie2_fini(struct amdxdna_dev *xdna)
> {
> - struct pci_dev *pdev = to_pci_dev(xdna->ddev.dev);
> struct amdxdna_dev_hdl *ndev = xdna->dev_handle;
>
> aie2_hw_stop(xdna);
> aie2_error_async_events_free(ndev);
> - pci_free_irq_vectors(pdev);
> }
>
> static int aie2_get_aie_status(struct amdxdna_client *client,
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] accel/amdxdna: Delete pci_free_irq_vectors()
2025-07-22 7:55 ` Jacek Lawrynowicz
@ 2025-07-22 16:57 ` Lizhi Hou
0 siblings, 0 replies; 3+ messages in thread
From: Lizhi Hou @ 2025-07-22 16:57 UTC (permalink / raw)
To: Jacek Lawrynowicz, Salah Triki, Min Ma, Oded Gabbay, dri-devel,
linux-kernel
Pushed to drm-misc-next. Thanks.
Lizhi
On 7/22/25 00:55, Jacek Lawrynowicz wrote:
> Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
>
> On 7/19/2025 8:33 AM, Salah Triki wrote:
>> The device is managed so pci_free_irq_vectors() is called automatically
>> no need to do it manually.
>>
>> Signed-off-by: Salah Triki <salah.triki@gmail.com>
>> ---
>> drivers/accel/amdxdna/aie2_pci.c | 8 ++------
>> 1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/accel/amdxdna/aie2_pci.c b/drivers/accel/amdxdna/aie2_pci.c
>> index c6cf7068d23c..3474a8d4e560 100644
>> --- a/drivers/accel/amdxdna/aie2_pci.c
>> +++ b/drivers/accel/amdxdna/aie2_pci.c
>> @@ -520,14 +520,14 @@ static int aie2_init(struct amdxdna_dev *xdna)
>> if (!ndev->psp_hdl) {
>> XDNA_ERR(xdna, "failed to create psp");
>> ret = -ENOMEM;
>> - goto free_irq;
>> + goto release_fw;
>> }
>> xdna->dev_handle = ndev;
>>
>> ret = aie2_hw_start(xdna);
>> if (ret) {
>> XDNA_ERR(xdna, "start npu failed, ret %d", ret);
>> - goto free_irq;
>> + goto release_fw;
>> }
>>
>> ret = aie2_mgmt_fw_query(ndev);
>> @@ -578,8 +578,6 @@ static int aie2_init(struct amdxdna_dev *xdna)
>> aie2_error_async_events_free(ndev);
>> stop_hw:
>> aie2_hw_stop(xdna);
>> -free_irq:
>> - pci_free_irq_vectors(pdev);
>> release_fw:
>> release_firmware(fw);
>>
>> @@ -588,12 +586,10 @@ static int aie2_init(struct amdxdna_dev *xdna)
>>
>> static void aie2_fini(struct amdxdna_dev *xdna)
>> {
>> - struct pci_dev *pdev = to_pci_dev(xdna->ddev.dev);
>> struct amdxdna_dev_hdl *ndev = xdna->dev_handle;
>>
>> aie2_hw_stop(xdna);
>> aie2_error_async_events_free(ndev);
>> - pci_free_irq_vectors(pdev);
>> }
>>
>> static int aie2_get_aie_status(struct amdxdna_client *client,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-22 16:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-19 6:33 [PATCH] accel/amdxdna: Delete pci_free_irq_vectors() Salah Triki
2025-07-22 7:55 ` Jacek Lawrynowicz
2025-07-22 16:57 ` Lizhi Hou
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.