LoongArch: Silence the boot warning about 'nokaslr'
authorHuacai Chen <chenhuacai@loongson.cn>
Tue, 21 Nov 2023 07:03:25 +0000 (15:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2023 16:01:57 +0000 (17:01 +0100)
commit71d8348cca92fa423538df047771653bf14f7810
tree88e820b3e1c025978f8161f74fd0cd3b052eabaa
parentab3f300524697919f64ae920e904d0836b4057b0
LoongArch: Silence the boot warning about 'nokaslr'

[ Upstream commit 902d75cdf0cf0a3fb58550089ee519abf12566f5 ]

The kernel parameter 'nokaslr' is handled before start_kernel(), so we
don't need early_param() to mark it technically. But it can cause a boot
warning as follows:

Unknown kernel command line parameters "nokaslr", will be passed to user space.

When we use 'init=/bin/bash', 'nokaslr' which passed to user space will
even cause a kernel panic. So we use early_param() to mark 'nokaslr',
simply print a notice and silence the boot warning (also fix a potential
panic). This logic is similar to RISC-V.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/loongarch/kernel/relocate.c