[PATCH 2/2] 2

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 11 13:59:07 UTC 2018


---
 drivers/gpu/drm/i915/i915_pmu.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index f089a3da627d..2341b4d313e8 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -716,17 +716,18 @@ static const struct attribute_group *i915_pmu_attr_groups[] = {
 	.name = (__name), \
 }
 
-static void ignore_lockep(struct attribute *attr)
+static void attribute_lockdep(struct attribute *attr)
 {
 #if IS_ENABLED(CONFIG_DEBUG_LOCK_ALLOC)
-	attr->ignore_lockdep = true;
+	static struct lock_class_key key;
+	attr->key = &key;
 #endif
 }
 
 static struct i915_ext_attribute *
 add_i915_attr(struct i915_ext_attribute *attr, const char *name, u64 config)
 {
-	ignore_lockdep(&attr->attr.attr);
+	attribute_lockdep(&attr->attr.attr);
 	attr->attr.attr.name = name;
 	attr->attr.attr.mode = 0444;
 	attr->attr.show = i915_pmu_event_show;
@@ -739,7 +740,7 @@ static struct perf_pmu_events_attr *
 add_pmu_attr(struct perf_pmu_events_attr *attr, const char *name,
 	     const char *str)
 {
-	ignore_lockdep(&attr->attr.attr);
+	attribute_lockdep(&attr->attr.attr);
 	attr->attr.attr.name = name;
 	attr->attr.attr.mode = 0444;
 	attr->attr.show = perf_event_sysfs_show;
-- 
2.15.1



More information about the Intel-gfx-trybot mailing list