History

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

Palmer Dabbelt committed 4 years ago

Commit c836d9d2 parents a7c1c97 924cbb83 files · +9 −6Browse files

Unified · Split

3 files
  1. arch/riscv/Kconfig +7 −2
  2. arch/riscv/Kconfig.erratas +1 −0
  3. arch/riscv/kernel/cpufeature.c +1 −4
arch/riscv/Kconfig+7−2
@@ -364,8 +364,13 @@ config RISCV_ISA_SVPBMT · 363 unmodified lines
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+1−0
@@ -35,6 +35,7 @@ config ERRATA_SIFIVE_CIP_1200 · 34 unmodified lines
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+1−4
@@ -293,7 +293,6 @@ void __init_or_module riscv_cpufeature_patch_func(struct alt_entry *begin, · 292 unmodified lines
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, · 7 unmodified lines
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