MIPS cache code cleanup
Get series with b4
b4 am 20150128210506.GB6116@NP-P-BURTONVersions newest first
- v1 Latest0 of 8 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 8 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 0/8] MIPS cache code cleanup
Quoted 8 lines · Daniel Schwierzeck
Hi Paul,
Am 26.01.2015 um 16:02 schrieb Paul Burton:
Quoted 4 lines
This series cleans up the MIPS cache code somewhat, and unifies the mips32 & mips64 implementations of it. This is largely in preparation for further patches adding L2 cache support. The final patch of this series fixes a bug encountered with recent cores on Malta boards.
Quoted 5 lines
thanks for doing this. I also have this on my to-do list.
Just a thought: if we finally have just the
mips_cache_resetfunction incache_init.S, couldn't we reimplement it in C entirely? I see no reason to implement it in assembler.
The only issue with that is that mips_cache_reset currently runs before we have a stack set up, so if the C compiler were to attempt to use the stack things would fall over. I guess we could set up the temporary stack earlier, and it's probably unlikely the compiler would actually make use of it so it shouldn't really slow things down. Any chance we could squeeze this into this merge window though, and I'll move the cache init to C next time? That will simplify my L2 code somewhat too - thanks for the suggestion!
Paul
Quoted 29 lines
Quoted 26 lines
Paul Burton (8):
MIPS: avoid .set ISA for cache operations
MIPS: unify cache maintenance functions
MIPS: unify cache initialization code
MIPS: refactor L1 cache config reads to a macro
MIPS: refactor cache loops to a macro
MIPS: inline mips_init_[id]cache functions
MIPS: allow systems to skip loads during cache init
MIPS: clear TagLo select 2 during cache initarch/mips/Kconfig | 6 + arch/mips/cpu/mips32/Makefile | 3 +- arch/mips/cpu/mips32/cpu.c | 119 ----------- arch/mips/cpu/mips64/Makefile | 2 +- arch/mips/cpu/mips64/cache.S | 213 -------------------- arch/mips/cpu/mips64/cpu.c | 58 ------ arch/mips/include/asm/cacheops.h | 7 + arch/mips/lib/Makefile | 2 + arch/mips/lib/cache.c | 118 +++++++++++ arch/mips/{cpu/mips32/cache.S => lib/cache_init.S} | 222 +++++++++------------ 10 files changed, 226 insertions(+), 524 deletions(-) delete mode 100644 arch/mips/cpu/mips64/cache.S create mode 100644 arch/mips/lib/cache.c rename arch/mips/{cpu/mips32/cache.S => lib/cache_init.S} (59%)Signature · 1 line
- Daniel