]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/pmu: Assert max gt
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 24 Jan 2025 05:04:07 +0000 (21:04 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 27 Jan 2025 16:55:03 +0000 (08:55 -0800)
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.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124050411.2189060-2-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_pmu.c

index b3da3863928af58f6372e9e7f136ec5fef745978..df93ba96bdc1ed818bb2cae7f74c6b6f7ee0c9e1 100644 (file)
@@ -249,6 +249,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);
+
        if (IS_SRIOV_VF(xe))
                return 0;