summaryrefslogtreecommitdiff
path: root/scripts/code_cov_gather_on_test.py
diff options
context:
space:
mode:
authorJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>2022-03-01 12:43:58 +0100
committerJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>2022-03-09 09:19:31 +0100
commit82306f1903c0fee8371f43a156d8b63163ca61c1 (patch)
tree407eecc76ba7995368c4647f7a6e63c81fbde461 /scripts/code_cov_gather_on_test.py
parentbb0a6e30355008c50f0c319e0dc4be2f21c9d037 (diff)
lib/intel_mmio: Fix mmapped resources not unmapped on fini
Commit 5f3cfa485eb4 ("lib: Use safe wrappers around libpciaccess initialization functions") took care of not leaking memory allocated by pci_system_init() but didn't take care of users potentially attempting to reinitialize global data maintained by libpciaccess. For example, intel_register_access_init() mmaps device's PCI BAR0 resource with pci_device_map_range() but intel_register_access_fini() doesn't unmap it and next call to intel_register_access_init() fails on attempt to mmap it again. Fix it, and also provide intel_mmio_unmap_*() counterparts to public functions intel_mmio_use_pci_bar() and intel_mmio_use_dump_file(). v2: apply last minute fixes, cached but unfortunately not committed before sending v3: use .pci_device_id field content as an indicator of arg initialization via intel_register_access_init(), - improve checks of argument initialization status, - shorten warning messages (Kamil), - don't fill .mmio_size field until initialization succeeds (Kamil) v4: fix condition of forcewake release, broken in v3, - improve comments and warning messages (Kamil) Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Diffstat (limited to 'scripts/code_cov_gather_on_test.py')
0 files changed, 0 insertions, 0 deletions