diff options
author | Antony Clince Alex <aalex@nvidia.com> | 2018-04-25 11:56:21 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-09 21:25:45 -0400 |
commit | 50d1b0c72bfa5bf662c04db85e39c04ca3abfd67 (patch) | |
tree | 85d12588affcfcd23a3794257f965542aadea6b1 /drivers/gpu/nvgpu/common/linux/pci.c | |
parent | b144935644f76328aa9ec2592655b4553ed28222 (diff) |
gpu: nvgpu: os-agnostic segregation of sim/sim_pci
segregated os-agnostic function from linux/sim.c and linux/sim_pci.c
to sim.c and sim_pci.c, while retaining os-specific functions.
renamed all gk20a_* api's to nvgpu_*.
renamed hw_sim_gk20a.h to nvgpu/hw_sim.h
moved hw_sim_pci.h to nvgpu/hw_sim_pci.h
JIRA VQRM-2368
Change-Id: I040a6b12b19111a0b99280245808ea2b0f344cdd
Signed-off-by: Antony Clince Alex <aalex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1702425
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/pci.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/pci.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c index 3c7de4ff..a9bcca70 100644 --- a/drivers/gpu/nvgpu/common/linux/pci.c +++ b/drivers/gpu/nvgpu/common/linux/pci.c | |||
@@ -498,15 +498,29 @@ static int nvgpu_pci_init_support(struct pci_dev *pdev) | |||
498 | goto fail; | 498 | goto fail; |
499 | } | 499 | } |
500 | 500 | ||
501 | err = nvgpu_pci_init_sim_support(g); | 501 | err = nvgpu_init_sim_support_linux_pci(g); |
502 | if (err) | 502 | if (err) |
503 | goto fail; | 503 | goto fail; |
504 | err = nvgpu_init_sim_support_pci(g); | ||
505 | if (err) | ||
506 | goto fail_sim; | ||
504 | 507 | ||
505 | nvgpu_pci_init_usermode_support(l); | 508 | nvgpu_pci_init_usermode_support(l); |
506 | 509 | ||
507 | return 0; | 510 | return 0; |
508 | 511 | ||
512 | fail_sim: | ||
513 | nvgpu_remove_sim_support_linux_pci(g); | ||
509 | fail: | 514 | fail: |
515 | if (l->regs) { | ||
516 | iounmap(l->regs); | ||
517 | l->regs = NULL; | ||
518 | } | ||
519 | if (l->bar1) { | ||
520 | iounmap(l->bar1); | ||
521 | l->bar1 = NULL; | ||
522 | } | ||
523 | |||
510 | return err; | 524 | return err; |
511 | } | 525 | } |
512 | 526 | ||