linux/drivers/gpu/drm/i915/gt
Kees Cook 189f164e57 Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses
Conversion performed via this Coccinelle script:

  // SPDX-License-Identifier: GPL-2.0-only
  // Options: --include-headers-for-types --all-includes --include-headers --keep-comments
  virtual patch

  @gfp depends on patch && !(file in "tools") && !(file in "samples")@
  identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
 		    kzalloc_obj,kzalloc_objs,kzalloc_flex,
		    kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
		    kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
  @@

  	ALLOC(...
  -		, GFP_KERNEL
  	)

  $ make coccicheck MODE=patch COCCI=gfp.cocci

Build and boot tested x86_64 with Fedora 42's GCC and Clang:

Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01

Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-22 08:26:33 -08:00
..
selftests
shaders drm/i915/gt: fix typos in i915/gt files. 2025-01-23 05:48:22 -05:00
uc Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
gen2_engine_cs.c drm/i915/irq: rename irq_mask to gen2_imr_mask 2025-09-19 10:07:12 +03:00
gen2_engine_cs.h drm/i915/gt: s/gen3/gen2/ 2024-10-15 17:49:24 +03:00
gen6_engine_cs.c drm/i915/gt: Move engine registers to their own header 2022-01-11 14:03:25 -08:00
gen6_engine_cs.h
gen6_ppgtt.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
gen6_ppgtt.h
gen6_renderstate.c
gen7_renderclear.c drm/i915: remove all IS_<PLATFORM>_GT<N>() macros 2024-10-24 13:14:37 +03:00
gen7_renderclear.h
gen7_renderstate.c
gen8_engine_cs.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
gen8_engine_cs.h drm/i915/gt: Support aux invalidation on all engines 2023-07-26 14:35:32 +02:00
gen8_ppgtt.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
gen8_ppgtt.h drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
gen8_renderstate.c
gen9_renderstate.c
hsw_clear_kernel.c
intel_breadcrumbs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_breadcrumbs.h
intel_breadcrumbs_types.h drm/i915: Track gt pm wakerefs 2023-11-20 12:36:56 +01:00
intel_context.c drm/i915: Support replaying GPU hangs with captured context image 2024-05-16 07:37:05 +00:00
intel_context.h drm/i915: Support replaying GPU hangs with captured context image 2024-05-16 07:37:05 +00:00
intel_context_param.h
intel_context_sseu.c drm/i915/lrc: move lrc_get_runtime() to intel_lrc.c 2022-02-17 15:42:09 +02:00
intel_context_types.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
intel_engine.h drm/i915: Move out engine related macros from i915_drv.h 2025-06-27 08:14:58 +02:00
intel_engine_cs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_engine_heartbeat.c Merge tag 'drm-misc-next-2025-11-05-1' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next 2025-11-07 12:41:26 +10:00
intel_engine_heartbeat.h
intel_engine_pm.c drm/i915/gt: Reset queue_priority_hint on parking 2024-03-28 12:16:16 -04:00
intel_engine_pm.h drm/i915: Move for_each_engine* out of i915_drv.h 2023-11-06 09:04:52 +00:00
intel_engine_regs.h drm/i915/pmu: Add support for gen2 2024-10-15 17:51:00 +03:00
intel_engine_stats.h
intel_engine_types.h drm/i915/gt: fix typos in i915/gt files. 2025-01-23 05:48:22 -05:00
intel_engine_user.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_engine_user.h
intel_execlists_submission.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_execlists_submission.h drm/i915: Fix up locking around dumping requests lists 2023-01-30 15:48:21 -05:00
intel_ggtt.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_ggtt_fencing.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
intel_ggtt_fencing.h
intel_ggtt_gmch.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_ggtt_gmch.h drm/i915/gt: Re-do the intel-gtt split 2022-06-22 15:52:56 -07:00
intel_gpu_commands.h drm/i915/gt: Add Wa_14019789679 2024-08-05 22:33:39 +01:00
intel_gsc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_gsc.h drm/i915/gt: reconcile Excess struct member kernel-doc warnings 2024-01-10 11:56:19 +02:00
intel_gt.c drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
intel_gt.h drm/i915/gt: remove stray declaration of intel_gt_release_all() 2024-08-17 11:24:46 +02:00
intel_gt_buffer_pool.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
intel_gt_buffer_pool.h
intel_gt_buffer_pool_types.h
intel_gt_ccs_mode.c drm/i915/gt: Fix CCS id's calculation for CCS mode setting 2024-05-29 11:35:38 +03:00
intel_gt_ccs_mode.h drm/i915/gt: Automate CCS Mode setting during engine resets 2024-05-06 14:15:24 -04:00
intel_gt_clock_utils.c drm/i915: split out i915_freq.[ch] 2025-11-21 12:11:49 +02:00
intel_gt_clock_utils.h
intel_gt_debugfs.c Merge tag 'drm-intel-gt-next-2026-01-16' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2026-01-19 13:51:10 +10:00
intel_gt_debugfs.h drm/i915/debugfs: Do not return '0' if there is nothing to return 2022-03-22 10:08:20 +00:00
intel_gt_defines.h i915/drm/gt: Move the gt defines in the gt directory 2023-08-02 15:41:31 +02:00
intel_gt_engines_debugfs.c drm/i915/gt: use designated initializers for intel_gt_debugfs_file 2026-01-01 13:14:50 +01:00
intel_gt_engines_debugfs.h
intel_gt_irq.c drm/i915/gt: fix typos in i915/gt files. 2025-01-23 05:48:22 -05:00
intel_gt_irq.h
intel_gt_mcr.c drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
intel_gt_mcr.h drm/i915: Update IP_VER(12, 50) 2024-03-22 14:14:52 -07:00
intel_gt_pm.c drm/i915: stop including display/intel_display_{core, limits}.h from i915_drv.h 2025-05-27 11:25:53 +03:00
intel_gt_pm.h drm/i915: use NULL for zero wakeref_t instead of plain integer 0 2024-10-04 10:29:24 +03:00
intel_gt_pm_debugfs.c Merge tag 'drm-intel-gt-next-2026-01-16' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2026-01-19 13:51:10 +10:00
intel_gt_pm_debugfs.h drm/i915/debugfs: Do not return '0' if there is nothing to return 2022-03-22 10:08:20 +00:00
intel_gt_pm_irq.c drm/i915/mtl: Use primary GT's irq lock for media GT 2022-09-12 15:23:12 +03:00
intel_gt_pm_irq.h
intel_gt_print.h drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
intel_gt_regs.h drm/i915: Reoder gen9+ timestamp freq register bits 2025-03-04 15:39:38 +01:00
intel_gt_requests.c drm/i915: Protect access to driver and timeline name 2025-06-13 08:26:36 +01:00
intel_gt_requests.h
intel_gt_sysfs.c drm/i915: Make kobj_type structures constant 2023-02-17 11:50:28 +02:00
intel_gt_sysfs.h drm/i915: Fix CFI violations in gt_sysfs 2022-10-27 19:14:53 +02:00
intel_gt_sysfs_pm.c drm/i915/slpc: Add sysfs for SLPC power profiles 2025-02-04 18:10:56 -05:00
intel_gt_sysfs_pm.h drm/i915/gt: Create per-tile RC6 sysfs interface 2022-03-21 08:37:42 +00:00
intel_gt_types.h drm/i915/gt: Mark the GT as dead when mmio is unreliable 2024-08-09 12:51:17 +01:00
intel_gtt.c drm/i915/gt: Remove trailing blank lines 2025-03-19 02:40:49 +01:00
intel_gtt.h drm/i915/ggtt: Add intel_ggtt_read_entry() 2025-04-02 02:17:30 +03:00
intel_hwconfig.h drm/i915/guc: Add fetch of hwconfig blob 2022-03-17 19:51:48 -07:00
intel_llc.c drm/i915/slpc: Let's fix the PCODE min freq table setup for SLPC 2022-09-06 14:51:43 -04:00
intel_llc.h
intel_llc_types.h
intel_lrc.c drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
intel_lrc.h drm/i915/perf: Fix OA filtering logic for GuC mode 2022-10-27 12:35:56 -07:00
intel_lrc_reg.h drm/i915/gt: Move engine registers to their own header 2022-01-11 14:03:25 -08:00
intel_migrate.c drm/i915/gt: fix typos in i915/gt files. 2025-01-23 05:48:22 -05:00
intel_migrate.h drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
intel_migrate_types.h
intel_mocs.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_mocs.h
intel_ppgtt.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
intel_rc6.c Merge tag 'drm-misc-next-2025-11-05-1' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next 2025-11-07 12:41:26 +10:00
intel_rc6.h drm/i915/mtl: Synchronize i915/BIOS on C6 enabling 2023-03-24 08:43:32 -07:00
intel_rc6_types.h drm/i915/mtl: Synchronize i915/BIOS on C6 enabling 2023-03-24 08:43:32 -07:00
intel_region_lmem.c pci-v6.19-changes 2025-12-04 17:29:41 -08:00
intel_region_lmem.h drm/i915: Kill the fake lmem support 2022-02-18 22:31:46 -08:00
intel_renderstate.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_renderstate.h
intel_reset.c drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
intel_reset.h drm/i915/reset: add intel_gt_gpu_reset_clobbers_display() helper 2025-03-05 12:48:22 +02:00
intel_reset_types.h drm/i915/gem: Clean-up outdated struct_mutex comments 2025-09-09 10:36:27 -04:00
intel_ring.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_ring.h drm/i915: Remove unused intel_ring_cacheline_align 2024-12-30 01:31:56 +01:00
intel_ring_submission.c drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
intel_ring_types.h
intel_rps.c drm/i915: split out i915_freq.[ch] 2025-11-21 12:11:49 +02:00
intel_rps.h drm/i915/rps: call RPS functions via the parent interface 2025-11-19 19:33:43 +02:00
intel_rps_types.h drm/i915/rps: fix stale reference to i915->irq_lock 2025-05-07 15:44:19 +03:00
intel_sa_media.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_sa_media.h drm/i915/xelpmp: Expose media as another GT 2022-09-12 15:23:12 +03:00
intel_sseu.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_sseu.h drm/i915/sseu: fix max_subslices array-index-out-of-bounds access 2023-03-13 11:38:05 +02:00
intel_sseu_debugfs.c Merge tag 'drm-intel-gt-next-2026-01-16' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2026-01-19 13:51:10 +10:00
intel_sseu_debugfs.h
intel_timeline.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_timeline.h drm/i915: split out i915_list_util.h 2025-09-12 11:08:45 +03:00
intel_timeline_types.h
intel_tlb.c drm/i915/gt: add a macro for mock gt wakeref special value and use it 2024-09-30 17:54:11 +03:00
intel_tlb.h drm/i915/gt: Use standard API for seqcount read in TLB invalidation 2025-10-31 10:58:05 +01:00
intel_wopcm.c drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
intel_wopcm.h drm/i915/gt: Fix SPDX license format 2025-03-19 02:40:19 +01:00
intel_workarounds.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
intel_workarounds.h
intel_workarounds_types.h drm/i915: Partial abandonment of legacy DRM logging macros 2022-11-10 12:35:46 +00:00
ivb_clear_kernel.c
mock_engine.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
mock_engine.h
selftest_context.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
selftest_engine.c
selftest_engine.h
selftest_engine_cs.c drm/i915: Track gt pm wakerefs 2023-11-20 12:36:56 +01:00
selftest_engine_heartbeat.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
selftest_engine_heartbeat.h
selftest_engine_pm.c drm/i915/gt: Use gt_err for GT info 2023-05-03 12:56:10 +02:00
selftest_execlists.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
selftest_gt_pm.c drm/i915: Track gt pm wakerefs 2023-11-20 12:36:56 +01:00
selftest_hangcheck.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
selftest_llc.c drm/i915: remove unnecessary intel_pm.h includes 2023-03-06 18:26:30 +02:00
selftest_llc.h
selftest_lrc.c Merge tag 'drm-intel-gt-next-2025-05-08-1' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2025-05-09 11:39:27 +10:00
selftest_migrate.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
selftest_mocs.c drm/i915: use direct alias for i915 in requests 2023-07-24 17:24:35 +02:00
selftest_rc6.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
selftest_rc6.h
selftest_reset.c drm/i915: Refactor confusing __intel_gt_reset() 2024-04-24 18:48:31 +02:00
selftest_ring.c
selftest_ring_submission.c kernel.h: drop STACK_MAGIC macro 2026-01-31 16:16:04 -08:00
selftest_rps.c drm/i915/selftest: Add throttle reason diagnostics to RPS selftests 2026-01-07 09:07:06 -08:00
selftest_rps.h
selftest_slpc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
selftest_timeline.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
selftest_tlb.c drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
selftest_workarounds.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
shmem_utils.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
shmem_utils.h drm/i915/gt: Add helper for shmem copy to iosys_map 2022-02-25 15:23:18 -08:00
st_shmem_utils.c
sysfs_engines.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sysfs_engines.h