drm/i915: Add __rcu to radix tree slot pointer
Subsystems (2)
PATCH 1/2 drm/i915: Add __rcu to radix tree slot pointer
From: Ville Syrjälä <[email protected]>
radix_tree_for_each_slot() wants an __rcu annotated pointer for the slot. So let's add the annotation.
Fixes the following sparse warnings:
i915_gem.c:2217:9: warning: incorrect type in assignment (different address spaces)
i915_gem.c:2217:9: expected void **slot
i915_gem.c:2217:9: got void [noderef] <asn:4>**
i915_gem.c:2217:9: warning: incorrect type in assignment (different address spaces)
i915_gem.c:2217:9: expected void **slot
i915_gem.c:2217:9: got void [noderef] <asn:4>**
i915_gem.c:2217:9: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:2217:9: expected void [noderef] <asn:4>**slot
i915_gem.c:2217:9: got void **slot
i915_gem.c:2217:9: warning: incorrect type in assignment (different address spaces)
i915_gem.c:2217:9: expected void **slot
i915_gem.c:2217:9: got void [noderef] <asn:4>**
--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem.c +1 -1
@@ -2212,7 +2212,7 @@ i915_gem_object_put_pages_gtt(struct drm_i915_gem_object *obj,static void __i915_gem_object_reset_page_iter (struct drm_i915_gem_object *obj) {struct radix_tree_iter iter; -void **slot; +void __rcu **slot;radix_tree_for_each_slot (slot, &obj->mm.get_page.radix, &iter,0 )radix_tree_delete (&obj->mm.get_page.radix, iter.index);
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: io unmap functions want __iomem
From: Ville Syrjälä <[email protected]>
Don't cast away the __iomem from the io_mapping functions so that sparse won't be so unhappy when we pass the pointer to the unmap functions. Instead let's move the cast to where we actually use the pointer.
Fixes the following sparse warnings:
i915_gem.c:1022:33: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:1022:33: expected void [noderef] <asn:2>*vaddr
i915_gem.c:1022:33: got void *[assigned] vaddr
i915_gem.c:1027:34: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:1027:34: expected void [noderef] <asn:2>*vaddr
i915_gem.c:1027:34: got void *[assigned] vaddr
i915_gem.c:1199:33: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:1199:33: expected void [noderef] <asn:2>*vaddr
i915_gem.c:1199:33: got void *[assigned] vaddr
i915_gem.c:1204:34: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:1204:34: expected void [noderef] <asn:2>*vaddr
i915_gem.c:1204:34: got void *[assigned] vaddr
--- drivers/gpu/drm/i915/i915_gem.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +15 -12
@@ -1013,17 +1013,20 @@ gtt_user_read(struct io_mapping *mapping, loff_t base, int offset, char __user *user_data, int length) { - void *vaddr; + void __iomem *vaddr;unsigned long unwritten;/* We can use the cpu mem copy function because this is X86. */ - vaddr = (void __force *)io_mapping_map_atomic_wc (mapping, base); - unwritten =__copy_to_user_inatomic (user_data, vaddr + offset, length); + vaddr =io_mapping_map_atomic_wc (mapping, base); + unwritten =__copy_to_user_inatomic (user_data, + (void __force *)vaddr + offset, + length);io_mapping_unmap_atomic (vaddr);if (unwritten) { - vaddr = (void __force *) -io_mapping_map_wc (mapping, base,PAGE_SIZE ); - unwritten =copy_to_user (user_data, vaddr + offset, length); + vaddr =io_mapping_map_wc (mapping, base,PAGE_SIZE ); + unwritten =copy_to_user (user_data, + (void __force *)vaddr + offset, + length);io_mapping_unmap (vaddr); }return unwritten;
@@ -1189,18 +1192,18 @@ ggtt_write(struct io_mapping *mapping, loff_t base, int offset, char __user *user_data, int length) { - void *vaddr; + void __iomem *vaddr;unsigned long unwritten;/* We can use the cpu mem copy function because this is X86. */ - vaddr = (void __force *)io_mapping_map_atomic_wc (mapping, base); - unwritten =__copy_from_user_inatomic_nocache (vaddr + offset, + vaddr =io_mapping_map_atomic_wc (mapping, base); + unwritten =__copy_from_user_inatomic_nocache ((void __force *)vaddr + offset, user_data, length);io_mapping_unmap_atomic (vaddr);if (unwritten) { - vaddr = (void __force *) -io_mapping_map_wc (mapping, base,PAGE_SIZE ); - unwritten =copy_from_user (vaddr + offset, user_data, length); + vaddr =io_mapping_map_wc (mapping, base,PAGE_SIZE ); + unwritten =copy_from_user ((void __force *)vaddr + offset, + user_data, length);io_mapping_unmap (vaddr); }
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: io unmap functions want __iomem
Quoting [email protected] (2017-09-01 18:12:52)
Quoted 21 lines
From: Ville Syrjälä <[email protected]>
Don't cast away the
__iomemfrom theio_mappingfunctions so that sparse won't be so unhappy when we pass the pointer to the unmap functions. Instead let's move the cast to where we actually use the pointer.Fixes the following sparse warnings:
i915_gem.c:1022:33: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:1022:33: expected void [noderef] <asn:2>*vaddr
i915_gem.c:1022:33: got void *[assigned] vaddr
i915_gem.c:1027:34: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:1027:34: expected void [noderef] <asn:2>*vaddr
i915_gem.c:1027:34: got void *[assigned] vaddr
i915_gem.c:1199:33: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:1199:33: expected void [noderef] <asn:2>*vaddr
i915_gem.c:1199:33: got void *[assigned] vaddr
i915_gem.c:1204:34: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:1204:34: expected void [noderef] <asn:2>*vaddr
i915_gem.c:1204:34: got void *[assigned] vaddr
Quoted 2 lines
Cc Chris Wilson <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>
6 of one, half a dozen of the other. We need to do the __force cast somewhere, so whichever is more convenient.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: io unmap functions want __iomem
Quoted 22 lines · Chris Wilson
Quoting [email protected] (2017-09-01 18:12:52)
Quoted 21 lines
From: Ville Syrjälä <[email protected]>
Don't cast away the
__iomemfrom theio_mappingfunctions so that sparse won't be so unhappy when we pass the pointer to the unmap functions. Instead let's move the cast to where we actually use the pointer.Fixes the following sparse warnings:
i915_gem.c:1022:33: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:1022:33: expected void [noderef] <asn:2>*vaddr
i915_gem.c:1022:33: got void *[assigned] vaddr
i915_gem.c:1027:34: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:1027:34: expected void [noderef] <asn:2>*vaddr
i915_gem.c:1027:34: got void *[assigned] vaddr
i915_gem.c:1199:33: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:1199:33: expected void [noderef] <asn:2>*vaddr
i915_gem.c:1199:33: got void *[assigned] vaddr
i915_gem.c:1204:34: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:1204:34: expected void [noderef] <asn:2>*vaddr
i915_gem.c:1204:34: got void *[assigned] vaddr
Quoted 6 lines
Quoted 2 lines
Cc Chris Wilson <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>6 of one, half a dozen of the other. We need to do the
__forcecast somewhere, so whichever is more convenient.Reviewed-by Chris Wilson <[email protected]>
Thanks. Series pushed to dinq.
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Add __rcu to radix tree slot pointer
In reply to [email protected]== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Add __rcu to radix tree slot pointer
URL : https://patchwork.freedesktop.org/series/29716/
State : success
== Summary ==
Series 29716v1 series starting with [1/2] drm/i915: Add __rcu to radix tree slot pointer
https://patchwork.freedesktop.org/api/1.0/series/29716/revisions/1/mbox/
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-legacy:
fail -> PASS (fi-snb-2600) fdo#100215
Test kms_flip:
Subgroup basic-flip-vs-modeset:
skip -> PASS (fi-skl-x1585l) fdo#101781fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fdo#101781 https://bugs.freedesktop.org/show_bug.cgi?id=101781
fi-bdw-5557u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:454s fi-blb-e6850 total:288 pass:224 dwarn:1 dfail:0 fail:0 skip:63 time:357s fi-bsw-n3050 total:288 pass:243 dwarn:0 dfail:0 fail:0 skip:45 time:554s fi-bwr-2160 total:288 pass:184 dwarn:0 dfail:0 fail:0 skip:104 time:254s fi-bxt-j4205 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:521s fi-byt-j1900 total:288 pass:254 dwarn:1 dfail:0 fail:0 skip:33 time:529s fi-byt-n2820 total:288 pass:250 dwarn:1 dfail:0 fail:0 skip:37 time:516s fi-elk-e7500 total:288 pass:230 dwarn:0 dfail:0 fail:0 skip:58 time:439s fi-glk-2a total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:611s fi-hsw-4770 total:288 pass:263 dwarn:0 dfail:0 fail:0 skip:25 time:445s fi-hsw-4770r total:288 pass:263 dwarn:0 dfail:0 fail:0 skip:25 time:425s fi-ilk-650 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:427s fi-ivb-3520m total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:509s fi-ivb-3770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:477s fi-kbl-7500u total:288 pass:264 dwarn:1 dfail:0 fail:0 skip:23 time:519s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:595s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:601s fi-pnv-d510 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:520s fi-skl-6260u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:470s fi-skl-6700k total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:535s fi-skl-6770hq total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:495s fi-skl-gvtdvm total:288 pass:266 dwarn:0 dfail:0 fail:0 skip:22 time:443s fi-skl-x1585l total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:510s fi-snb-2520m total:288 pass:251 dwarn:0 dfail:0 fail:0 skip:37 time:549s fi-snb-2600 total:288 pass:249 dwarn:0 dfail:0 fail:1 skip:38 time:413s
fi-bdw-gvtdvm failed to connect after reboot
de9e73663a51fb7f849ef13ddb3338a20d91970c drm-tip: 2017y-09m-01d-17h-32m-40s UTC integration manifest aafa46dd9ffa drm/i915: io unmap functions want __iomem388ec38e1b57 drm/i915: Add __rcu to radix tree slot pointer
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5570/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting [email protected] (2017-09-01 18:12:51)
Quoted 19 lines
From: Ville Syrjälä <[email protected]>
radix_tree_for_each_slot()wants an__rcuannotated pointer for the slot. So let's add the annotation.Fixes the following sparse warnings:
i915_gem.c:2217:9: warning: incorrect type in assignment (different address spaces)
i915_gem.c:2217:9: expected void **slot
i915_gem.c:2217:9: got void [noderef] <asn:4>**
i915_gem.c:2217:9: warning: incorrect type in assignment (different address spaces)
i915_gem.c:2217:9: expected void **slot
i915_gem.c:2217:9: got void [noderef] <asn:4>**
i915_gem.c:2217:9: warning: incorrect type in argument 1 (different address spaces)
i915_gem.c:2217:9: expected void [noderef] <asn:4>**slot
i915_gem.c:2217:9: got void **slot
i915_gem.c:2217:9: warning: incorrect type in assignment (different address spaces)
i915_gem.c:2217:9: expected void **slot
i915_gem.c:2217:9: got void [noderef] <asn:4>**
Quoted 3 lines
Cc Chris Wilson <[email protected]>Fixes 96d776345277 ("drm/i915: Use a radixtree for random access to the object's backing storage")Signed-off-by Ville Syrjälä <[email protected]>
Looks ok,
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: Add __rcu to radix tree slot pointer
In reply to [email protected]== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Add __rcu to radix tree slot pointer
URL : https://patchwork.freedesktop.org/series/29716/
State : success
== Summary ==
shard-hsw total:2263 pass:1232 dwarn:0 dfail:0 fail:15 skip:1015 time:9492s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5570/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx