Sysman device reset stability fix

Close PMT, and PMU fds created during Sysman's init before calling
device reset.

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
Jitendra Sharma
2021-04-14 12:30:33 +00:00
committed by Compute-Runtime-Automation
parent c9b5de0f1d
commit 46c51cb8a9
6 changed files with 20 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -11,11 +11,17 @@
namespace L0 {
RasHandleContext::~RasHandleContext() {
void RasHandleContext::releaseRasHandles() {
for (Ras *pRas : handleList) {
delete pRas;
}
handleList.clear();
}
RasHandleContext::~RasHandleContext() {
releaseRasHandles();
}
void RasHandleContext::createHandle(zes_ras_error_type_t type, ze_device_handle_t deviceHandle) {
Ras *pRas = new RasImp(pOsSysman, type, deviceHandle);
handleList.push_back(pRas);