Some additionals comments and notes from autobuilders received
after the series got applied, warranted some changes.
So this is a small collection of cleanups for the svpbmt v10 series.
changes in v2:
- add Guo's Review
- add patch dropping the use of function pointers in code
that can run before relocation
Heiko Stuebner (5):
riscv: drop cpufeature_apply_feature tracking variable
riscv: Improve description for RISCV_ISA_SVPBMT Kconfig symbol
riscv: make patch-function pointer more generic in
cpu_manufacturer_info struct
riscv: fix dependency for t-head errata
riscv: remove usage of function-pointers from cpufeatures and t-head
errata
arch/riscv/Kconfig | 9 ++++++--
arch/riscv/Kconfig.erratas | 1 +
arch/riscv/errata/thead/errata.c | 38 ++++++++++----------------------
arch/riscv/kernel/alternative.c | 18 +++++++--------
arch/riscv/kernel/cpufeature.c | 37 +++++++++----------------------
5 files changed, 40 insertions(+), 63 deletions(-)
--
2.35.1
The variable was tracking which feature patches got applied
but that information was never actually used - and thus resulted
in a warning as well.
Drop the variable.
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
---
arch/riscv/kernel/cpufeature.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index dea3ea19deee..b33564df81e1 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -294,7 +294,6 @@ void __init_or_module riscv_cpufeature_patch_func(struct alt_entry *begin,
unsigned int stage)
{
u32 cpu_req_feature = cpufeature_probe(stage);
- u32 cpu_apply_feature = 0;
struct alt_entry *alt;
u32 tmp;
@@ -308,10 +307,8 @@ void __init_or_module riscv_cpufeature_patch_func(struct alt_entry *begin,
}
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);
- cpu_apply_feature |= tmp;
- }
}
}
#endif
--
2.35.1
On Thu, 26 May 2022 13:56:41 PDT (-0700), [email protected] wrote:
> Some additionals comments and notes from autobuilders received
> after the series got applied, warranted some changes.
>
> So this is a small collection of cleanups for the svpbmt v10 series.
>
> changes in v2:
> - add Guo's Review
> - add patch dropping the use of function pointers in code
> that can run before relocation
>
> Heiko Stuebner (5):
> riscv: drop cpufeature_apply_feature tracking variable
> riscv: Improve description for RISCV_ISA_SVPBMT Kconfig symbol
> riscv: make patch-function pointer more generic in
> cpu_manufacturer_info struct
> riscv: fix dependency for t-head errata
> riscv: remove usage of function-pointers from cpufeatures and t-head
> errata
>
> arch/riscv/Kconfig | 9 ++++++--
> arch/riscv/Kconfig.erratas | 1 +
> arch/riscv/errata/thead/errata.c | 38 ++++++++++----------------------
> arch/riscv/kernel/alternative.c | 18 +++++++--------
> arch/riscv/kernel/cpufeature.c | 37 +++++++++----------------------
> 5 files changed, 40 insertions(+), 63 deletions(-)
IMO only three of these are actually fixes, the rest are cleanups. I've
got ahead and put everything on a branch, with
riscv: Improve description for RISCV_ISA_SVPBMT Kconfig symbol
riscv: drop cpufeature_apply_feature tracking variable
riscv: fix dependency for t-head errata
first. Those are on fixes, the whole thing is in for-next.
Thanks!
Hi Palmer,
Am Freitag, 17. Juni 2022, 01:03:32 CEST schrieb Palmer Dabbelt:
> On Thu, 26 May 2022 13:56:41 PDT (-0700), [email protected] wrote:
> > Some additionals comments and notes from autobuilders received
> > after the series got applied, warranted some changes.
> >
> > So this is a small collection of cleanups for the svpbmt v10 series.
> >
> > changes in v2:
> > - add Guo's Review
> > - add patch dropping the use of function pointers in code
> > that can run before relocation
> >
> > Heiko Stuebner (5):
> > riscv: drop cpufeature_apply_feature tracking variable
> > riscv: Improve description for RISCV_ISA_SVPBMT Kconfig symbol
> > riscv: make patch-function pointer more generic in
> > cpu_manufacturer_info struct
> > riscv: fix dependency for t-head errata
> > riscv: remove usage of function-pointers from cpufeatures and t-head
> > errata
> >
> > arch/riscv/Kconfig | 9 ++++++--
> > arch/riscv/Kconfig.erratas | 1 +
> > arch/riscv/errata/thead/errata.c | 38 ++++++++++----------------------
> > arch/riscv/kernel/alternative.c | 18 +++++++--------
> > arch/riscv/kernel/cpufeature.c | 37 +++++++++----------------------
> > 5 files changed, 40 insertions(+), 63 deletions(-)
>
> IMO only three of these are actually fixes, the rest are cleanups. I've
> got ahead and put everything on a branch, with
>
> riscv: Improve description for RISCV_ISA_SVPBMT Kconfig symbol
> riscv: drop cpufeature_apply_feature tracking variable
> riscv: fix dependency for t-head errata
>
> first. Those are on fixes, the whole thing is in for-next.
thanks a lot.
For the fixes I think Nathan's "riscv: Fix ALT_THEAD_PMA's asm parameters" [0]
would also be quite important.
Heiko
[0] https://lore.kernel.org/r/[email protected]