mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
kernel/smp: Make csdlock_debug= resettable
It is currently possible to set the csdlock_debug_enabled static branch, but not to reset it. This is an issue when several different entities supply kernel boot parameters and also for kernels built with CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT=y. Therefore, make the csdlock_debug=0 kernel boot parameter turn off debugging. Last one wins! Reported-by: Jes Sorensen <Jes.Sorensen@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Juergen Gross <jgross@suse.com> Link: https://lore.kernel.org/r/20230321005516.50558-4-paulmck@kernel.org
This commit is contained in:
committed by
Peter Zijlstra
parent
6366d062e7
commit
203e435844
11
kernel/smp.c
11
kernel/smp.c
@@ -116,11 +116,16 @@ static DEFINE_STATIC_KEY_MAYBE(CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT, csdlock_debug
|
||||
*/
|
||||
static int __init csdlock_debug(char *str)
|
||||
{
|
||||
int ret;
|
||||
unsigned int val = 0;
|
||||
|
||||
get_option(&str, &val);
|
||||
if (val)
|
||||
static_branch_enable(&csdlock_debug_enabled);
|
||||
ret = get_option(&str, &val);
|
||||
if (ret) {
|
||||
if (val)
|
||||
static_branch_enable(&csdlock_debug_enabled);
|
||||
else
|
||||
static_branch_disable(&csdlock_debug_enabled);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user