Add support for T-HEAD C9xx PMU extensions
Get series with b4
b4 am 3510402.VqM8IeB0Os@philVersions newest first · linked by author and title
- v5 Latest posting 2/20 of 5 patches 0 repliesNew
- v5 posting 1/25 patches 0 repliesSuperseded
- v45 patches 0 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 posting 2/2 | 0 of 5 patches | 0 replies | Superseded | |
| v3 posting 1/2 | 5 patches | 0 replies | Superseded | |
| v2 | 5 patches | 0 replies | Superseded |
Patches in v5 posting 2/2 No applies recorded yet
None of the 5 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH v5 0/5] Add support for T-HEAD C9xx PMU extensions
Am Donnerstag, 13. Oktober 2022, 06:26:43 CEST schrieb Anup Patel:
Quoted 47 lines · Heiko Stuebner
Quoted 46 lines
The T-HEAD C9XX cores implement functionality very similar to SSCOFPMF. Instead of implementing a separate interface into SBI as done in v1, we can add the C9XX tidbits with quite minimal overhead and leaverage the existing SBI pmu interface including giving access to the firmware counters.
The current only hickup is the detection override in
sbi_hart, where I still need to find out why the MHPMCOUNTERs are not writeable at _that_ point of the boot, but with this series on top of openSBI 1.1 and the matching kernel perf patch I get reasonable results for example for:perf stat -e cycles -e instructions -e L1-icache-load-misses -e L1-icache-loads ls
Performance counter stats for 'ls':
17119496 cycles 2867765 instructions # 0.17 insn per cycle 55929 L1-icache-load-misses # 1.61% of all L1-icache accesses 3467346 L1-icache-loads0.030156216 seconds time elapsed 0.000000000 seconds user 0.023496000 seconds syschanges in v5:
- usecsr_set,csr_clearin allwinner pmu functions
- exposehart_featuresstruct into header
- makehart_featuresparam forextension_initcallback to allow platforms to override specific settingschanges in v4:
- use the newsbi_pmu_devicestructure for holding the overrides and extend it where neededchanges in v3:
- follow Atish's advice and implement an abstraction to not pollute the core pmu with cpu-specific variantschanges in v2:
- don't implement a separate interface but instead modify the sbi-pmu to allow the c9xx to use standard pmu interface
Quoted 8 lines
Quoted 6 lines
Heiko Stuebner (5):
lib:sbi_pmu: move pmu irq information into pmu itself
lib:sbi_hart: movehart_featuresstruct to a public location
lib:sbi_platform: exposehart_featurestoextension_initcallback
platform: generic: addextensions_inithandler and platform-override
platform: generic: allwinner: add support for c9xx pmuApplied this series to the riscv/opensbi repo.
Very cool, thanks a lot for picking this up :-)
Thanks
Heiko
Quoted 21 lines
Quoted 20 lines
include/sbi/sbi_hart.h | 11 ++ include/sbi/sbi_platform.h | 8 +- include/sbi/sbi_pmu.h | 8 ++ lib/sbi/sbi_hart.c | 43 +++---- lib/sbi/sbi_pmu.c | 12 ++ platform/generic/allwinner/sun20i-d1.c | 60 +++++++++ platform/generic/include/platform_override.h | 3 + platform/generic/include/thead_c9xx.h | 127 +++++++++++++++++++ platform/generic/platform.c | 10 ++ 9 files changed, 253 insertions(+), 29 deletions(-) create mode 100644 platform/generic/include/thead_c9xx.h--
2.35.1--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi