mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
Update the include location of gk20a.h to include/nvgpu/gk20a.h in the following directories. nvgpu/gm20b/ nvgpu/gp10b/ nvgpu/gv11b/ Jira NVGPU-597 Change-Id: Ie38d4a72bb65c41bd30058350509bfa7e87bb64e Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1822789 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
182 lines
4.3 KiB
C
182 lines
4.3 KiB
C
/*
|
|
* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
* to deal in the Software without restriction, including without limitation
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
* DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
#include <nvgpu/ecc.h>
|
|
#include <nvgpu/gk20a.h>
|
|
|
|
#include "gv11b/ecc_gv11b.h"
|
|
|
|
int gv11b_ecc_init(struct gk20a *g)
|
|
{
|
|
int err;
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_TPC(sm_lrf_ecc_single_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_TPC(sm_lrf_ecc_double_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_TPC(
|
|
sm_l1_tag_ecc_corrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_TPC(
|
|
sm_l1_tag_ecc_uncorrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_TPC(
|
|
sm_cbu_ecc_corrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_TPC(
|
|
sm_cbu_ecc_uncorrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_TPC(
|
|
sm_l1_data_ecc_corrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_TPC(
|
|
sm_l1_data_ecc_uncorrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_TPC(
|
|
sm_icache_ecc_corrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_TPC(
|
|
sm_icache_ecc_uncorrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_GPC(
|
|
gcc_l15_ecc_corrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_GPC(
|
|
gcc_l15_ecc_uncorrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_LTS(ecc_sec_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_LTS(ecc_ded_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_GR(fecs_ecc_uncorrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_GR(fecs_ecc_corrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_GPC(
|
|
gpccs_ecc_uncorrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_GPC(
|
|
gpccs_ecc_corrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_GPC(
|
|
mmu_l1tlb_ecc_uncorrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_PER_GPC(
|
|
mmu_l1tlb_ecc_corrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_FB(mmu_l2tlb_ecc_uncorrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_FB(mmu_l2tlb_ecc_corrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_FB(mmu_hubtlb_ecc_uncorrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_FB(mmu_hubtlb_ecc_corrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_FB(
|
|
mmu_fillunit_ecc_uncorrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_FB(
|
|
mmu_fillunit_ecc_corrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
err = NVGPU_ECC_COUNTER_INIT_PMU(pmu_ecc_uncorrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
err = NVGPU_ECC_COUNTER_INIT_PMU(pmu_ecc_corrected_err_count);
|
|
if (err != 0) {
|
|
goto done;
|
|
}
|
|
|
|
done:
|
|
if (err != 0) {
|
|
nvgpu_err(g, "ecc counter allocate failed, err=%d", err);
|
|
nvgpu_ecc_free(g);
|
|
}
|
|
|
|
return err;
|
|
}
|