Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211217
b: refs/heads/master
c: 57cf4f7
h: refs/heads/master
i:
  211215: c2fa944
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Oct 1, 2010
1 parent 197a7c7 commit 26bf392
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18ffe4b18cef097f789d3ff43b45f2938cebe241
refs/heads/master: 57cf4f78c6266d5a6e5de5485065d4015b84bb30
20 changes: 19 additions & 1 deletion trunk/arch/mn10300/mm/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,30 @@ EXPORT_SYMBOL(flush_icache_page);
void flush_icache_range(unsigned long start, unsigned long end)
{
#ifdef CONFIG_MN10300_CACHE_WBACK
unsigned long addr, size, off;
unsigned long addr, size, base, off;
struct page *page;
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd;
pte_t *ppte, pte;

if (end > 0x80000000UL) {
/* addresses above 0xa0000000 do not go through the cache */
if (end > 0xa0000000UL) {
end = 0xa0000000UL;
if (start >= end)
return;
}

/* kernel addresses between 0x80000000 and 0x9fffffff do not
* require page tables, so we just map such addresses directly */
base = (start >= 0x80000000UL) ? start : 0x80000000UL;
mn10300_dcache_flush_range(base, end);
if (base == start)
goto invalidate;
end = base;
}

for (; start < end; start += size) {
/* work out how much of the page to flush */
off = start & (PAGE_SIZE - 1);
Expand Down Expand Up @@ -104,6 +121,7 @@ void flush_icache_range(unsigned long start, unsigned long end)
}
#endif

invalidate:
mn10300_icache_inv();
}
EXPORT_SYMBOL(flush_icache_range);
Expand Down

0 comments on commit 26bf392

Please sign in to comment.