public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] perf/x86/intel/pt: Fix lockdep interaction
@ 2015-06-02 11:37 Tvrtko Ursulin
  2015-06-02 11:42 ` Tvrtko Ursulin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tvrtko Ursulin @ 2015-06-02 11:37 UTC (permalink / raw)
  To: Intel-gfx; +Cc: Alexander Shishkin, x86, Peter Zijlstra (Intel), Ingo Molnar

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

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

Fix by setting ignore_lockdep flags for problematic attributes.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: x86@kernel.org
Cc: Michał Winiarski <michal.winiarski@intel.com>
---
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(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_pt.c b/arch/x86/kernel/cpu/perf_event_intel_pt.c
index ffe666c..1cff27b 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_pt.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_pt.c
@@ -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;
 	}
-- 
2.4.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf/x86/intel/pt: Fix lockdep interaction
  2015-06-02 11:37 [PATCH] perf/x86/intel/pt: Fix lockdep interaction Tvrtko Ursulin
@ 2015-06-02 11:42 ` Tvrtko Ursulin
  2015-06-02 20:10 ` shuang.he
  2015-06-04 13:24 ` Alexander Shishkin
  2 siblings, 0 replies; 4+ messages in thread
From: Tvrtko Ursulin @ 2015-06-02 11:42 UTC (permalink / raw)
  To: Intel-gfx


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

On 06/02/2015 12:37 PM, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Since this drivers creates attributes on the heap, lockdep
> gets upset and disabled itself.
>
> Fix by setting ignore_lockdep flags for problematic attributes.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
> Cc: x86@kernel.org
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> ---
> 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(-)
>
> diff --git a/arch/x86/kernel/cpu/perf_event_intel_pt.c b/arch/x86/kernel/cpu/perf_event_intel_pt.c
> index ffe666c..1cff27b 100644
> --- a/arch/x86/kernel/cpu/perf_event_intel_pt.c
> +++ b/arch/x86/kernel/cpu/perf_event_intel_pt.c
> @@ -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;
>   	}
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf/x86/intel/pt: Fix lockdep interaction
  2015-06-02 11:37 [PATCH] perf/x86/intel/pt: Fix lockdep interaction Tvrtko Ursulin
  2015-06-02 11:42 ` Tvrtko Ursulin
@ 2015-06-02 20:10 ` shuang.he
  2015-06-04 13:24 ` Alexander Shishkin
  2 siblings, 0 replies; 4+ messages in thread
From: shuang.he @ 2015-06-02 20:10 UTC (permalink / raw)
  To: shuang.he, lei.a.liu, intel-gfx, tvrtko.ursulin

Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
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
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf/x86/intel/pt: Fix lockdep interaction
  2015-06-02 11:37 [PATCH] perf/x86/intel/pt: Fix lockdep interaction Tvrtko Ursulin
  2015-06-02 11:42 ` Tvrtko Ursulin
  2015-06-02 20:10 ` shuang.he
@ 2015-06-04 13:24 ` Alexander Shishkin
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Shishkin @ 2015-06-04 13:24 UTC (permalink / raw)
  To: Tvrtko Ursulin, Intel-gfx; +Cc: Peter Zijlstra (Intel), x86, Ingo Molnar

Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> writes:

> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Since this drivers creates attributes on the heap, lockdep
> gets upset and disabled itself.
>
> Fix by setting ignore_lockdep flags for problematic attributes.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
> Cc: x86@kernel.org
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> ---
> 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 | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/perf_event_intel_pt.c b/arch/x86/kernel/cpu/perf_event_intel_pt.c
> index ffe666c..1cff27b 100644
> --- a/arch/x86/kernel/cpu/perf_event_intel_pt.c
> +++ b/arch/x86/kernel/cpu/perf_event_intel_pt.c
> @@ -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
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-04 13:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 11:37 [PATCH] perf/x86/intel/pt: Fix lockdep interaction Tvrtko Ursulin
2015-06-02 11:42 ` Tvrtko Ursulin
2015-06-02 20:10 ` shuang.he
2015-06-04 13:24 ` Alexander Shishkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox