Skip to contentSkip to conversation

perf/x86/intel/pt: Fix lockdep interaction

PATCH In review Tvrtko Ursulin 3 participants 4 messages Jun 2, 2015 – Jun 4, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf/x86/intel/pt: Fix lockdep interaction

From: Tvrtko Ursulin <[email protected]>

Since this drivers creates attributes on the heap, lockdep gets upset and disabled itself.

Fix by setting ignore_lockdep flags for problematic attributes.

Cc Alexander Shishkin <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Peter Zijlstra (Intel) <[email protected]>
Cc Michał Winiarski <[email protected]>

---
Not saying this is a right fix but lets say I am trying to force the issue. :)

---
 arch/x86/kernel/cpu/perf_event_intel_pt.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
arch/x86/kernel/cpu/perf_event_intel_pt.c +4 -3
index ffe666c..1cff27b 100644
@@ -153,9 +153,10 @@ static int __init pt_pmu_hw_init(void)
 
 		sysfs_attr_init(&de_attrs->attr.attr);
 
-		de_attr->attr.attr.mode		= S_IRUGO;
-		de_attr->attr.show		= pt_cap_show;
-		de_attr->var			= (void *)i;
+		de_attr->attr.attr.mode		  = S_IRUGO;
+		de_attr->attr.show		  = pt_cap_show;
+		de_attr->attr.attr.ignore_lockdep = 1;
+		de_attr->var			  = (void *)i;
 
 		attrs[i] = &de_attr->attr.attr;
 	}
Signature · 6 lines
2.4.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

Oops, didn't mean to send this here since it is not graphics related.

But it does happen on SKL so maybe it will be useful for someone.

Tvrtko

Quoted 28 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Since this drivers creates attributes on the heap, lockdep gets upset and disabled itself.

Fix by setting ignore_lockdep flags for problematic attributes.

Cc Alexander Shishkin <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Peter Zijlstra (Intel) <[email protected]>
Cc Michał Winiarski <[email protected]>

---
Not saying this is a right fix but lets say I am trying to force the issue. :)

---
  arch/x86/kernel/cpu/perf_event_intel_pt.c | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
arch/x86/kernel/cpu/perf_event_intel_pt.c +0 -0
index ffe666c..1cff27b 100644
@@ -153,9 +153,10 @@ static int __init pt_pmu_hw_init(void)
 
  		sysfs_attr_init(&de_attrs->attr.attr);
 

arch/x86/kernel/cpu/perf_event_intel_pt.c static int __init pt_pmu_hw_init(void) · line 162

Quoted 10 lines
arch/x86/kernel/cpu/perf_event_intel_pt.c +4 -3
-		de_attr->attr.attr.mode		= S_IRUGO;
-		de_attr->attr.show		= pt_cap_show;
-		de_attr->var			= (void *)i;
+		de_attr->attr.attr.mode		  = S_IRUGO;
+		de_attr->attr.show		  = pt_cap_show;
+		de_attr->attr.attr.ignore_lockdep = 1;
+		de_attr->var			  = (void *)i;
 
  		attrs[i] = &de_attr->attr.attr;
  	}

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Tested-by on v1 1/1
#2 lore raw
In reply to Tvrtko Ursulin

Task id: 6523 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied

PNV                                  276/276              276/276
ILK                                  303/303              303/303
SNB                 -1              315/315              314/315
IVB                                  343/343              343/343
BYT                                  287/287              287/287
BDW                                  321/321              321/321

-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*SNB igt@pm_rpm@dpms-mode-unset-non-lpsp PASS(1) DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_uncore.c:#assert_device_not_suspended[i915]()@WARNING:.* at .* assert_device_not_suspended+0x
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
In reply to Tvrtko Ursulin
Quoted 7 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Since this drivers creates attributes on the heap, lockdep gets upset and disabled itself.

Fix by setting ignore_lockdep flags for problematic attributes.

Quoted 8 lines
Cc Alexander Shishkin <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Peter Zijlstra (Intel) <[email protected]>
Cc Michał Winiarski <[email protected]>

---
Not saying this is a right fix but lets say I am trying to force the issue. :)

You're right, that's not the real problem, but thanks for reporting. :)

arch/x86/kernel/cpu/perf_event_intel_pt.c static int __init pt_pmu_hw_init(void) · line 154

Quoted 11 lines
---
 arch/x86/kernel/cpu/perf_event_intel_pt.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
arch/x86/kernel/cpu/perf_event_intel_pt.c +0 -0
index ffe666c..1cff27b 100644
@@ -153,9 +153,10 @@ static int __init pt_pmu_hw_init(void)
 
 		sysfs_attr_init(&de_attrs->attr.attr);

The real problem is this ^^^, should be

  		sysfs_attr_init(&de_attr->attr.attr);

Regards,
--
Alex
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx