Merge tag 'riscv-fixes-6.16-rc4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux into fixes
riscv fixes for 6.16-rc4 - A fix for a percpu variable that may lie in the vmalloc region and on which we used __pa() - A fix to require at least clang-17 to prevent build issues with previous versions on kCFI * tag 'riscv-fixes-6.16-rc4' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux: riscv: cpu_ops_sbi: Use static array for boot_data riscv: Require clang-17 or newer for kCFI
This commit is contained in:
+2
-1
@@ -63,7 +63,8 @@ config RISCV
|
||||
select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
|
||||
select ARCH_STACKWALK
|
||||
select ARCH_SUPPORTS_ATOMIC_RMW
|
||||
select ARCH_SUPPORTS_CFI_CLANG
|
||||
# clang >= 17: https://github.com/llvm/llvm-project/commit/62fa708ceb027713b386c7e0efda994f8bdc27e2
|
||||
select ARCH_SUPPORTS_CFI_CLANG if CLANG_VERSION >= 170000
|
||||
select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU
|
||||
select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE
|
||||
select ARCH_SUPPORTS_HUGETLBFS if MMU
|
||||
|
||||
@@ -18,10 +18,10 @@ const struct cpu_operations cpu_ops_sbi;
|
||||
|
||||
/*
|
||||
* Ordered booting via HSM brings one cpu at a time. However, cpu hotplug can
|
||||
* be invoked from multiple threads in parallel. Define a per cpu data
|
||||
* be invoked from multiple threads in parallel. Define an array of boot data
|
||||
* to handle that.
|
||||
*/
|
||||
static DEFINE_PER_CPU(struct sbi_hart_boot_data, boot_data);
|
||||
static struct sbi_hart_boot_data boot_data[NR_CPUS];
|
||||
|
||||
static int sbi_hsm_hart_start(unsigned long hartid, unsigned long saddr,
|
||||
unsigned long priv)
|
||||
@@ -67,7 +67,7 @@ static int sbi_cpu_start(unsigned int cpuid, struct task_struct *tidle)
|
||||
unsigned long boot_addr = __pa_symbol(secondary_start_sbi);
|
||||
unsigned long hartid = cpuid_to_hartid_map(cpuid);
|
||||
unsigned long hsm_data;
|
||||
struct sbi_hart_boot_data *bdata = &per_cpu(boot_data, cpuid);
|
||||
struct sbi_hart_boot_data *bdata = &boot_data[cpuid];
|
||||
|
||||
/* Make sure tidle is updated */
|
||||
smp_mb();
|
||||
|
||||
Reference in New Issue
Block a user