From: Haibo Xu <haibo1.xu@intel.com>
Cc: "Alison Schofield" <alison.schofield@intel.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"Björn Töpel" <bjorn@rivosinc.com>,
"Conor Dooley" <conor.dooley@microchip.com>,
"Guo Ren" <guoren@kernel.org>,
"Jisheng Zhang" <jszhang@kernel.org>,
"James Morse" <james.morse@arm.com>,
linux-riscv@lists.infradead.org,
"Ard Biesheuvel" <ardb@kernel.org>,
"Haibo Xu" <haibo1.xu@intel.com>, "Baoquan He" <bhe@redhat.com>,
acpica-devel@lists.linux.dev,
"Robert Moore" <robert.moore@intel.com>,
linux-acpi@vger.kernel.org,
"Sami Tolvanen" <samitolvanen@google.com>,
"Greentime Hu" <greentime.hu@sifive.com>,
"Len Brown" <lenb@kernel.org>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Alexandre Ghiti" <alexghiti@rivosinc.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Yang Li" <yang.lee@linux.alibaba.com>,
"Dan Williams" <dan.j.williams@intel.com>,
"Chen Jiahao" <chenjiahao16@huawei.com>,
"Yuntao Wang" <ytcoode@gmail.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Clément Léger" <cleger@rivosinc.com>,
xiaobo55x@gmail.com, "Anup Patel" <apatel@ventanamicro.com>,
"Tony Luck" <tony.luck@intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org,
"Samuel Holland" <samuel.holland@sifive.com>,
"Evan Green" <evan@rivosinc.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
ajones@ventanamicro.com
Subject: [PATCH 0/4] Add ACPI NUMA support for RISC-V
Date: Wed, 31 Jan 2024 10:31:57 +0800 [thread overview]
Message-ID: <cover.1706603678.git.haibo1.xu@intel.com> (raw)
This patch series enable RISC-V ACPI NUMA support which was based on
the recently approved ACPI ECR[1].
Patch 1/4 is generated from the acpica PR[2] and should be merged through
the acpica project. Due to this dependency, other 3 patches can only be
merged after the corresponding ACPICA patch was pulled into linux.
Patch 2/4 add the common SRAT RINTC affinity structure handler.
Patch 3/4 add RISC-V specific acpi_numa.c file to parse NUMA information
from SRAT and SLIT ACPI tables.
Patch 4/4 add corresponding ACPI_NUMA config for RISC-V Kconfig.
Based-on: https://github.com/linux-riscv/linux-riscv/tree/for-next
[1] https://mantis.uefi.org/mantis/view.php?id=2433
[2] https://github.com/acpica/acpica/pull/926
Testing:
Since the ACPI AIA/PLIC support patch set is still under upstream review,
hence it is tested using the poll based HVC SBI console and RAM disk.
1) Build latest Qemu with the following patch backported
https://lore.kernel.org/all/20240129094200.3581037-1-haibo1.xu@intel.com/
https://github.com/vlsunil/qemu/commit/42bd4eeefd5d4410a68f02d54fee406d8a1269b0
2) Build latest EDK-II
https://github.com/tianocore/edk2/blob/master/OvmfPkg/RiscVVirt/README.md
3) Build Linux with the following configs enabled
CONFIG_RISCV_SBI_V01=y
CONFIG_SERIAL_EARLYCON_RISCV_SBI=y
CONFIG_HVC_RISCV_SBI=y
4) Build buildroot rootfs.cpio
5) Launch the Qemu machine
qemu-system-riscv64 -nographic \
-machine virt,pflash0=pflash0,pflash1=pflash1 -smp 4 -m 8G \
-blockdev node-name=pflash0,driver=file,read-only=on,filename=RISCV_VIRT_CODE.fd \
-blockdev node-name=pflash1,driver=file,filename=RISCV_VIRT_VARS.fd \
-object memory-backend-ram,size=4G,id=m0 \
-object memory-backend-ram,size=4G,id=m1 \
-numa node,memdev=m0,cpus=0-1,nodeid=0 \
-numa node,memdev=m1,cpus=2-3,nodeid=1 \
-numa dist,src=0,dst=1,val=30 \
-kernel linux/arch/riscv/boot/Image \
-initrd buildroot/output/images/rootfs.cpio \
-append "root=/dev/ram ro console=hvc0 earlycon=sbi"
[ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x80000000-0x17fffffff]
[ 0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x180000000-0x27fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x17fe3bc40-0x17fe3cfff]
[ 0.000000] NUMA: NODE_DATA [mem 0x27fff4c40-0x27fff5fff]
...
[ 0.000000] ACPI: NUMA: SRAT: PXM 0 -> HARTID 0x0 -> Node 0
[ 0.000000] ACPI: NUMA: SRAT: PXM 0 -> HARTID 0x1 -> Node 0
[ 0.000000] ACPI: NUMA: SRAT: PXM 1 -> HARTID 0x2 -> Node 1
[ 0.000000] ACPI: NUMA: SRAT: PXM 1 -> HARTID 0x3 -> Node 1
Haibo Xu (4):
ACPICA: SRAT: Add RISC-V RINTC affinity structure
ACPI: NUMA: Add handler for SRAT RINTC affinity structure
ACPI: RISCV: Add NUMA support based on SRAT and SLIT
ACPI: RISCV: Enable ACPI based NUMA
arch/riscv/Kconfig | 1 +
arch/riscv/include/asm/acpi.h | 15 +++-
arch/riscv/kernel/Makefile | 1 +
arch/riscv/kernel/acpi.c | 5 --
arch/riscv/kernel/acpi_numa.c | 133 ++++++++++++++++++++++++++++++++++
arch/riscv/kernel/setup.c | 4 +-
arch/riscv/kernel/smpboot.c | 2 -
drivers/acpi/numa/Kconfig | 2 +-
drivers/acpi/numa/srat.c | 35 ++++++++-
include/acpi/actbl3.h | 18 ++++-
include/linux/acpi.h | 7 ++
11 files changed, 209 insertions(+), 14 deletions(-)
create mode 100644 arch/riscv/kernel/acpi_numa.c
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2024-01-31 2:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 2:31 Haibo Xu [this message]
2024-01-31 2:31 ` [PATCH 1/4] ACPICA: SRAT: Add RISC-V RINTC affinity structure Haibo Xu
2024-02-12 13:31 ` Rafael J. Wysocki
2024-02-18 7:18 ` Haibo Xu
2024-01-31 2:31 ` [PATCH 2/4] ACPI: NUMA: Add handler for SRAT " Haibo Xu
2024-03-05 4:41 ` Sunil V L
2024-03-05 8:42 ` Haibo Xu
2024-01-31 2:32 ` [PATCH 3/4] ACPI: RISCV: Add NUMA support based on SRAT and SLIT Haibo Xu
2024-03-05 5:24 ` Sunil V L
2024-03-05 9:54 ` Haibo Xu
2024-03-05 10:06 ` Sunil V L
2024-01-31 2:32 ` [PATCH 4/4] ACPI: RISCV: Enable ACPI based NUMA Haibo Xu
2024-01-31 9:33 ` Arnd Bergmann
2024-02-01 2:58 ` Haibo Xu
2024-02-01 5:52 ` Arnd Bergmann
2024-03-05 5:26 ` Sunil V L
2024-03-05 8:32 ` Haibo Xu
2024-03-05 2:30 ` [PATCH 0/4] Add ACPI NUMA support for RISC-V Haibo Xu
2024-03-05 4:44 ` Sunil V L
2024-03-05 7:42 ` Haibo Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1706603678.git.haibo1.xu@intel.com \
--to=haibo1.xu@intel.com \
--cc=acpica-devel@lists.linux.dev \
--cc=ajones@ventanamicro.com \
--cc=alexghiti@rivosinc.com \
--cc=alison.schofield@intel.com \
--cc=aou@eecs.berkeley.edu \
--cc=apatel@ventanamicro.com \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=bhe@redhat.com \
--cc=bjorn@rivosinc.com \
--cc=chenjiahao16@huawei.com \
--cc=cleger@rivosinc.com \
--cc=conor.dooley@microchip.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=evan@rivosinc.com \
--cc=greentime.hu@sifive.com \
--cc=gregkh@linuxfoundation.org \
--cc=guoren@kernel.org \
--cc=james.morse@arm.com \
--cc=jszhang@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
--cc=samitolvanen@google.com \
--cc=samuel.holland@sifive.com \
--cc=tony.luck@intel.com \
--cc=xiaobo55x@gmail.com \
--cc=yang.lee@linux.alibaba.com \
--cc=ytcoode@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).