{bp-19783} arch/tricore: drop iLLD dependency in cache and perf paths - #19829
Merged
Conversation
Add tricore_mtcr()/tricore_mfcr() inline-assembly wrappers for the MTCR/MFCR (move to/from Core Special Function Register) instructions. These let arch/tricore code access CSRs directly without relying on the Infineon iLLD intrinsics, and are used by the following iLLD-removal change in the performance-counter path. Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
Replace the iLLD register structures (Ifx_CPU_PCON0/1/2, Ifx_CPU_DCON0/1/2) and the IfxCpu_cfg.h cache-size/line-size macros in the cache path with direct CSR accesses via tricore_mtcr()/tricore_mfcr() and locally defined PCON/DCON bit masks. Also switch __isync()/__dsync() to the UP_ISB()/ UP_DSB() barrier wrappers. This removes the arch/tricore cache path's dependency on the Infineon iLLD layer. No behavior change. Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
Replace the iLLD helpers IfxCpu_resetAndStartCounters() and IfxCpu_getClockCounter() in the performance-counter path with direct CSR accesses via tricore_mtcr()/tricore_mfcr(). tricore_reset_ccnt() disables the CPU cycle counter (CPU_CCTRL), clears CPU_CCNT, then re-enables it; up_perf_gettime() reads CPU_CCNT directly. This removes the arch/tricore perf path's dependency on the Infineon iLLD layer. No behavior change. Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
jerpelea
requested review from
acassis,
cederom,
linguini1 and
xiaoxiang781216
August 13, 2026 11:02
linguini1
approved these changes
Aug 13, 2026
Contributor
Author
|
do not restart Ci until #19814 is merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove the Infineon iLLD dependency from the arch/tricore cache and
performance-counter paths, replacing the iLLD intrinsics and register
structures with direct CSR (Core Special Function Register) accesses.
The series contains three commits, kept separate to match the internal
development history:
The CSR register numbers previously pulled in from the iLLD IfxCpu_reg.h
are now defined locally in each file that needs them.
Impact
RELEASE
Testing
CI