Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9466
b: refs/heads/master
c: 481467d
h: refs/heads/master
v: v3
  • Loading branch information
Catalin Marinas authored and Russell King committed Sep 30, 2005
1 parent 4203cb7 commit 43977c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 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: dce79affd5d04e9cbabe35016eda55213b9b36f6
refs/heads/master: 481467d6fa4489aa42321a067e78bad26349488f
36 changes: 18 additions & 18 deletions trunk/arch/arm/mm/flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@

#ifdef CONFIG_CPU_CACHE_VIPT

#define ALIAS_FLUSH_START 0xffff4000

#define TOP_PTE(x) pte_offset_kernel(top_pmd, x)

static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr)
{
unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT);

set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL));
flush_tlb_kernel_page(to);

asm( "mcrr p15, 0, %1, %0, c14\n"
" mcrr p15, 0, %1, %0, c5\n"
:
: "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES)
: "cc");
}

void flush_cache_mm(struct mm_struct *mm)
{
if (cache_is_vivt()) {
Expand Down Expand Up @@ -67,24 +85,6 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsig
if (cache_is_vipt_aliasing())
flush_pfn_alias(pfn, user_addr);
}

#define ALIAS_FLUSH_START 0xffff4000

#define TOP_PTE(x) pte_offset_kernel(top_pmd, x)

static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr)
{
unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT);

set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL));
flush_tlb_kernel_page(to);

asm( "mcrr p15, 0, %1, %0, c14\n"
" mcrr p15, 0, %1, %0, c5\n"
:
: "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES)
: "cc");
}
#else
#define flush_pfn_alias(pfn,vaddr) do { } while (0)
#endif
Expand Down

0 comments on commit 43977c0

Please sign in to comment.