[PATCH OLK-6.6] dmaengine: idxd: Refactor remove call with idxd_cleanup() helper
From: Shuai Xue <xueshuai@linux.alibaba.com> stable inclusion from stable-v6.6.92 commit d530dd65f6f3c04bbf141702ecccd70170ed04ad category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICGTHF Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=... -------------------------------- commit a409e919ca321cc0e28f8abf96fde299f0072a81 upstream. The idxd_cleanup() helper cleans up perfmon, interrupts, internals and so on. Refactor remove call with the idxd_cleanup() helper to avoid code duplication. Note, this also fixes the missing put_device() for idxd groups, enginces and wqs. Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") Cc: stable@vger.kernel.org Suggested-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com> Reviewed-by: Fenghua Yu <fenghuay@nvidia.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20250404120217.48772-10-xueshuai@linux.alibaba.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Wang Hai <wanghai38@huawei.com> Conflicts: drivers/dma/idxd/init.c [Context conflicts.] Signed-off-by: Zeng Heng <zengheng4@huawei.com> --- drivers/dma/idxd/init.c | 13 ++----------- fs/resctrl/rdtgroup.c | 2 ++ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c index f288c2e3a98b..cc890c91ca48 100644 --- a/drivers/dma/idxd/init.c +++ b/drivers/dma/idxd/init.c @@ -1232,7 +1232,6 @@ static void idxd_shutdown(struct pci_dev *pdev) static void idxd_remove(struct pci_dev *pdev) { struct idxd_device *idxd = pci_get_drvdata(pdev); - struct idxd_irq_entry *irq_entry; idxd_unregister_devices(idxd); /* @@ -1245,20 +1244,12 @@ static void idxd_remove(struct pci_dev *pdev) get_device(idxd_confdev(idxd)); device_unregister(idxd_confdev(idxd)); idxd_shutdown(pdev); - if (device_pasid_enabled(idxd)) - idxd_disable_system_pasid(idxd); idxd_device_remove_debugfs(idxd); - irq_entry = idxd_get_ie(idxd, 0); - free_irq(irq_entry->vector, irq_entry); - pci_free_irq_vectors(pdev); + idxd_cleanup(idxd); pci_iounmap(pdev, idxd->reg_base); - if (device_user_pasid_enabled(idxd)) - idxd_disable_sva(pdev); - pci_disable_device(pdev); - destroy_workqueue(idxd->wq); - perfmon_pmu_remove(idxd); put_device(idxd_confdev(idxd)); + pci_disable_device(pdev); } static struct pci_driver idxd_pci_driver = { diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 4f26c883e893..0d8a1f8a7a03 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -2793,6 +2793,7 @@ enum rdt_param { Opt_mba_mbps, Opt_debug, Opt_l2, + Opt_hiprec, nr__rdt_params }; @@ -2802,6 +2803,7 @@ static const struct fs_parameter_spec rdt_fs_parameters[] = { fsparam_flag("mba_MBps", Opt_mba_mbps), fsparam_flag("debug", Opt_debug), fsparam_flag("l2", Opt_l2), + fsparam_flag("hiprec", Opt_hiprec), {} }; -- 2.25.1
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/19181 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/ISY... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/19181 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/ISY...
participants (2)
-
patchwork bot -
Zeng Heng