mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: Move intr data members from MC to CIC
Move interrupt specific data-members from common.mc to common.cic Some of these data members like sw_irq_stall_last_handled_cond need To be initialized much earlier during the OS specific init/probe stage. Also, some more members from struct nvgpu_interrupts(like stall_size, stall_lines[]), which will soon be moved to CIC will also need to be initialized early during the OS specific probe stage. However, the chip specific LUT can only be initialized after the hal_init stage where the HALs are all initialized. Split the CIC init to accommodate the above initialization requirements. JIRA NVGPU-6899 Change-Id: I9333db4cde59bb0aa8f6eb9f8472f00369817a5d Signed-off-by: Tejal Kudav <tkudav@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2552535 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
695dcab297
commit
b33079d47e
@@ -601,6 +601,12 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
|
||||
g->msi_enabled = true;
|
||||
#endif
|
||||
|
||||
err = nvgpu_cic_mon_setup(g);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "CIC-MON setup failed");
|
||||
goto err_disable_msi;
|
||||
}
|
||||
|
||||
/* Number of stall interrupt line = 1 (for dgpu <= tu10x) */
|
||||
l->interrupts.stall_size = 1U;
|
||||
l->interrupts.nonstall_size = 0U;
|
||||
@@ -610,7 +616,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
|
||||
|
||||
if ((int)l->interrupts.stall_lines[0] < 0) {
|
||||
err = -ENXIO;
|
||||
goto err_disable_msi;
|
||||
goto err_deinit_cic_mon;
|
||||
}
|
||||
|
||||
err = devm_request_threaded_irq(&pdev->dev,
|
||||
@@ -624,7 +630,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
|
||||
if (err) {
|
||||
nvgpu_err(g,
|
||||
"failed to request irq @ %d", l->interrupts.stall_lines[0]);
|
||||
goto err_disable_msi;
|
||||
goto err_deinit_cic_mon;
|
||||
}
|
||||
nvgpu_disable_irqs(g);
|
||||
|
||||
@@ -694,6 +700,8 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
|
||||
|
||||
err_free_irq:
|
||||
nvgpu_free_irq(g);
|
||||
err_deinit_cic_mon:
|
||||
nvgpu_cic_mon_remove(g);
|
||||
err_disable_msi:
|
||||
#if defined(CONFIG_PCI_MSI)
|
||||
if (g->msi_enabled)
|
||||
@@ -770,6 +778,9 @@ static void nvgpu_pci_remove(struct pci_dev *pdev)
|
||||
nvgpu_enable_irqs(g);
|
||||
}
|
||||
#endif
|
||||
(void)nvgpu_cic_mon_remove(g);
|
||||
(void)nvgpu_cic_rm_remove(g);
|
||||
|
||||
nvgpu_pci_pm_deinit(&pdev->dev);
|
||||
|
||||
/* free allocated platform data space */
|
||||
|
||||
Reference in New Issue
Block a user