Commit e661f98c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'riscv-for-linus-6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Palmer Dabbelt:

 - A pair of fixes for build-related failures in the selftests

 - A fix for a sparse warning in acpi_os_ioremap()

 - A fix to restore the kernel PA offset in vmcoreinfo, to fix crash
   handling

* tag 'riscv-for-linus-6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  Documentation: kdump: Add va_kernel_pa_offset for RISCV64
  riscv: Export va_kernel_pa_offset in vmcoreinfo
  RISC-V: ACPI: Fix acpi_os_ioremap to return iomem address
  selftests: riscv: Fix compilation error with vstate_exec_nolibc.c
  selftests/riscv: fix potential build failure during the "emit_tests" step
parents ea4f142f 640c503d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -624,3 +624,9 @@ Used to get the correct ranges:
  * VMALLOC_START ~ VMALLOC_END : vmalloc() / ioremap() space.
  * VMEMMAP_START ~ VMEMMAP_END : vmemmap space, used for struct page array.
  * KERNEL_LINK_ADDR : start address of Kernel link and BPF

va_kernel_pa_offset
-------------------

Indicates the offset between the kernel virtual and physical mappings.
Used to translate virtual to physical addresses.
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ typedef u64 phys_cpuid_t;
#define PHYS_CPUID_INVALID INVALID_HARTID

/* ACPI table mapping after acpi_permanent_mmap is set */
void *acpi_os_ioremap(acpi_physical_address phys, acpi_size size);
void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size);
#define acpi_os_ioremap acpi_os_ioremap

#define acpi_strict 1	/* No out-of-spec workarounds on RISC-V */
+2 −2
Original line number Diff line number Diff line
@@ -215,9 +215,9 @@ void __init __acpi_unmap_table(void __iomem *map, unsigned long size)
	early_iounmap(map, size);
}

void *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
{
	return memremap(phys, size, MEMREMAP_WB);
	return (void __iomem *)memremap(phys, size, MEMREMAP_WB);
}

#ifdef CONFIG_PCI
+2 −0
Original line number Diff line number Diff line
@@ -18,4 +18,6 @@ void arch_crash_save_vmcoreinfo(void)
	vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
#endif
	vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR);
	vmcoreinfo_append_str("NUMBER(va_kernel_pa_offset)=0x%lx\n",
						kernel_map.va_kernel_pa_offset);
}
+0 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
#include <sys/prctl.h>

#define THIS_PROGRAM "./vstate_exec_nolibc"

int main(int argc, char **argv)