Skip to content

Commit

Permalink
hack: Force RISCV_HWPROBE_MISALIGNED_UNKNOWN
Browse files Browse the repository at this point in the history
Signed-off-by: Han Gao <rabenda.cn@gmail.com>
  • Loading branch information
RevySR committed Dec 25, 2024
1 parent f5b7490 commit 69932d5
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions arch/riscv/kernel/sys_hwprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,25 +168,7 @@ static bool hwprobe_ext0_has(const struct cpumask *cpus, unsigned long ext)
#if defined(CONFIG_RISCV_PROBE_UNALIGNED_ACCESS)
static u64 hwprobe_misaligned(const struct cpumask *cpus)
{
int cpu;
u64 perf = -1ULL;

for_each_cpu(cpu, cpus) {
int this_perf = per_cpu(misaligned_access_speed, cpu);

if (perf == -1ULL)
perf = this_perf;

if (perf != this_perf) {
perf = RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN;
break;
}
}

if (perf == -1ULL)
return RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN;

return perf;
return RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN;
}
#else
static u64 hwprobe_misaligned(const struct cpumask *cpus)
Expand Down

0 comments on commit 69932d5

Please sign in to comment.