Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bcmlinux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Broadcom
bcmlinux
Commits
cf4fe376
Commit
cf4fe376
authored
4 years ago
by
Oskar Viljasaar
Browse files
Options
Downloads
Patches
Plain Diff
Import openwrt hack patch 300-MIPS-r4k_cache-use-more-efficient-cache-blast
parent
0e9bbf57
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arch/mips/include/asm/r4kcache.h
+37
-5
37 additions, 5 deletions
arch/mips/include/asm/r4kcache.h
with
37 additions
and
5 deletions
arch/mips/include/asm/r4kcache.h
+
37
−
5
View file @
cf4fe376
...
...
@@ -683,16 +683,48 @@ static inline void prot##extra##blast_##pfx##cache##_range(unsigned long start,
unsigned long end) \
{ \
unsigned long lsize = cpu_##desc##_line_size(); \
unsigned long lsize_2 = lsize * 2; \
unsigned long lsize_3 = lsize * 3; \
unsigned long lsize_4 = lsize * 4; \
unsigned long lsize_5 = lsize * 5; \
unsigned long lsize_6 = lsize * 6; \
unsigned long lsize_7 = lsize * 7; \
unsigned long lsize_8 = lsize * 8; \
unsigned long addr = start & ~(lsize - 1); \
unsigned long aend = (end - 1) & ~(lsize - 1); \
unsigned long aend = (end + lsize - 1) & ~(lsize - 1); \
int lines = (aend - addr) / lsize; \
\
__##pfx##flush_prologue \
\
while (1) { \
while (lines >= 8) { \
prot##cache_op(hitop, addr); \
prot##cache_op(hitop, addr + lsize); \
prot##cache_op(hitop, addr + lsize_2); \
prot##cache_op(hitop, addr + lsize_3); \
prot##cache_op(hitop, addr + lsize_4); \
prot##cache_op(hitop, addr + lsize_5); \
prot##cache_op(hitop, addr + lsize_6); \
prot##cache_op(hitop, addr + lsize_7); \
addr += lsize_8; \
lines -= 8; \
} \
\
if (lines & 0x4) { \
prot##cache_op(hitop, addr); \
prot##cache_op(hitop, addr + lsize); \
prot##cache_op(hitop, addr + lsize_2); \
prot##cache_op(hitop, addr + lsize_3); \
addr += lsize_4; \
} \
\
if (lines & 0x2) { \
prot##cache_op(hitop, addr); \
prot##cache_op(hitop, addr + lsize); \
addr += lsize_2; \
} \
\
if (lines & 0x1) { \
prot##cache_op(hitop, addr); \
if (addr == aend) \
break; \
addr += lsize; \
} \
\
__##pfx##flush_epilogue \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment