Skip to content

Commit c836d9d

Browse files
RISC-V: Some Svpbmt fixes
Some additionals comments and notes from autobuilders received after the series got applied, warranted some changes. * commit '924cbb8cbe3460ea192e6243017ceb0ceb255b1b': riscv: Improve description for RISCV_ISA_SVPBMT Kconfig symbol riscv: drop cpufeature_apply_feature tracking variable riscv: fix dependency for t-head errata
2 parents a7c1c97 + 924cbb8 commit c836d9d

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

arch/riscv/Kconfig

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,13 @@ config RISCV_ISA_SVPBMT
364364
select RISCV_ALTERNATIVE
365365
default y
366366
help
367-
Adds support to dynamically detect the presence of the SVPBMT extension
368-
(Supervisor-mode: page-based memory types) and enable its usage.
367+
Adds support to dynamically detect the presence of the SVPBMT
368+
ISA-extension (Supervisor-mode: page-based memory types) and
369+
enable its usage.
370+
371+
The memory type for a page contains a combination of attributes
372+
that indicate the cacheability, idempotency, and ordering
373+
properties for access to that page.
369374

370375
The SVPBMT extension is only available on 64Bit cpus.
371376

arch/riscv/Kconfig.erratas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ config ERRATA_SIFIVE_CIP_1200
3535

3636
config ERRATA_THEAD
3737
bool "T-HEAD errata"
38+
depends on !XIP_KERNEL
3839
select RISCV_ALTERNATIVE
3940
help
4041
All T-HEAD errata Kconfig depend on this Kconfig. Disabling

arch/riscv/kernel/cpufeature.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ void __init_or_module riscv_cpufeature_patch_func(struct alt_entry *begin,
293293
unsigned int stage)
294294
{
295295
u32 cpu_req_feature = cpufeature_probe(stage);
296-
u32 cpu_apply_feature = 0;
297296
struct alt_entry *alt;
298297
u32 tmp;
299298

@@ -307,10 +306,8 @@ void __init_or_module riscv_cpufeature_patch_func(struct alt_entry *begin,
307306
}
308307

309308
tmp = (1U << alt->errata_id);
310-
if (cpu_req_feature & tmp) {
309+
if (cpu_req_feature & tmp)
311310
patch_text_nosync(alt->old_ptr, alt->alt_ptr, alt->alt_len);
312-
cpu_apply_feature |= tmp;
313-
}
314311
}
315312
}
316313
#endif

0 commit comments

Comments
 (0)