[PATCH v13 3/7] drm/xe/pmu: Assert max gt
Rodrigo Vivi
rodrigo.vivi at intel.com
Fri Jan 17 18:31:51 UTC 2025
On Thu, Jan 16, 2025 at 03:07:14PM -0800, Lucas De Marchi wrote:
> XE_PMU_MAX_GT needs to be used due to a circular dependency, but we
> should make sure it doesn't go out of sync with XE_PMU_MAX_GT. Add a
> compile check for that.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
> drivers/gpu/drm/xe/xe_pmu.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_pmu.c b/drivers/gpu/drm/xe/xe_pmu.c
> index b63f819c54d02..2312c73a3ee16 100644
> --- a/drivers/gpu/drm/xe/xe_pmu.c
> +++ b/drivers/gpu/drm/xe/xe_pmu.c
> @@ -258,6 +258,8 @@ int xe_pmu_register(struct xe_pmu *pmu)
> int ret = -ENOMEM;
> char *name;
>
> + BUILD_BUG_ON(XE_MAX_GT_PER_TILE != XE_PMU_MAX_GT);
good idea!
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> +
> if (IS_SRIOV_VF(xe))
> return 0;
>
> --
> 2.48.0
>
More information about the Intel-xe
mailing list