Skip to content

Commit f2935a3

Browse files
kentrussellalexdeucher
authored andcommitted
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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 62952a3 commit f2935a3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ module_param_named(use_xgmi_p2p, amdgpu_use_xgmi_p2p, int, 0444);
749749
* assigns queues to HQDs.
750750
*/
751751
int sched_policy = KFD_SCHED_POLICY_HWS;
752-
module_param(sched_policy, int, 0444);
752+
module_param_unsafe(sched_policy, int, 0444);
753753
MODULE_PARM_DESC(sched_policy,
754754
"Scheduling policy (0 = HWS (Default), 1 = HWS without over-subscription, 2 = Non-HWS (Used for debugging only)");
755755

@@ -799,7 +799,7 @@ MODULE_PARM_DESC(send_sigterm,
799799
* Setting 1 enables halt on hang.
800800
*/
801801
int halt_if_hws_hang;
802-
module_param(halt_if_hws_hang, int, 0644);
802+
module_param_unsafe(halt_if_hws_hang, int, 0644);
803803
MODULE_PARM_DESC(halt_if_hws_hang, "Halt if HWS hang is detected (0 = off (default), 1 = on)");
804804

805805
/**
@@ -808,7 +808,7 @@ MODULE_PARM_DESC(halt_if_hws_hang, "Halt if HWS hang is detected (0 = off (defau
808808
* check says. Default value: false (rely on MEC2 firmware version check).
809809
*/
810810
bool hws_gws_support;
811-
module_param(hws_gws_support, bool, 0444);
811+
module_param_unsafe(hws_gws_support, bool, 0444);
812812
MODULE_PARM_DESC(hws_gws_support, "Assume MEC2 FW supports GWS barriers (false = rely on FW version check (Default), true = force supported)");
813813

814814
/**
@@ -841,15 +841,15 @@ MODULE_PARM_DESC(no_system_mem_limit, "disable system memory limit (false = defa
841841
*/
842842
int amdgpu_no_queue_eviction_on_vm_fault;
843843
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);
845845
#endif
846846

847847
/**
848848
* DOC: mtype_local (int)
849849
*/
850850
int amdgpu_mtype_local;
851851
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);
853853

854854
/**
855855
* DOC: pcie_p2p (bool)

0 commit comments

Comments
 (0)