mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: add ltc.intr.handle_illegal_compstat HAL
Add ltc.intr.handle_illegal_compstat to handle the case in which a chip does not support the ILLEGAL_COMPSTAT LTC interrupt. Jira NVGPU-9217 Change-Id: I40ddcbda6176ffa36037bd1998af4ec1bed67ec9 Signed-off-by: Austin Tajiri <atajiri@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2869900 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Tejal Kudav <tkudav@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
3a69b445fc
commit
b1ac11e0e0
@@ -374,6 +374,7 @@ static const struct gops_ltc_intr ga100_ops_ltc_intr = {
|
|||||||
.isr = ga10b_ltc_intr_isr,
|
.isr = ga10b_ltc_intr_isr,
|
||||||
#ifdef CONFIG_NVGPU_NON_FUSA
|
#ifdef CONFIG_NVGPU_NON_FUSA
|
||||||
.en_illegal_compstat = gv11b_ltc_intr_en_illegal_compstat,
|
.en_illegal_compstat = gv11b_ltc_intr_en_illegal_compstat,
|
||||||
|
.handle_illegal_compstat = ga10b_ltc_intr_handle_illegal_compstat,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -348,6 +348,7 @@ static const struct gops_ltc_intr ga10b_ops_ltc_intr = {
|
|||||||
.ltc_intr3_configure_extra = ga10b_ltc_intr3_configure_extra,
|
.ltc_intr3_configure_extra = ga10b_ltc_intr3_configure_extra,
|
||||||
#ifdef CONFIG_NVGPU_NON_FUSA
|
#ifdef CONFIG_NVGPU_NON_FUSA
|
||||||
.en_illegal_compstat = gv11b_ltc_intr_en_illegal_compstat,
|
.en_illegal_compstat = gv11b_ltc_intr_en_illegal_compstat,
|
||||||
|
.handle_illegal_compstat = ga10b_ltc_intr_handle_illegal_compstat,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* GA10B L2 INTR
|
* GA10B L2 INTR
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -38,5 +38,7 @@ void ga10b_ltc_intr_handle_lts_intr(struct gk20a *g, u32 ltc, u32 slice);
|
|||||||
void ga10b_ltc_intr_handle_lts_intr2(struct gk20a *g, u32 ltc, u32 slice);
|
void ga10b_ltc_intr_handle_lts_intr2(struct gk20a *g, u32 ltc, u32 slice);
|
||||||
void ga10b_ltc_intr_handle_lts_intr3(struct gk20a *g, u32 ltc, u32 slice);
|
void ga10b_ltc_intr_handle_lts_intr3(struct gk20a *g, u32 ltc, u32 slice);
|
||||||
void ga10b_ltc_intr_handle_lts_intr3_extra(struct gk20a *g, u32 ltc, u32 slice, u32 *reg_value);
|
void ga10b_ltc_intr_handle_lts_intr3_extra(struct gk20a *g, u32 ltc, u32 slice, u32 *reg_value);
|
||||||
|
void ga10b_ltc_intr_handle_illegal_compstat(struct gk20a *g, u32 ltc, u32 slice,
|
||||||
|
u32 ltc_intr, u32 *reg_value);
|
||||||
|
|
||||||
#endif /* NVGPU_LTC_INTR_GA10B_H */
|
#endif /* NVGPU_LTC_INTR_GA10B_H */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* GA10B LTC INTR
|
* GA10B LTC INTR
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -989,6 +989,22 @@ void ga10b_ltc_intr_handle_lts_intr2(struct gk20a *g, u32 ltc, u32 slice)
|
|||||||
reg_value);
|
reg_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_NVGPU_NON_FUSA
|
||||||
|
void ga10b_ltc_intr_handle_illegal_compstat(struct gk20a *g, u32 ltc, u32 slice,
|
||||||
|
u32 ltc_intr, u32 *reg_value)
|
||||||
|
{
|
||||||
|
if ((ltc_intr & ltc_ltcs_ltss_intr_en_illegal_compstat_enabled_f()) &&
|
||||||
|
(ltc_intr & ltc_ltcs_ltss_intr_illegal_compstat_m())) {
|
||||||
|
nvgpu_log(g, gpu_dbg_intr,
|
||||||
|
"ltc:%d lts: %d illegal_compstat interrupt",
|
||||||
|
ltc, slice);
|
||||||
|
*reg_value = set_field(*reg_value,
|
||||||
|
ltc_ltcs_ltss_intr_illegal_compstat_m(),
|
||||||
|
ltc_ltcs_ltss_intr_illegal_compstat_reset_f());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void ga10b_ltc_intr_handle_lts_intr(struct gk20a *g, u32 ltc, u32 slice)
|
void ga10b_ltc_intr_handle_lts_intr(struct gk20a *g, u32 ltc, u32 slice)
|
||||||
{
|
{
|
||||||
u32 ltc_stride = nvgpu_get_litter_value(g, GPU_LIT_LTC_STRIDE);
|
u32 ltc_stride = nvgpu_get_litter_value(g, GPU_LIT_LTC_STRIDE);
|
||||||
@@ -1036,15 +1052,11 @@ void ga10b_ltc_intr_handle_lts_intr(struct gk20a *g, u32 ltc, u32 slice)
|
|||||||
ltc_ltcs_ltss_intr_evicted_cb_reset_f());
|
ltc_ltcs_ltss_intr_evicted_cb_reset_f());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ltc_intr & ltc_ltcs_ltss_intr_en_illegal_compstat_enabled_f()) &&
|
#ifdef CONFIG_NVGPU_NON_FUSA
|
||||||
(ltc_intr & ltc_ltcs_ltss_intr_illegal_compstat_m())) {
|
if (g->ops.ltc.intr.handle_illegal_compstat != NULL) {
|
||||||
nvgpu_log(g, gpu_dbg_intr,
|
g->ops.ltc.intr.handle_illegal_compstat(g, ltc, slice, ltc_intr, ®_value);
|
||||||
"ltc:%d lts: %d illegal_compstat interrupt",
|
|
||||||
ltc, slice);
|
|
||||||
reg_value = set_field(reg_value,
|
|
||||||
ltc_ltcs_ltss_intr_illegal_compstat_m(),
|
|
||||||
ltc_ltcs_ltss_intr_illegal_compstat_reset_f());
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (ltc_intr & ltc_ltcs_ltss_intr_illegal_atomic_m()) {
|
if (ltc_intr & ltc_ltcs_ltss_intr_illegal_atomic_m()) {
|
||||||
nvgpu_log(g, gpu_dbg_intr,
|
nvgpu_log(g, gpu_dbg_intr,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -202,6 +202,8 @@ struct gops_ltc_intr {
|
|||||||
void (*configure)(struct gk20a *g);
|
void (*configure)(struct gk20a *g);
|
||||||
#ifdef CONFIG_NVGPU_NON_FUSA
|
#ifdef CONFIG_NVGPU_NON_FUSA
|
||||||
void (*en_illegal_compstat)(struct gk20a *g, bool enable);
|
void (*en_illegal_compstat)(struct gk20a *g, bool enable);
|
||||||
|
void (*handle_illegal_compstat)(struct gk20a *g, u32 ltc, u32 slice,
|
||||||
|
u32 ltc_intr, u32 *reg_value);
|
||||||
#endif
|
#endif
|
||||||
void (*isr_extra)(struct gk20a *g, u32 ltc, u32 slice, u32 *reg_value);
|
void (*isr_extra)(struct gk20a *g, u32 ltc, u32 slice, u32 *reg_value);
|
||||||
void (*ltc_intr3_configure_extra)(struct gk20a *g, u32 *reg);
|
void (*ltc_intr3_configure_extra)(struct gk20a *g, u32 *reg);
|
||||||
|
|||||||
Reference in New Issue
Block a user