linux/arch/riscv/include/asm
Palmer Dabbelt 6a4aa4c94b
Merge patch series "Add ACPI NUMA support for RISC-V"
Haibo Xu <haibo1.xu@intel.com> says:

This patch series enable RISC-V ACPI NUMA support which was based on
the recently approved ACPI ECR[1].

Patch 1/4 add RISC-V specific acpi_numa.c file to parse NUMA information
from SRAT and SLIT ACPI tables.
Patch 2/4 add the common SRAT RINTC affinity structure handler.
Patch 3/4 change the ACPI_NUMA to a hidden option since it would be selected
by default on all supported platform.
Patch 4/4 replace pr_info with pr_debug in arch_acpi_numa_init() to avoid
potential boot noise on ACPI platforms that are not NUMA.

Based-on: https://github.com/linux-riscv/linux-riscv/tree/for-next

[1] https://drive.google.com/file/d/1YTdDx2IPm5IeZjAW932EYU-tUtgS08tX/view?usp=sharing

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
   42bd4eeefd

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_NONPORTABLE=y
   CONFIG_HVC_RISCV_SBI=y
   CONFIG_NUMA=y
   CONFIG_ACPI_NUMA=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

* b4-shazam-merge:
  ACPI: NUMA: replace pr_info with pr_debug in arch_acpi_numa_init
  ACPI: NUMA: change the ACPI_NUMA to a hidden option
  ACPI: NUMA: Add handler for SRAT RINTC affinity structure
  ACPI: RISCV: Add NUMA support based on SRAT and SLIT

Link: https://lore.kernel.org/r/cover.1718268003.git.haibo1.xu@intel.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-07-22 10:31:51 -07:00
..
vdso riscv: Provide a definition for 'pause' 2024-07-12 03:16:39 -07:00
acenv.h RISC-V: Add support to build the ACPI core 2023-06-01 08:45:01 -07:00
acpi.h ACPI: RISCV: Add NUMA support based on SRAT and SLIT 2024-07-22 07:13:06 -07:00
alternative-macros.h riscv: alternatives: fix a typo in comment 2023-08-02 13:49:07 -07:00
alternative.h Merge patch series "Add non-coherent DMA support for AX45MP" 2023-09-08 11:24:34 -07:00
arch_hweight.h riscv: lib: relax assembly constraints in hweight 2024-07-15 08:46:46 -07:00
archrandom.h RISC-V: Implement archrandom when Zkr is available 2024-01-17 18:20:49 -08:00
asm-extable.h riscv: select DCACHE_WORD_ACCESS for efficient unaligned access HW 2024-01-09 20:18:20 -08:00
asm-offsets.h
asm-prototypes.h riscv: vector: allow kernel-mode Vector with preemption 2024-01-16 07:14:02 -08:00
asm.h riscv: blacklist assembly symbols for kprobe 2024-01-24 15:59:42 -08:00
assembler.h RISC-V: Add arch functions to support hibernation/suspend-to-disk 2023-04-29 11:25:13 -07:00
atomic.h Merge patch series "Rework & improve riscv cmpxchg.h and atomic.h" 2024-04-28 14:50:33 -07:00
barrier.h riscv: Add Zawrs support for spinlocks 2024-07-12 03:16:42 -07:00
bitops.h RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
bug.h
cache.h riscv: mm: still create swiotlb buffer for kmalloc() bouncing if required 2024-04-30 10:35:45 -07:00
cacheflush.h riscv: Fix early ftrace nop patching 2024-05-23 08:22:17 -07:00
cacheinfo.h
cfi.h bpf, riscv64/cfi: Support kCFI + BPF on riscv64 2024-03-06 15:18:16 -08:00
checksum.h work around gcc bugs with 'asm goto' with outputs 2024-02-09 15:57:48 -08:00
clint.h
clocksource.h
cmpxchg.h RISC-V Patches for the 6.11 Merge Window, Part 1 2024-07-20 09:11:27 -07:00
compat.h riscv: Introduce set_compat_task() in asm/compat.h 2024-03-19 16:39:40 -07:00
cpu_ops_sbi.h
cpu_ops.h riscv: Use the same CPU operations for all CPUs 2024-01-04 15:03:07 -08:00
cpu.h RISC-V: Add support to build the ACPI core 2023-06-01 08:45:01 -07:00
cpufeature.h riscv: add ISA extensions validation callback 2024-06-26 07:54:51 -07:00
cpuidle.h
crash_reserve.h kexec: split crashkernel reservation code out from crash_core.c 2024-02-23 17:48:21 -08:00
csr.h RISC-V: KVM: Add perf sampling support for guests 2024-04-26 13:13:50 +05:30
current.h
delay.h
dma-noncoherent.h riscv: mm: dma-noncoherent: nonstandard cache operations support 2023-09-01 09:08:57 -07:00
dmi.h riscv: dmi: Add SMBIOS/DMI support 2024-06-26 08:02:33 -07:00
efi.h Merge patch series "riscv: Introduce KASLR" 2023-09-08 11:25:13 -07:00
elf.h riscv: Introduce set_compat_task() in asm/compat.h 2024-03-19 16:39:40 -07:00
entry-common.h riscv: vector: do not pass task_struct into riscv_v_vstate_{save,restore}() 2024-01-16 07:13:59 -08:00
errata_list.h RISC-V Patches for the 6.10 Merge Window, Part 1 2024-05-22 09:56:00 -07:00
extable.h riscv: mm: stub extable related functions/macros for !MMU 2023-06-14 07:17:45 -07:00
fence.h riscv/barrier: Consolidate fence definitions 2024-03-19 18:52:24 -07:00
fixmap.h riscv: Move early dtb mapping into the fixmap region 2023-04-13 18:14:26 -07:00
fpu.h riscv: add support for kernel-mode FPU 2024-05-19 14:36:19 -07:00
ftrace.h function_graph: Everyone uses HAVE_FUNCTION_GRAPH_RET_ADDR_PTR, remove it 2024-06-11 11:18:24 -04:00
futex.h
gdb_xml.h
gpr-num.h
hugetlb.h mm: convert arch_clear_hugepage_flags to take a folio 2024-04-25 20:56:15 -07:00
hwcap.h Merge patch series "riscv: Apply Zawrs when available" 2024-07-12 08:55:29 -07:00
hwprobe.h riscv: hwprobe: export highest virtual userspace address 2024-07-11 08:57:33 -07:00
image.h
insn-def.h riscv: Add Zawrs support for spinlocks 2024-07-12 03:16:42 -07:00
insn.h RISC-V: fix vector insn load/store width mask 2024-06-25 08:47:10 -07:00
io.h riscv/barrier: Consolidate fence definitions 2024-03-19 18:52:24 -07:00
irq_stack.h riscv: Deduplicate IRQ stack switching 2023-10-27 14:43:06 -07:00
irq_work.h arch: consolidate arch_irq_work_raise prototypes 2023-11-23 11:32:29 +01:00
irq.h init: consolidate prototypes in linux/init.h 2023-06-09 17:44:16 -07:00
irqflags.h riscv: Remove unnecessary irqflags processor.h include 2024-04-16 18:50:52 -07:00
jump_label.h riscv: jump_label: Simplify assembly syntax 2024-06-26 07:36:28 -07:00
kasan.h riscv: mm: Pre-allocate vmemmap/direct map/kasan PGD entries 2024-06-26 08:42:39 -07:00
Kbuild riscv: convert to generic syscall table 2024-07-10 14:23:38 +02:00
kdebug.h
kexec.h
kfence.h riscv: Use accessors to page table entries instead of direct dereference 2023-12-20 10:48:15 -08:00
kgdb.h
kprobes.h riscv: Only consider swbp/ss handlers for correct privileged mode 2023-09-20 06:45:27 -07:00
kvm_aia_aplic.h RISC-V: KVM: Add APLIC related defines 2023-06-18 21:24:36 +05:30
kvm_aia_imsic.h RISC-V: KVM: Add IMSIC related defines 2023-06-18 21:24:34 +05:30
kvm_aia.h RISC-V: KVM: Expose IMSIC registers as attributes of AIA irqchip 2023-06-19 22:27:58 +05:30
kvm_host.h Merge patch series "riscv: Apply Zawrs when available" 2024-07-12 08:55:29 -07:00
kvm_types.h
kvm_vcpu_fp.h
kvm_vcpu_insn.h
kvm_vcpu_pmu.h RISC-V: KVM: Improve firmware counter read function 2024-04-26 13:13:54 +05:30
kvm_vcpu_sbi.h RISC-V: KVM: Add support for SBI STA registers 2023-12-30 11:26:35 +05:30
kvm_vcpu_timer.h
kvm_vcpu_vector.h RISC-V: KVM: Improve vector save/restore functions 2023-08-08 17:26:05 +05:30
linkage.h
membarrier.h membarrier: riscv: Provide core serializing command 2024-02-15 08:04:14 -08:00
mmio.h riscv/barrier: Consolidate fence definitions 2024-03-19 18:52:24 -07:00
mmiowb.h riscv/barrier: Consolidate fence definitions 2024-03-19 18:52:24 -07:00
mmu_context.h
mmu.h riscv: mm: Change attribute from __init to __meminit for page functions 2024-06-26 08:42:39 -07:00
mmzone.h
module.h riscv: module: move find_section to module.h 2023-01-31 23:29:39 -08:00
module.lds.h
numa.h
page.h riscv: mm: Add pfn_to_kaddr() implementation 2024-06-26 08:42:41 -07:00
paravirt_api_clock.h RISC-V: paravirt: Add skeleton for pv-time support 2023-12-30 11:25:03 +05:30
paravirt.h RISC-V: paravirt: Add skeleton for pv-time support 2023-12-30 11:25:03 +05:30
patch.h riscv: Pass patch_text() the length in bytes 2024-06-26 07:36:31 -07:00
pci.h
perf_event.h riscv: perf: Fix callchain parse error with kernel tracepoint events 2023-06-01 10:09:22 -07:00
pgalloc.h riscv: Use IPIs for remote cache/TLB flushes by default 2024-04-29 10:49:26 -07:00
pgtable-32.h RISC-V: Provide pgtable_l5_enabled on rv32 2023-10-31 19:15:50 -07:00
pgtable-64.h riscv: mm: Add support for ZONE_DEVICE 2024-06-26 08:42:46 -07:00
pgtable-bits.h riscv: mm: Add support for ZONE_DEVICE 2024-06-26 08:42:46 -07:00
pgtable.h Merge patch series "riscv: Memory Hot(Un)Plug support" 2024-06-26 08:43:07 -07:00
probes.h
processor.h riscv: hwprobe: export highest virtual userspace address 2024-07-11 08:57:33 -07:00
ptrace.h riscv: entry: Convert to generic entry 2023-03-23 08:47:00 -07:00
sbi.h riscv: Improve sbi_ecall() code generation by reordering arguments 2024-07-10 13:30:56 -07:00
scs.h riscv: Use separate IRQ shadow call stacks 2023-10-27 14:43:09 -07:00
seccomp.h
sections.h riscv: Check if the code to patch lies in the exit section 2024-01-09 10:58:59 -08:00
semihost.h riscv: Implement semihost.h for earlycon semihost driver 2023-01-19 14:58:19 +01:00
set_memory.h riscv: Prepare EFI header for relocatable kernels 2023-04-19 07:46:28 -07:00
signal32.h
simd.h riscv: vector: Fix a typo of preempt_v 2024-03-15 10:17:38 -07:00
smp.h riscv: Use IPIs for remote cache/TLB flushes by default 2024-04-29 10:49:26 -07:00
soc.h
sparsemem.h
stackprotector.h
stacktrace.h riscv: declare overflow_stack as exported from traps.c 2024-02-07 09:55:27 -08:00
string.h RISC-V: add infrastructure to allow different str* implementations 2023-01-31 11:43:23 -08:00
suspend.h riscv: Do not save the scratch CSR during suspend 2024-04-28 14:50:36 -07:00
switch_to.h riscv: Include riscv_set_icache_flush_ctx prctl 2024-04-18 08:10:58 -07:00
sync_core.h membarrier: riscv: Provide core serializing command 2024-02-15 08:04:14 -08:00
syscall_table.h riscv: convert to generic syscall table 2024-07-10 14:23:38 +02:00
syscall_wrapper.h riscv: Mark __se_sys_* functions __used 2024-03-26 14:11:03 -07:00
syscall.h riscv: Implement syscall wrappers 2023-08-23 14:16:36 -07:00
thread_info.h Merge patch series "riscv: support kernel-mode Vector" 2024-01-16 07:14:04 -08:00
timex.h init: consolidate prototypes in linux/init.h 2023-06-09 17:44:16 -07:00
tlb.h RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
tlbbatch.h riscv: Add support for BATCHED_UNMAP_TLB_FLUSH 2024-01-11 08:01:53 -08:00
tlbflush.h riscv: mm: Use a fixed layout for the MM context ID 2024-04-29 10:49:33 -07:00
topology.h sched/topology: Add a new arch_scale_freq_ref() method 2023-12-23 15:52:34 +01:00
trace.h riscv: Add tracepoints for SBI calls and returns 2024-07-10 13:23:09 -07:00
uaccess.h riscv: Fix spurious errors from __get/put_kernel_nofault 2024-03-26 08:34:48 -07:00
unistd.h riscv: convert to generic syscall table 2024-07-10 14:23:38 +02:00
uprobes.h riscv: Only consider swbp/ss handlers for correct privileged mode 2023-09-20 06:45:27 -07:00
vdso.h riscv: alternative: patch alternatives in the vDSO 2023-01-31 23:29:42 -08:00
vector.h riscv: vector: adjust minimum Vector requirement to ZVE32X 2024-05-30 14:33:10 -07:00
vendorid_list.h riscv: errata: Rename defines for Andes 2024-03-12 07:13:12 -07:00
vermagic.h
vmalloc.h Revert "riscv: mm: support Svnapot in huge vmap" 2024-02-29 10:21:22 -08:00
word-at-a-time.h kernel.h: removed REPEAT_BYTE from kernel.h 2024-02-01 09:47:59 -08:00
xip_fixup.h riscv: Fixed wrong register in XIP_FIXUP_FLASH_OFFSET macro 2024-01-09 19:33:21 -08:00
xor.h riscv: Add vector extension XOR implementation 2024-01-16 07:13:55 -08:00