Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull RISC-V fixes from Palmer Dabbelt:

- kCFI is restricted to clang-17 or newer, as earlier versions have
known bugs

- sbi_hsm_hart_start is now staticly allocated, to avoid tripping up
the SBI HSM page mapping on sparse systems.

* tag 'riscv-for-linus-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
riscv: cpu_ops_sbi: Use static array for boot_data
riscv: Require clang-17 or newer for kCFI

+5 -4
+2 -1
arch/riscv/Kconfig
··· 63 63 select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT 64 64 select ARCH_STACKWALK 65 65 select ARCH_SUPPORTS_ATOMIC_RMW 66 - select ARCH_SUPPORTS_CFI_CLANG 66 + # clang >= 17: https://github.com/llvm/llvm-project/commit/62fa708ceb027713b386c7e0efda994f8bdc27e2 67 + select ARCH_SUPPORTS_CFI_CLANG if CLANG_VERSION >= 170000 67 68 select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU 68 69 select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE 69 70 select ARCH_SUPPORTS_HUGETLBFS if MMU
+3 -3
arch/riscv/kernel/cpu_ops_sbi.c
··· 18 18 19 19 /* 20 20 * Ordered booting via HSM brings one cpu at a time. However, cpu hotplug can 21 - * be invoked from multiple threads in parallel. Define a per cpu data 21 + * be invoked from multiple threads in parallel. Define an array of boot data 22 22 * to handle that. 23 23 */ 24 - static DEFINE_PER_CPU(struct sbi_hart_boot_data, boot_data); 24 + static struct sbi_hart_boot_data boot_data[NR_CPUS]; 25 25 26 26 static int sbi_hsm_hart_start(unsigned long hartid, unsigned long saddr, 27 27 unsigned long priv) ··· 67 67 unsigned long boot_addr = __pa_symbol(secondary_start_sbi); 68 68 unsigned long hartid = cpuid_to_hartid_map(cpuid); 69 69 unsigned long hsm_data; 70 - struct sbi_hart_boot_data *bdata = &per_cpu(boot_data, cpuid); 70 + struct sbi_hart_boot_data *bdata = &boot_data[cpuid]; 71 71 72 72 /* Make sure tidle is updated */ 73 73 smp_mb();