]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
LoongArch: Use correct API to map cmdline in relocate_kernel()
authorHuacai Chen <chenhuacai@loongson.cn>
Sat, 20 Jul 2024 14:41:07 +0000 (22:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2024 09:11:38 +0000 (11:11 +0200)
commitfd8e14122374f62cb850d44838ff8d2e5aee28ab
treed51330f681c14949cef76828f1b33e893c8e65c0
parent938acd8e3aa04b53843d03e274ac2f93501a8bea
LoongArch: Use correct API to map cmdline in relocate_kernel()

[ Upstream commit 0124fbb4c6dba23dbdf80c829be68adbccde2722 ]

fw_arg1 is in memory space rather than I/O space, so we should use
early_memremap_ro() instead of early_ioremap() to map the cmdline.
Moreover, we should unmap it after using.

Suggested-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/loongarch/kernel/relocate.c