LoongArch: Set CPU#0 as the io master for FDT
authorHuacai Chen <chenhuacai@loongson.cn>
Thu, 29 Jun 2023 12:58:42 +0000 (20:58 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 29 Jun 2023 12:58:42 +0000 (20:58 +0800)
ACPI systems set io masters by parsing ACPI MADT, FDT systems have no
MADT so we explicitly set CPU#0 as the io master. Otherwise CPU#0 will
be considered as hotpluggable.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kernel/smp.c

index ed167e2..a858a46 100644 (file)
@@ -210,6 +210,7 @@ static void __init fdt_smp_setup(void)
        }
 
        loongson_sysconf.nr_cpus = num_processors;
+       set_bit(0, &(loongson_sysconf.cores_io_master));
 #endif
 }