[Spice-devel] [PATCH] qxl: Fix uninitialised struct field head.surface_id

2021-03-04 Thread Colin King
From: Colin Ian King The surface_id struct field in head is not being initialized and static analysis warns that this is being passed through to dev->monitors_config->heads[i] on an assignment. Clear up this warning by initializing it to zero. Addresses-Coverity: ("Uninitialized scalar variable"

[Spice-devel] [patch 5/7] drm/nouveau/device: Replace io_mapping_map_atomic_wc()

2021-03-04 Thread Thomas Gleixner
From: Thomas Gleixner Neither fbmem_peek() nor fbmem_poke() require to disable pagefaults and preemption as a side effect of io_mapping_map_atomic_wc(). Use io_mapping_map_local_wc() instead. Signed-off-by: Thomas Gleixner Cc: Ben Skeggs Cc: David Airlie Cc: Daniel Vetter Cc: dri-de...@list

[Spice-devel] [patch 3/7] highmem: Remove kmap_atomic_prot()

2021-03-04 Thread Thomas Gleixner
From: Thomas Gleixner No more users. Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: linux...@kvack.org --- include/linux/highmem-internal.h | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) --- a/include/linux/highmem-internal.h +++ b/include/linux/highmem-interna

[Spice-devel] [patch 6/7] drm/i915: Replace io_mapping_map_atomic_wc()

2021-03-04 Thread Thomas Gleixner
From: Thomas Gleixner None of these mapping requires the side effect of disabling pagefaults and preemption. Use io_mapping_map_local_wc() instead, and clean up gtt_user_read() and gtt_user_write() to use a plain copy_from_user() as the local maps are not disabling pagefaults. Signed-off-by: Th

[Spice-devel] [patch 2/7] drm/vmgfx: Replace kmap_atomic()

2021-03-04 Thread Thomas Gleixner
From: Thomas Gleixner There is no reason to disable pagefaults and preemption as a side effect of kmap_atomic_prot(). Use kmap_local_page_prot() instead and document the reasoning for the mapping usage with the given pgprot. Remove the NULL pointer check for the map. These functions return a va

[Spice-devel] [patch 4/7] drm/qxl: Replace io_mapping_map_atomic_wc()

2021-03-04 Thread Thomas Gleixner
From: Thomas Gleixner None of these mapping requires the side effect of disabling pagefaults and preemption. Use io_mapping_map_local_wc() instead, rename the related functions accordingly and clean up qxl_process_single_command() to use a plain copy_from_user() as the local maps are not disabli

[Spice-devel] [patch 0/7] drm, highmem: Cleanup io/kmap_atomic*() usage

2021-03-04 Thread Thomas Gleixner
None of the DRM usage sites of temporary mappings requires the side effects of io/kmap_atomic(), i.e. preemption and pagefault disable. Replace them with the io/kmap_local() variants, simplify the copy_to/from_user() error handling and remove the atomic variants. Thanks, tglx --- Docume

[Spice-devel] [patch 7/7] io-mapping: Remove io_mapping_map_atomic_wc()

2021-03-04 Thread Thomas Gleixner
From: Thomas Gleixner No more users. Get rid of it and remove the traces in documentation. Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: linux...@kvack.org --- Documentation/driver-api/io-mapping.rst | 22 +--- include/linux/io-mapping.h | 42 +-

[Spice-devel] [patch 1/7] drm/ttm: Replace kmap_atomic() usage

2021-03-04 Thread Thomas Gleixner
From: Thomas Gleixner There is no reason to disable pagefaults and preemption as a side effect of kmap_atomic_prot(). Use kmap_local_page_prot() instead and document the reasoning for the mapping usage with the given pgprot. Remove the NULL pointer check for the map. These functions return a va