mirror-linux/drivers/gpu/drm/i915
Linus Torvalds fdcbb1bc06 Merge branch 'nocache-cleanup'
This series cleans up some of the special user copy functions naming and
semantics.  In particular, get rid of the (very traditional) double
underscore names and behavior: the whole "optimize away the range check"
model has been largely excised from the other user accessors because
it's so subtle and can be unsafe, but also because it's just not a
relevant optimization any more.

To do that, a couple of drivers that misused the "user" copies as kernel
copies in order to get non-temporal stores had to be fixed up, but that
kind of code should never have been allowed anyway.

The x86-only "nocache" version was also renamed to more accurately
reflect what it actually does.

This was all done because I looked at this code due to a report by Jann
Horn, and I just couldn't stand the inconsistent naming, the horrible
semantics, and the random misuse of these functions.  This code should
probably be cleaned up further, but it's at least slightly closer to
normal semantics.

I had a more intrusive series that went even further in trying to
normalize the semantics, but that ended up hitting so many other
inconsistencies between different architectures in this area (eg
'size_t' vs 'unsigned long' vs 'int' as size arguments, and various
iovec check differences that Vasily Gorbik pointed out) that I ended up
with this more limited version that fixed the worst of the issues.

Reported-by: Jann Horn <jannh@google.com>
Tested-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/all/CAHk-=wgg1QVWNWG-UCFo1hx0zqrPnB3qhPzUTrWNft+MtXQXig@mail.gmail.com/

* nocache-cleanup:
  x86-64/arm64/powerpc: clean up and rename __copy_from_user_flushcache
  x86: rename and clean up __copy_from_user_inatomic_nocache()
  x86-64: rename misleadingly named '__copy_user_nocache()' function
2026-04-13 08:39:51 -07:00
..
display drm/i915/psr: Do not use pipe_src as borders for SU area 2026-04-07 10:41:44 +03:00
gem drm/i915/gem: Drop check for changed VM in EXECBUF 2026-04-09 12:57:15 +03:00
gt drm/i915/gt: fix refcount underflow in intel_engine_park_heartbeat 2026-04-08 14:31:16 +03:00
gvt Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pxp Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
selftests Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
.gitignore
Kconfig
Kconfig.debug drm/i915: Fix selecting CONFIG_DRM_KUNIT_TEST in debug builds 2025-07-25 11:41:55 +03:00
Kconfig.profile
Makefile drm for 7.0-rc1 2026-02-11 12:55:44 -08:00
TODO.txt
i915_active.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_active.h
i915_active_types.h
i915_cmd_parser.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
i915_cmd_parser.h
i915_config.c drm/i915: drop i915 param from i915_fence{, _context}_timeout() 2025-12-30 21:41:15 +02:00
i915_config.h drm/i915: drop i915 param from i915_fence{, _context}_timeout() 2025-12-30 21:41:15 +02:00
i915_debugfs.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_debugfs.h
i915_debugfs_params.c drm/i915: use drm->debugfs_root for creating debugfs files 2025-08-07 11:30:26 +03:00
i915_debugfs_params.h
i915_deps.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
i915_deps.h
i915_display_pc8.c drm/i915/pc8: Add parent interface for PC8 forcewake tricks 2025-12-19 21:28:48 +02:00
i915_display_pc8.h drm/i915/pc8: Add parent interface for PC8 forcewake tricks 2025-12-19 21:28:48 +02:00
i915_driver.c drm/{i915, xe}: move initial plane calls to parent interface 2025-12-22 15:09:22 +02:00
i915_driver.h drm/{i915, xe}/display: pass parent interface to display probe 2025-11-03 11:55:19 +02:00
i915_drm_client.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_drm_client.h
i915_drv.h Beyond Display related: 2025-12-27 16:27:04 +10:00
i915_edram.c drm/i915/edram: extract i915_edram.[ch] for edram detection 2025-11-21 12:11:14 +02:00
i915_edram.h drm/i915/edram: extract i915_edram.[ch] for edram detection 2025-11-21 12:11:14 +02:00
i915_file_private.h
i915_freq.c drm/i915: split out i915_freq.[ch] 2025-11-21 12:11:49 +02:00
i915_freq.h drm/i915: split out i915_freq.[ch] 2025-11-21 12:11:49 +02:00
i915_gem.c Merge branch 'nocache-cleanup' 2026-04-13 08:39:51 -07:00
i915_gem.h drm/i915: move GEM_QUIRK_PIN_SWIZZLED_PAGES to i915_gem.h 2025-06-27 08:15:32 +02:00
i915_gem_evict.c
i915_gem_evict.h
i915_gem_gtt.c
i915_gem_gtt.h
i915_gem_ww.c
i915_gem_ww.h
i915_getparam.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_getparam.h
i915_gmch.c drm/i915/gmch: split out i915_gmch.[ch] from soc 2025-11-21 12:12:32 +02:00
i915_gmch.h drm/i915/gmch: split out i915_gmch.[ch] from soc 2025-11-21 12:12:32 +02:00
i915_gpu_error.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
i915_gpu_error.h drm/i915/guc: Include the GuC registers in the error state 2025-09-11 11:28:02 -07:00
i915_gtt_view_types.h
i915_hdcp_gsc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_hdcp_gsc.h drm/{i915,xe}/hdcp: use parent interface for HDCP GSC calls 2025-11-28 10:44:51 +02:00
i915_hwmon.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_hwmon.h
i915_initial_plane.c drm/i915: drop dependency on struct intel_display from i915 initial plane 2025-12-22 15:09:23 +02:00
i915_initial_plane.h drm/{i915, xe}: move initial plane calls to parent interface 2025-12-22 15:09:22 +02:00
i915_ioc32.c
i915_ioc32.h
i915_ioctl.c
i915_ioctl.h
i915_iosf_mbi.h
i915_irq.c drm/{i915,xe}/display: move irq calls to parent interface 2025-11-19 19:33:43 +02:00
i915_irq.h drm/{i915,xe}/display: move irq calls to parent interface 2025-11-19 19:33:43 +02:00
i915_jiffies.h drm/i915: split out separate files for jiffies timeout and wait helpers 2025-10-31 13:08:48 +02:00
i915_list_util.h drm/i915: split out i915_list_util.h 2025-09-12 11:08:45 +03:00
i915_memcpy.c
i915_memcpy.h
i915_mitigations.c
i915_mitigations.h
i915_mm.c drm/i915: track_pfn() -> "pfnmap tracking" 2025-05-22 14:55:37 -07:00
i915_mm.h
i915_mmio_range.c drm/i915: move and rename reg_in_range_table 2025-10-16 15:20:56 -04:00
i915_mmio_range.h drm/i915: move and rename reg_in_range_table 2025-10-16 15:20:56 -04:00
i915_module.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_panic.c drm/{i915, xe}/panic: move panic handling to parent interface 2025-12-12 15:17:58 +02:00
i915_panic.h drm/{i915, xe}/panic: move panic handling to parent interface 2025-12-12 15:17:58 +02:00
i915_params.c drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
i915_params.h drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
i915_pci.c drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
i915_pci.h
i915_perf.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_perf.h
i915_perf_oa_regs.h
i915_perf_types.h
i915_pmu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_pmu.h
i915_priolist_types.h
i915_ptr_util.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
i915_pvinfo.h
i915_query.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_query.h
i915_reg.h drm/i915/dram: Add field ecc_impacting_de_bw 2025-11-06 18:23:18 -03:00
i915_reg_defs.h drm/i915/reg_defs: Add REG_FIELD_MAX wrapper for FIELD_MAX() 2025-09-25 18:38:19 +05:30
i915_request.c drm/i915: drop i915 param from i915_fence{, _context}_timeout() 2025-12-30 21:41:15 +02:00
i915_request.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
i915_scatterlist.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
i915_scatterlist.h
i915_scheduler.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_scheduler.h
i915_scheduler_types.h
i915_selftest.h kernel.h: drop STACK_MAGIC macro 2026-01-31 16:16:04 -08:00
i915_sw_fence.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
i915_sw_fence.h
i915_sw_fence_work.c
i915_sw_fence_work.h
i915_switcheroo.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_switcheroo.h
i915_syncmap.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_syncmap.h
i915_sysfs.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_sysfs.h
i915_tasklet.h
i915_timer_util.c drm/i915: split out i915_timer_util.[ch] 2025-09-12 11:08:45 +03:00
i915_timer_util.h drm/i915: split out i915_timer_util.[ch] 2025-09-12 11:08:45 +03:00
i915_trace.h
i915_trace_points.c
i915_ttm_buddy_manager.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_ttm_buddy_manager.h
i915_user_extensions.c
i915_user_extensions.h
i915_utils.c drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
i915_utils.h drm/i915/utils: drop unnecessary ifdefs 2025-12-30 21:41:17 +02:00
i915_vgpu.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_vgpu.h
i915_vma.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_vma.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
i915_vma_resource.c
i915_vma_resource.h
i915_vma_types.h
i915_wait_util.h drm/i915: Order OP vs. timeout correctly in __wait_for() 2026-03-23 09:06:40 +02:00
intel_clock_gating.c drm/i915: use struct drm_device for clock gating funcs 2025-11-25 16:32:10 +02:00
intel_clock_gating.h drm/i915: use struct drm_device for clock gating funcs 2025-11-25 16:32:10 +02:00
intel_cpu_info.c
intel_cpu_info.h
intel_device_info.c
intel_device_info.h
intel_gvt.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
intel_gvt.h
intel_gvt_mmio_table.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
intel_mchbar_regs.h drm/i915/dram: Fix ICL DIMM_S decoding 2025-11-19 18:55:57 +02:00
intel_memory_region.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_memory_region.h drm/i915: Fix format string truncation warning 2025-12-09 15:53:12 +02:00
intel_pci_config.h
intel_pcode.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_pcode.h drm/i915/pcode: add struct drm_device based interface 2025-06-23 21:45:16 +03:00
intel_region_ttm.c drm/ttm: Replace multiple booleans with flags in device init 2025-10-31 09:14:35 +00:00
intel_region_ttm.h
intel_runtime_pm.c drm/i915/display: Runtime pm wrappers for display parent interface 2025-11-03 11:55:21 +02:00
intel_runtime_pm.h drm/i915/display: Runtime pm wrappers for display parent interface 2025-11-03 11:55:21 +02:00
intel_step.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_step.h
intel_uncore.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_uncore.h drm/i915: move and rename reg_in_range_table 2025-10-16 15:20:56 -04:00
intel_uncore_trace.c
intel_uncore_trace.h
intel_wakeref.c drm/i915/wakeref: clean up INTEL_WAKEREF_PUT_* flag macros 2025-12-16 14:04:22 +02:00
intel_wakeref.h drm/i915/wakeref: clean up INTEL_WAKEREF_PUT_* flag macros 2025-12-16 14:04:22 +02:00
vlv_iosf_sb.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
vlv_iosf_sb.h drm/i915: rename VLV IOSF SB ports parameter to unit_mask 2025-05-13 10:26:45 +03:00
vlv_iosf_sb_reg.h drm/i915: rename vlv_sideband*.[ch] to vlv_iosf_sb*.[ch] 2025-05-13 10:26:44 +03:00
vlv_suspend.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vlv_suspend.h