linux/drivers/gpu/drm/amd/amdkfd
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
..
cik_event_interrupt.c drm/amdkfd: Identical code for different branches 2025-05-29 10:56:54 -04:00
cik_int.h
cik_regs.h
cwsr_trap_handler.h drm/amdkfd: gfx12.1 trap handler instruction fixup for VOP3PX 2026-01-28 16:21:21 -05:00
cwsr_trap_handler_gfx8.asm
cwsr_trap_handler_gfx9.asm drm/amdkfd: Clear MODE.VSKIP in gfx9 trap handler 2025-01-24 09:53:05 -05:00
cwsr_trap_handler_gfx10.asm drm/amdkfd: Move gfx12 trap handler to separate file 2025-01-09 16:02:56 -05:00
cwsr_trap_handler_gfx12.asm drm/amdkfd: gfx12.1 trap handler instruction fixup for VOP3PX 2026-01-28 16:21:21 -05:00
Kconfig drm/amdkfd: enable kfd on LoongArch systems 2025-07-15 14:07:50 -04:00
kfd_chardev.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
kfd_crat.c drm/amdkfd: Check for NULL return values 2026-02-19 12:16:11 -05:00
kfd_crat.h
kfd_debug.c drm/amdkfd: Check for NULL return values 2026-02-19 12:16:11 -05:00
kfd_debug.h drm/amdkfd: fix gfx11 restrictions on debugging cooperative launch 2026-01-20 21:50:12 -05:00
kfd_debugfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_device.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_device_queue_manager.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_device_queue_manager.h drm/amdkfd: Add MQD manager for GFX 12.1.0 2025-12-08 14:13:08 -05:00
kfd_device_queue_manager_cik.c drm/amdkfd: Add support for more per-process flag 2025-03-07 15:33:49 -05:00
kfd_device_queue_manager_v9.c drm/amdkfd: Correct F8_MODE for gfx950 2025-03-13 23:13:12 -04:00
kfd_device_queue_manager_v10.c drm/amdkfd: Add support for more per-process flag 2025-03-07 15:33:49 -05:00
kfd_device_queue_manager_v11.c drm/amdkfd: Add support for more per-process flag 2025-03-07 15:33:49 -05:00
kfd_device_queue_manager_v12.c drm/amdkfd: Add support for more per-process flag 2025-03-07 15:33:49 -05:00
kfd_device_queue_manager_v12_1.c drm/amdgpu: Update MES VM_CNTX_CNTL for XNACK off for GFX 12.1 2025-12-10 17:39:09 -05:00
kfd_device_queue_manager_vi.c drm/amdkfd: Add support for more per-process flag 2025-03-07 15:33:49 -05:00
kfd_doorbell.c
kfd_events.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
kfd_events.h
kfd_flat_memory.c drm/amdkfd: Switch to using GC VERSION to decide LDS/Scratch base 2026-01-14 14:28:58 -05:00
kfd_int_process_v9.c drm/amdgpu: Add poison consumption sequence numbers for gfx and sdma 2025-10-20 18:18:47 -04:00
kfd_int_process_v10.c drm/amdkfd: drop warning in event_interrupt_isr_v1*() 2025-05-13 09:34:09 -04:00
kfd_int_process_v11.c drm/amdkfd: drop warning in event_interrupt_isr_v1*() 2025-05-13 09:34:09 -04:00
kfd_int_process_v12_1.c drm/amdkfd: Add interrupt handling for GFX 12.1.0 2025-12-08 14:13:11 -05:00
kfd_interrupt.c drm/amdgpu: Show warning message if IH ring overflow 2024-12-18 12:39:07 -05:00
kfd_kernel_queue.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_kernel_queue.h
kfd_migrate.c drm for 7.0-rc1 2026-02-11 12:55:44 -08:00
kfd_migrate.h drm/amdgpu: update the functions to use amdgpu version of hmm 2025-10-13 14:14:36 -04:00
kfd_module.c drm/amdkfd: Destroy KFD debugfs after destroy KFD wq 2025-08-06 16:52:08 -04:00
kfd_mqd_manager.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_mqd_manager.h drm/amdkfd: Adjust parameter of allocate_mqd 2026-01-29 12:26:58 -05:00
kfd_mqd_manager_cik.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_mqd_manager_v9.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_mqd_manager_v10.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_mqd_manager_v11.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_mqd_manager_v12.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_mqd_manager_v12_1.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_mqd_manager_vi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_packet_manager.c drm/amdkfd: Support chain runlists of XNACK+/XNACK- 2025-05-16 13:37:29 -04:00
kfd_packet_manager_v9.c amdkfd: remove DIQ support 2025-12-08 13:56:42 -05:00
kfd_packet_manager_vi.c amdkfd: remove DIQ support 2025-12-08 13:56:42 -05:00
kfd_pm4_headers.h
kfd_pm4_headers_ai.h drm/amdkfd: Support chain runlists of XNACK+/XNACK- 2025-05-16 13:37:29 -04:00
kfd_pm4_headers_aldebaran.h drm/amdkfd: Enable processes isolation on gfx9 2024-08-20 22:08:07 -04:00
kfd_pm4_headers_vi.h
kfd_pm4_opcodes.h
kfd_priv.h Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_process.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
kfd_process_queue_manager.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_queue.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_smi_events.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_smi_events.h drm/amdkfd: add smi events for process start and end 2025-04-11 17:01:25 -04:00
kfd_svm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_svm.h drm/amdgpu: update the functions to use amdgpu version of hmm 2025-10-13 14:14:36 -04:00
kfd_topology.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kfd_topology.h drm/amdgpu: reduce the full gpu access time in amdgpu_device_init. 2025-12-08 13:56:38 -05:00
Makefile drm/amdkfd: Add interrupt handling for GFX 12.1.0 2025-12-08 14:13:11 -05:00
soc15_int.h drm/amdkfd: Check int source id for utcl2 poison event 2024-08-23 10:52:33 -04:00