✗ CI.checkpatch: warning for drm/xe/pmu: PMU interface for Xe (rev15)
Patchwork
patchwork at emeril.freedesktop.org
Thu Jan 23 04:29:42 UTC 2025
== Series Details ==
Series: drm/xe/pmu: PMU interface for Xe (rev15)
URL : https://patchwork.freedesktop.org/series/139121/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
30ab6715fc09baee6cc14cb3c89ad8858688d474
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 00700d09d75562251cd9a37cc6602209f56a9a39
Author: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
Date: Wed Jan 22 20:19:23 2025 -0800
drm/xe/pmu: Add GT C6 events
Provide a PMU interface for GT C6 residency counters. The interface is
similar to the one available for i915, but gt is passed in the config
when creating the event.
Sample usage and output:
$ perf list | grep gt-c6
xe_0000_00_02.0/gt-c6-residency/ [Kernel PMU event]
$ tail /sys/bus/event_source/devices/xe_0000_00_02.0/events/gt-c6-residency*
==> /sys/bus/event_source/devices/xe_0000_00_02.0/events/gt-c6-residency <==
event=0x01
==> /sys/bus/event_source/devices/xe_0000_00_02.0/events/gt-c6-residency.unit <==
ms
$ perf stat -e xe_0000_00_02.0/gt-c6-residency,gt=0/ -I1000
# time counts unit events
1.001196056 1,001 ms xe_0000_00_02.0/gt-c6-residency,gt=0/
2.005216219 1,003 ms xe_0000_00_02.0/gt-c6-residency,gt=0/
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
Reviewed-by: Riana Tauro <riana.tauro at intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
+ /mt/dim checkpatch db7cf8d52a41001ea2780cf834fed3dc490343d2 drm-intel
d4a79374a3ca drm/xe/pmu: Enable PMU interface
-:75: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#75:
new file mode 100644
total: 0 errors, 1 warnings, 0 checks, 381 lines checked
ee337a2ffa5b drm/xe/pmu: Assert max gt
203dc6e52c8a drm/xe/pmu: Extract xe_pmu_event_update()
d7dec9b7f29b drm/xe/pmu: Add attribute skeleton
-:52: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name_' - possible side-effects?
#52: FILE: drivers/gpu/drm/xe/xe_pmu.c:225:
+#define XE_EVENT_ATTR(name_, v_, id_, unit_) \
+ PMU_EVENT_ATTR(name_, pmu_event_ ## v_, id_, event_attr_show) \
+ PMU_EVENT_ATTR_STRING(name_.unit, pmu_event_unit_ ## v_, unit_) \
+ static struct attribute *pmu_attr_ ##v_[] = { \
+ &pmu_event_ ##v_.attr.attr, \
+ &pmu_event_unit_ ##v_.attr.attr, \
+ NULL \
+ }; \
+ static umode_t is_visible_##v_(struct kobject *kobj, \
+ struct attribute *attr, int idx) \
+ { \
+ struct perf_pmu_events_attr *pmu_attr; \
+ struct xe_pmu *pmu; \
+ \
+ pmu_attr = container_of(attr, typeof(*pmu_attr), attr.attr); \
+ pmu = container_of(dev_get_drvdata(kobj_to_dev(kobj)), \
+ typeof(*pmu), base); \
+ \
+ return event_supported(pmu, 0, id_) ? attr->mode : 0; \
+ } \
+ static const struct attribute_group pmu_group_ ##v_ = { \
+ .name = "events", \
+ .attrs = pmu_attr_ ## v_, \
+ .is_visible = is_visible_ ## v_, \
+ }
-:52: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'id_' - possible side-effects?
#52: FILE: drivers/gpu/drm/xe/xe_pmu.c:225:
+#define XE_EVENT_ATTR(name_, v_, id_, unit_) \
+ PMU_EVENT_ATTR(name_, pmu_event_ ## v_, id_, event_attr_show) \
+ PMU_EVENT_ATTR_STRING(name_.unit, pmu_event_unit_ ## v_, unit_) \
+ static struct attribute *pmu_attr_ ##v_[] = { \
+ &pmu_event_ ##v_.attr.attr, \
+ &pmu_event_unit_ ##v_.attr.attr, \
+ NULL \
+ }; \
+ static umode_t is_visible_##v_(struct kobject *kobj, \
+ struct attribute *attr, int idx) \
+ { \
+ struct perf_pmu_events_attr *pmu_attr; \
+ struct xe_pmu *pmu; \
+ \
+ pmu_attr = container_of(attr, typeof(*pmu_attr), attr.attr); \
+ pmu = container_of(dev_get_drvdata(kobj_to_dev(kobj)), \
+ typeof(*pmu), base); \
+ \
+ return event_supported(pmu, 0, id_) ? attr->mode : 0; \
+ } \
+ static const struct attribute_group pmu_group_ ##v_ = { \
+ .name = "events", \
+ .attrs = pmu_attr_ ## v_, \
+ .is_visible = is_visible_ ## v_, \
+ }
-:78: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV)
#78: FILE: drivers/gpu/drm/xe/xe_pmu.c:251:
+XE_EVENT_ATTR(gt-c6-residency, gt_c6_residency, XE_PMU_EVENT_GT_C6_RESIDENCY, "ms");
^
-:78: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV)
#78: FILE: drivers/gpu/drm/xe/xe_pmu.c:251:
+XE_EVENT_ATTR(gt-c6-residency, gt_c6_residency, XE_PMU_EVENT_GT_C6_RESIDENCY, "ms");
^
total: 0 errors, 0 warnings, 4 checks, 107 lines checked
6fe58c0bd499 drm/xe/pmu: Get/put runtime pm on event init
00700d09d755 drm/xe/pmu: Add GT C6 events
-:15: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#15:
$ tail /sys/bus/event_source/devices/xe_0000_00_02.0/events/gt-c6-residency*
total: 0 errors, 1 warnings, 0 checks, 35 lines checked
More information about the Intel-xe
mailing list