LoongArch: Preserve firmware configuration when desired
authorHuacai Chen <chenhuacai@loongson.cn>
Fri, 30 May 2025 13:45:48 +0000 (21:45 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Fri, 30 May 2025 13:45:48 +0000 (21:45 +0800)
commit712e6a914328e9672d534fc77edd596234ec2d7f
tree5afd7a32289d7377b73302eaa03d9bd03bc84b0f
parent52c22661c79a7b6af7fad9f77200738fc6c51878
LoongArch: Preserve firmware configuration when desired

If we must preserve the firmware resource assignments, claim the existing
resources rather than reassigning everything.

According to PCI Firmware Specification: if ACPI DSM#5 function returns
0, the OS must retain the resource allocation for PCI in the firmware; if
ACPI DSM#5 function returns 1, the OS can ignore the resource allocation
for PCI and reallocate it.

Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
Signed-off-by: Juxin Gao <gaojuxin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/pci/acpi.c