Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Mark debug KFD module params as unsafe

Mark options only meant to be used for debugging as unsafe so that the
kernel is tainted when they are used.

Signed-off-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Kent Russell and committed by
Alex Deucher
f2935a30 62952a38

+5 -5
+5 -5
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
··· 749 749 * assigns queues to HQDs. 750 750 */ 751 751 int sched_policy = KFD_SCHED_POLICY_HWS; 752 - module_param(sched_policy, int, 0444); 752 + module_param_unsafe(sched_policy, int, 0444); 753 753 MODULE_PARM_DESC(sched_policy, 754 754 "Scheduling policy (0 = HWS (Default), 1 = HWS without over-subscription, 2 = Non-HWS (Used for debugging only)"); 755 755 ··· 799 799 * Setting 1 enables halt on hang. 800 800 */ 801 801 int halt_if_hws_hang; 802 - module_param(halt_if_hws_hang, int, 0644); 802 + module_param_unsafe(halt_if_hws_hang, int, 0644); 803 803 MODULE_PARM_DESC(halt_if_hws_hang, "Halt if HWS hang is detected (0 = off (default), 1 = on)"); 804 804 805 805 /** ··· 808 808 * check says. Default value: false (rely on MEC2 firmware version check). 809 809 */ 810 810 bool hws_gws_support; 811 - module_param(hws_gws_support, bool, 0444); 811 + module_param_unsafe(hws_gws_support, bool, 0444); 812 812 MODULE_PARM_DESC(hws_gws_support, "Assume MEC2 FW supports GWS barriers (false = rely on FW version check (Default), true = force supported)"); 813 813 814 814 /** ··· 841 841 */ 842 842 int amdgpu_no_queue_eviction_on_vm_fault; 843 843 MODULE_PARM_DESC(no_queue_eviction_on_vm_fault, "No queue eviction on VM fault (0 = queue eviction, 1 = no queue eviction)"); 844 - module_param_named(no_queue_eviction_on_vm_fault, amdgpu_no_queue_eviction_on_vm_fault, int, 0444); 844 + module_param_named_unsafe(no_queue_eviction_on_vm_fault, amdgpu_no_queue_eviction_on_vm_fault, int, 0444); 845 845 #endif 846 846 847 847 /** ··· 849 849 */ 850 850 int amdgpu_mtype_local; 851 851 MODULE_PARM_DESC(mtype_local, "MTYPE for local memory (0 = MTYPE_RW (default), 1 = MTYPE_NC, 2 = MTYPE_CC)"); 852 - module_param_named(mtype_local, amdgpu_mtype_local, int, 0444); 852 + module_param_named_unsafe(mtype_local, amdgpu_mtype_local, int, 0444); 853 853 854 854 /** 855 855 * DOC: pcie_p2p (bool)