Christoph Hellwig b12d691ea5 i915: fix remap_io_sg to verify the pgprot
remap_io_sg claims that the pgprot is pre-verified using an io_mapping,
but actually does not get passed an io_mapping and just uses the pgprot in
the VMA.  Remove the apply_to_page_range abuse and just loop over
remap_pfn_range for each segment.

Note: this could use io_mapping_map_user by passing an iomap to
remap_io_sg if the maintainers can verify that the pgprot in the iomap in
the only caller is indeed the desired one here.

Link: https://lkml.kernel.org/r/20210326055505.1424432-5-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-04-30 11:20:39 -07:00
..
2021-04-27 10:16:46 -07:00
2021-04-27 13:42:11 -07:00
2021-04-28 17:22:10 -07:00
2021-04-29 11:57:23 -07:00
2021-04-26 16:21:16 -07:00
2021-04-18 09:36:56 +03:00
2021-04-28 14:39:37 -07:00
2021-04-29 11:57:23 -07:00
2021-04-26 12:11:52 -07:00
2021-04-11 19:32:06 -06:00
2021-04-28 15:54:57 -07:00
2021-04-26 12:11:52 -07:00
2021-04-28 15:59:13 -07:00
2021-04-29 11:28:08 -07:00
2021-04-26 12:11:52 -07:00
2021-04-28 15:59:13 -07:00
2021-04-27 18:09:44 -07:00
2021-04-26 15:03:23 -07:00
2021-04-28 15:59:13 -07:00
2021-04-08 19:18:07 +02:00
2021-04-26 16:32:11 -07:00
2021-04-28 15:59:13 -07:00
2021-04-29 11:28:08 -07:00
2021-04-28 14:39:37 -07:00
2021-04-28 10:01:40 -07:00
2021-04-28 15:59:13 -07:00
2021-04-27 10:16:46 -07:00
2021-04-28 15:56:51 -07:00
2021-04-27 18:09:44 -07:00
2021-04-29 11:57:23 -07:00
2021-04-13 14:50:57 -07:00
2021-04-28 14:39:37 -07:00
2021-04-29 11:57:23 -07:00
2021-04-29 11:57:23 -07:00
2021-04-29 11:57:23 -07:00
2021-04-26 12:11:52 -07:00
2021-04-28 15:59:13 -07:00
2021-04-28 15:59:13 -07:00
2021-04-08 17:38:20 +02:00
2021-04-28 15:59:13 -07:00
2021-04-29 11:57:23 -07:00
2021-04-29 11:57:23 -07:00
2021-04-26 12:11:52 -07:00
2021-04-27 10:16:46 -07:00
2021-04-29 11:57:23 -07:00
2021-04-28 17:22:10 -07:00
2021-04-26 12:11:52 -07:00
2021-04-26 15:10:25 -07:00
2021-04-28 17:22:10 -07:00
2021-04-28 17:19:47 -07:00
2021-04-28 17:22:10 -07:00
2021-04-28 16:02:58 -07:00
2021-04-28 15:59:13 -07:00
2021-04-28 17:22:10 -07:00