mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-06-12 22:31:45 +01:00
lib: sbi_hart: No need to clear features in hart_detect_features()
The per-hart features are already zeroed by sbi_scratch_alloc_offset() for all harts so hart_detect_features() should not explicitly clear features later. Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260521082625.1520870-2-anup.patel@oss.qualcomm.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -520,13 +520,6 @@ static int hart_detect_features(struct sbi_scratch *scratch)
|
|||||||
if (hfeatures->detected)
|
if (hfeatures->detected)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Clear hart features */
|
|
||||||
sbi_memset(hfeatures->extensions, 0, sizeof(hfeatures->extensions));
|
|
||||||
sbi_memset(hfeatures->csrs, 0, sizeof(hfeatures->csrs));
|
|
||||||
hfeatures->pmp_count = 0;
|
|
||||||
hfeatures->mhpm_mask = 0;
|
|
||||||
hfeatures->priv_version = SBI_HART_PRIV_VER_UNKNOWN;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse device tree extensions early, before any trap-based checks.
|
* Parse device tree extensions early, before any trap-based checks.
|
||||||
* Needed to detect Smrnmi and install NMI handlers before CSR probes
|
* Needed to detect Smrnmi and install NMI handlers before CSR probes
|
||||||
|
|||||||
Reference in New Issue
Block a user