LoongArch: Increase max supported CPUs up to 2048
authorHuacai Chen <chenhuacai@loongson.cn>
Fri, 30 May 2025 13:45:43 +0000 (21:45 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Fri, 30 May 2025 13:45:43 +0000 (21:45 +0800)
commit9559d5806319a9254d9053b22a31324e1929aac6
treeeba7489117bc2127ddb6c93fd2460ab3400fa960
parenta45728fd4120011c78af1d056e571b84d47dfcc1
LoongArch: Increase max supported CPUs up to 2048

Increase max supported CPUs up to 2048, including:
1. Increase CSR.CPUID register's effective width;
2. Define MAX_CORE_PIC (a.k.a. max physical ID) to 2048;
3. Allow NR_CPUS (a.k.a. max logical ID) to be as large as 2048;
4. Introduce acpi_numa_x2apic_affinity_init() to handle ACPI SRAT
   for CPUID >= 256.

Note: The reason of increasing to 2048 rather than 4096/8192 is because
      the IPI hardware can only support 2048 as a maximum.

Reviewed-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/Kconfig
arch/loongarch/include/asm/acpi.h
arch/loongarch/include/asm/loongarch.h
arch/loongarch/kernel/acpi.c