[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H7mHVntjCYkq3fdJG5f0JLvSWAS16cwvEAAbT8u0FzNCg@mail.gmail.com>
Date: Wed, 7 May 2025 18:20:03 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Yanteng Si <si.yanteng@...ux.dev>
Cc: Huacai Chen <chenhuacai@...ngson.cn>, loongarch@...ts.linux.dev,
Xuefeng Li <lixuefeng@...ngson.cn>, Guo Ren <guoren@...nel.org>,
Xuerui Wang <kernel@...0n.name>, Jiaxun Yang <jiaxun.yang@...goat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] LoongArch: Increase max supported CPUs up to 2048
On Wed, May 7, 2025 at 6:07 PM Yanteng Si <si.yanteng@...ux.dev> wrote:
>
> 在 5/7/25 3:34 PM, Huacai Chen 写道:
> > 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.
> >
> > Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
> > ---
> > arch/loongarch/Kconfig | 6 ++--
> > arch/loongarch/include/asm/acpi.h | 2 +-
> > arch/loongarch/include/asm/loongarch.h | 4 +--
> > arch/loongarch/kernel/acpi.c | 41 ++++++++++++++++++++++----
> > 4 files changed, 41 insertions(+), 12 deletions(-)
> >
> > diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> > index 38706186cf13..0c356de91bc4 100644
> > --- a/arch/loongarch/Kconfig
> > +++ b/arch/loongarch/Kconfig
> > @@ -496,10 +496,10 @@ config HOTPLUG_CPU
> > Say N if you want to disable CPU hotplug.
> >
>
> > config NR_CPUS
> > - int "Maximum number of CPUs (2-256)"
> > - range 2 256
> > + int "Maximum number of CPUs (2-2048)"
> > + range 2 2048
> > + default "2048"
> I'm curious. As a new architecture, why did you write
> such a small value at the beginning?
Good question. Just because there are many limits at the beginning,
hardware register, irqchips, acpi tables, and so on.
Huacai
>
>
> Reviewed-by: Yanteng Si <si.yanteng@...ux.dev>
>
> Thanks,
> Yanteng
>
Powered by blists - more mailing lists