Commit 7bb64d50 authored by Chen Zhongjin's avatar Chen Zhongjin Committed by Zheng Zengkai
Browse files

smp: fix early_param csdlock_debug boot panic

maillist inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5EU5D?from=project-issue
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=44f2910f800ba58c2276cd96e69c456378e6212a



--------------------------------

csdlock_debug is a early_param to enable csd_lock_wait feature.

It uses static_branch_enable to control which triggers a bug on
booting time. In early_param stage static_branch_enable will call
__page_to_pfn before sparse_init.

This causes panic when CONFIG_SPARSEMEM_VMEMMAP=n on arm64, so
change early_param to __setup to avoid the problem.

Reported-by: default avatarChen jingwen <chenjingwen6@huawei.com>
Signed-off-by: default avatarChen Zhongjin <chenzhongjin@huawei.com>
Reviewed-by: default avatarXu Kuohai <xukuohai@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent b1c77b51
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -113,9 +113,9 @@ static int __init csdlock_debug(char *str)
	if (val)
		static_branch_enable(&csdlock_debug_enabled);

	return 0;
	return 1;
}
early_param("csdlock_debug", csdlock_debug);
__setup("csdlock_debug=", csdlock_debug);

static DEFINE_PER_CPU(call_single_data_t *, cur_csd);
static DEFINE_PER_CPU(smp_call_func_t, cur_csd_func);