s390/setup: do not complain about parameters handled in decompressor

Currently there are several kernel command line parameters which are
only parsed and handled in decompressor and not known to the kernel.
This leads to the following error message during kernel boot:

Unknown kernel command line parameters "mem=3G nokaslr", will be passed
to user space.

To avoid confusion, register those parameters with an empty stub so that
kernel does not complain about them.

Reported-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
Vasily Gorbik 2023-02-17 14:00:54 +01:00 committed by Heiko Carstens
parent f3dd0c5337
commit 8ee0d2fb4d
1 changed files with 17 additions and 0 deletions

View File

@ -36,6 +36,23 @@
int __bootdata(is_full_image);
#define decompressor_handled_param(param) \
static int __init ignore_decompressor_param_##param(char *s) \
{ \
return 0; \
} \
early_param(#param, ignore_decompressor_param_##param)
decompressor_handled_param(mem);
decompressor_handled_param(vmalloc);
decompressor_handled_param(dfltcc);
decompressor_handled_param(noexec);
decompressor_handled_param(facilities);
decompressor_handled_param(nokaslr);
#if IS_ENABLED(CONFIG_KVM)
decompressor_handled_param(prot_virt);
#endif
static void __init reset_tod_clock(void)
{
union tod_clock clk;