diff --git a/arch/nvgpu-common.yaml b/arch/nvgpu-common.yaml index fa8f8163b..b4b5af375 100644 --- a/arch/nvgpu-common.yaml +++ b/arch/nvgpu-common.yaml @@ -1051,6 +1051,11 @@ grmgr: include/nvgpu/mig.h, include/nvgpu/gops/grmgr.h ] +cic: + owner: Tejal K + safe: yes + sources: [ include/nvgpu/nvgpu_cic.h ] + ## ## HAL units. Currently they are under common but this needs to change. ## We are moving these to a top level directory. diff --git a/drivers/gpu/nvgpu/include/nvgpu/log_common.h b/drivers/gpu/nvgpu/include/nvgpu/log_common.h index a17ac7f59..95463d38d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/log_common.h +++ b/drivers/gpu/nvgpu/include/nvgpu/log_common.h @@ -76,5 +76,6 @@ enum nvgpu_log_type { #define gpu_dbg_zbc BIT(35) /* Gr ZBC */ #define gpu_dbg_vab BIT(36) /* VAB */ #define gpu_dbg_runlists BIT(38) /* Runlist related debugging. */ +#define gpu_dbg_cic BIT(39) /* Interrupt Handling debugging. */ #endif diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_cic.h b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_cic.h new file mode 100644 index 000000000..886554e04 --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_cic.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2021, 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. + */ + +#ifndef NVGPU_CIC_H +#define NVGPU_CIC_H + +#include + +/** + * @file + * + * Public structs and APIs exposed by Central Interrupt Controller + * (CIC) unit. + */ + +/* + * Requires a string literal for the format - notice the string + * concatination. + */ +#define cic_dbg(g, fmt, args...) \ + nvgpu_log((g), gpu_dbg_cic, "CIC | " fmt, ##args) + +#endif /* NVGPU_CIC_H */