* [PATCH] drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep
@ 2018-01-11 14:04 Chris Wilson
2018-01-11 14:12 ` Tvrtko Ursulin
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2018-01-11 14:04 UTC (permalink / raw)
To: intel-gfx
As we kmalloc our dynamic sysfs attributes, we have to give them an
external static lock_class_key for them to use with lockdep.
Fixes: 109ec558370f ("drm/i915/pmu: Only enumerate available counters in sysfs")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
drivers/gpu/drm/i915/i915_pmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index 9139bc8df82b..95ab5e28f5be 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -719,6 +719,7 @@ static const struct attribute_group *i915_pmu_attr_groups[] = {
static struct i915_ext_attribute *
add_i915_attr(struct i915_ext_attribute *attr, const char *name, u64 config)
{
+ sysfs_attr_init(&attr->attr.attr);
attr->attr.attr.name = name;
attr->attr.attr.mode = 0444;
attr->attr.show = i915_pmu_event_show;
@@ -731,6 +732,7 @@ static struct perf_pmu_events_attr *
add_pmu_attr(struct perf_pmu_events_attr *attr, const char *name,
const char *str)
{
+ sysfs_attr_init(&attr->attr.attr);
attr->attr.attr.name = name;
attr->attr.attr.mode = 0444;
attr->attr.show = perf_event_sysfs_show;
--
2.15.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep
2018-01-11 14:04 [PATCH] drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep Chris Wilson
@ 2018-01-11 14:12 ` Tvrtko Ursulin
2018-01-11 14:59 ` Chris Wilson
2018-01-11 14:39 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-01-11 16:03 ` ✗ Fi.CI.IGT: failure " Patchwork
2 siblings, 1 reply; 6+ messages in thread
From: Tvrtko Ursulin @ 2018-01-11 14:12 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On 11/01/2018 14:04, Chris Wilson wrote:
> As we kmalloc our dynamic sysfs attributes, we have to give them an
> external static lock_class_key for them to use with lockdep.
>
> Fixes: 109ec558370f ("drm/i915/pmu: Only enumerate available counters in sysfs")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
> drivers/gpu/drm/i915/i915_pmu.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> index 9139bc8df82b..95ab5e28f5be 100644
> --- a/drivers/gpu/drm/i915/i915_pmu.c
> +++ b/drivers/gpu/drm/i915/i915_pmu.c
> @@ -719,6 +719,7 @@ static const struct attribute_group *i915_pmu_attr_groups[] = {
> static struct i915_ext_attribute *
> add_i915_attr(struct i915_ext_attribute *attr, const char *name, u64 config)
> {
> + sysfs_attr_init(&attr->attr.attr);
> attr->attr.attr.name = name;
> attr->attr.attr.mode = 0444;
> attr->attr.show = i915_pmu_event_show;
> @@ -731,6 +732,7 @@ static struct perf_pmu_events_attr *
> add_pmu_attr(struct perf_pmu_events_attr *attr, const char *name,
> const char *str)
> {
> + sysfs_attr_init(&attr->attr.attr);
> attr->attr.attr.name = name;
> attr->attr.attr.mode = 0444;
> attr->attr.show = perf_event_sysfs_show;
>
You beat me to it, after I noticed the report on IRC and started
digging, just to find sysfs_attr_init, your fix arrived. Thanks!
It looks like a standard way of silencing lockdep for this case,
although I am not sure what exactly is the purpose of lock class keys in
sysfs attributes, and what this kind of defeat could also imply.
I planned to do it another loop, iterating the attr array, but I don't
see how it matters. It would be one static key versus the two. :?
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep
2018-01-11 14:04 [PATCH] drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep Chris Wilson
2018-01-11 14:12 ` Tvrtko Ursulin
@ 2018-01-11 14:39 ` Patchwork
2018-01-11 14:58 ` Chris Wilson
2018-01-11 16:03 ` ✗ Fi.CI.IGT: failure " Patchwork
2 siblings, 1 reply; 6+ messages in thread
From: Patchwork @ 2018-01-11 14:39 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep
URL : https://patchwork.freedesktop.org/series/36337/
State : success
== Summary ==
Series 36337v1 drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep
https://patchwork.freedesktop.org/api/1.0/series/36337/revisions/1/mbox/
Test debugfs_test:
Subgroup read_all_entries:
dmesg-warn -> DMESG-FAIL (fi-elk-e7500) fdo#103989
Test kms_chamelium:
Subgroup dp-edid-read:
dmesg-warn -> PASS (fi-kbl-7500u) fdo#102505
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> DMESG-WARN (fi-kbl-r) fdo#104172 +1
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102505 https://bugs.freedesktop.org/show_bug.cgi?id=102505
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:422s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:425s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:371s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:485s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:280s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:487s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:486s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:469s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:458s
fi-cnl-y2 total:288 pass:258 dwarn:3 dfail:0 fail:0 skip:27 time:535s
fi-elk-e7500 total:224 pass:168 dwarn:9 dfail:1 fail:0 skip:45
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:274s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:514s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:390s
fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:400s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:410s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:459s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:414s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:465s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:499s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:457s
fi-kbl-r total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:505s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:579s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:425s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:508s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:532s
fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:493s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:473s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:430s
fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:527s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:395s
Blacklisted hosts:
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:571s
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:471s
d9bbaa0c520357cb67793548f2817ab4de55089b drm-tip: 2018y-01m-11d-12h-31m-18s UTC integration manifest
c79818971e71 drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7649/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ✓ Fi.CI.BAT: success for drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep
2018-01-11 14:39 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-01-11 14:58 ` Chris Wilson
0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2018-01-11 14:58 UTC (permalink / raw)
To: Patchwork; +Cc: intel-gfx
Quoting Patchwork (2018-01-11 14:39:43)
> == Series Details ==
>
> Series: drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep
> URL : https://patchwork.freedesktop.org/series/36337/
> State : success
>
> == Logs ==
>
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7649/issues.html
Looks like it did the job. Thanks for double checking, and pushed,
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep
2018-01-11 14:12 ` Tvrtko Ursulin
@ 2018-01-11 14:59 ` Chris Wilson
0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2018-01-11 14:59 UTC (permalink / raw)
To: Tvrtko Ursulin, intel-gfx
Quoting Tvrtko Ursulin (2018-01-11 14:12:38)
> You beat me to it, after I noticed the report on IRC and started
> digging, just to find sysfs_attr_init, your fix arrived. Thanks!
>
> It looks like a standard way of silencing lockdep for this case,
> although I am not sure what exactly is the purpose of lock class keys in
> sysfs attributes, and what this kind of defeat could also imply.
>
> I planned to do it another loop, iterating the attr array, but I don't
> see how it matters. It would be one static key versus the two. :?
It shouldn't as far as I'm aware. I'm conscious that each static attr
has its own lockclass, but dynamic users tend to have a shared
lockclass. It shouldn't matter unless we nest the sysfs operations?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* ✗ Fi.CI.IGT: failure for drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep
2018-01-11 14:04 [PATCH] drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep Chris Wilson
2018-01-11 14:12 ` Tvrtko Ursulin
2018-01-11 14:39 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-01-11 16:03 ` Patchwork
2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-01-11 16:03 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep
URL : https://patchwork.freedesktop.org/series/36337/
State : failure
== Summary ==
Test kms_plane_multiple:
Subgroup atomic-pipe-a-tiling-none:
pass -> SKIP (shard-hsw)
Subgroup legacy-pipe-b-tiling-none:
incomplete -> PASS (shard-hsw)
Test kms_busy:
Subgroup basic-modeset-a:
pass -> SKIP (shard-snb)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
skip -> PASS (shard-hsw) fdo#101623 +2
Test kms_flip:
Subgroup vblank-vs-hang-interruptible:
pass -> INCOMPLETE (shard-hsw)
Test drv_suspend:
Subgroup fence-restore-untiled-hibernate:
skip -> FAIL (shard-hsw) fdo#103375
Test perf:
Subgroup polling:
pass -> FAIL (shard-hsw) fdo#102252
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
shard-hsw total:2605 pass:1474 dwarn:1 dfail:0 fail:9 skip:1119 time:8494s
shard-snb total:2713 pass:1309 dwarn:1 dfail:0 fail:11 skip:1392 time:7878s
Blacklisted hosts:
shard-apl total:2547 pass:1584 dwarn:1 dfail:0 fail:26 skip:934 time:11842s
shard-kbl total:2609 pass:1725 dwarn:14 dfail:0 fail:28 skip:839 time:8865s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7649/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-01-11 16:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-11 14:04 [PATCH] drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep Chris Wilson
2018-01-11 14:12 ` Tvrtko Ursulin
2018-01-11 14:59 ` Chris Wilson
2018-01-11 14:39 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-01-11 14:58 ` Chris Wilson
2018-01-11 16:03 ` ✗ Fi.CI.IGT: failure " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.