Skip to content

Commit ab2dbc7

Browse files
RISC-V: Don't include Zicsr or Zifencei in I from ACPI
ACPI ISA strings are based on a specification after Zicsr and Zifencei were split out of I, so we shouldn't be treating them as part of I. We haven't release an ACPI-based kernel yet, so we don't need to worry about compatibility with the old ISA strings. Fixes: 07edc32 ("RISC-V: always report presence of extensions formerly part of the base ISA") Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com> Link: https://lore.kernel.org/r/20230711224600.10879-1-palmer@rivosinc.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent b690e26 commit ab2dbc7

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

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
}

0 commit comments

Comments
 (0)