Unverified Commit c836d9d1 authored by Palmer Dabbelt's avatar Palmer Dabbelt
Browse files

RISC-V: Some Svpbmt fixes

Some additionals comments and notes from autobuilders received after the
series got applied, warranted some changes.

* commit '924cbb8c':
  riscv: Improve description for RISCV_ISA_SVPBMT Kconfig symbol
  riscv: drop cpufeature_apply_feature tracking variable
  riscv: fix dependency for t-head errata
parents a7c1c97f 924cbb8c
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -364,8 +364,13 @@ config RISCV_ISA_SVPBMT
	select RISCV_ALTERNATIVE
	select RISCV_ALTERNATIVE
	default y
	default y
	help
	help
	   Adds support to dynamically detect the presence of the SVPBMT extension
	   Adds support to dynamically detect the presence of the SVPBMT
	   (Supervisor-mode: page-based memory types) and enable its usage.
	   ISA-extension (Supervisor-mode: page-based memory types) and
	   enable its usage.

	   The memory type for a page contains a combination of attributes
	   that indicate the cacheability, idempotency, and ordering
	   properties for access to that page.


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


+1 −0
Original line number Original line Diff line number Diff line
@@ -35,6 +35,7 @@ config ERRATA_SIFIVE_CIP_1200


config ERRATA_THEAD
config ERRATA_THEAD
	bool "T-HEAD errata"
	bool "T-HEAD errata"
	depends on !XIP_KERNEL
	select RISCV_ALTERNATIVE
	select RISCV_ALTERNATIVE
	help
	help
	  All T-HEAD errata Kconfig depend on this Kconfig. Disabling
	  All T-HEAD errata Kconfig depend on this Kconfig. Disabling
+1 −4
Original line number Original line Diff line number Diff line
@@ -293,7 +293,6 @@ void __init_or_module riscv_cpufeature_patch_func(struct alt_entry *begin,
						  unsigned int stage)
						  unsigned int stage)
{
{
	u32 cpu_req_feature = cpufeature_probe(stage);
	u32 cpu_req_feature = cpufeature_probe(stage);
	u32 cpu_apply_feature = 0;
	struct alt_entry *alt;
	struct alt_entry *alt;
	u32 tmp;
	u32 tmp;


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


		tmp = (1U << alt->errata_id);
		tmp = (1U << alt->errata_id);
		if (cpu_req_feature & tmp) {
		if (cpu_req_feature & tmp)
			patch_text_nosync(alt->old_ptr, alt->alt_ptr, alt->alt_len);
			patch_text_nosync(alt->old_ptr, alt->alt_ptr, alt->alt_len);
			cpu_apply_feature |= tmp;
		}
	}
	}
}
}
#endif
#endif