Skip to content

Commit 2772d7d

Browse files
committed
Merge tag 'riscv-for-linus-6.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V fixes from Palmer Dabbelt: - fix a formatting error in the hwprobe documentation - fix a spurious warning in the RISC-V PMU driver - fix memory detection on rv32 (problem does not manifest on any known system) - avoid parsing legacy parsing of I in ACPI ISA strings * tag 'riscv-for-linus-6.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Don't include Zicsr or Zifencei in I from ACPI riscv: mm: fix truncation warning on RV32 perf: RISC-V: Remove PERF_HES_STOPPED flag checking in riscv_pmu_start() Documentation: RISC-V: hwprobe: Fix a formatting error
2 parents bde7f15 + ab2dbc7 commit 2772d7d

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

Documentation/riscv/hwprobe.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The following keys are defined:
4949
privileged ISA, with the following known exceptions (more exceptions may be
5050
added, but only if it can be demonstrated that the user ABI is not broken):
5151

52-
* The :fence.i: instruction cannot be directly executed by userspace
52+
* The ``fence.i`` instruction cannot be directly executed by userspace
5353
programs (it may still be executed in userspace via a
5454
kernel-controlled mechanism such as the vDSO).
5555

arch/riscv/kernel/cpufeature.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -317,19 +317,14 @@ void __init riscv_fill_hwcap(void)
317317
#undef SET_ISA_EXT_MAP
318318
}
319319

320-
/*
321-
* Linux requires the following extensions, so we may as well
322-
* always set them.
323-
*/
324-
set_bit(RISCV_ISA_EXT_ZICSR, isainfo->isa);
325-
set_bit(RISCV_ISA_EXT_ZIFENCEI, isainfo->isa);
326-
327320
/*
328321
* These ones were as they were part of the base ISA when the
329322
* port & dt-bindings were upstreamed, and so can be set
330323
* unconditionally where `i` is in riscv,isa on DT systems.
331324
*/
332325
if (acpi_disabled) {
326+
set_bit(RISCV_ISA_EXT_ZICSR, isainfo->isa);
327+
set_bit(RISCV_ISA_EXT_ZIFENCEI, isainfo->isa);
333328
set_bit(RISCV_ISA_EXT_ZICNTR, isainfo->isa);
334329
set_bit(RISCV_ISA_EXT_ZIHPM, isainfo->isa);
335330
}

arch/riscv/mm/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ static void __init reserve_crashkernel(void)
13461346
*/
13471347
crash_base = memblock_phys_alloc_range(crash_size, PMD_SIZE,
13481348
search_start,
1349-
min(search_end, (unsigned long) SZ_4G));
1349+
min(search_end, (unsigned long)(SZ_4G - 1)));
13501350
if (crash_base == 0) {
13511351
/* Try again without restricting region to 32bit addressible memory */
13521352
crash_base = memblock_phys_alloc_range(crash_size, PMD_SIZE,

drivers/perf/riscv_pmu.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@ void riscv_pmu_start(struct perf_event *event, int flags)
181181
uint64_t max_period = riscv_pmu_ctr_get_width_mask(event);
182182
u64 init_val;
183183

184-
if (WARN_ON_ONCE(!(event->hw.state & PERF_HES_STOPPED)))
185-
return;
186-
187184
if (flags & PERF_EF_RELOAD)
188185
WARN_ON_ONCE(!(event->hw.state & PERF_HES_UPTODATE));
189186

0 commit comments

Comments
 (0)