Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45177
b: refs/heads/master
c: 1c9d3df
h: refs/heads/master
i:
  45175: 27e4124
v: v3
  • Loading branch information
Richard Purdie authored and Russell King committed Dec 30, 2006
1 parent da71fbe commit 4f3f742
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b0b1d60a64054697ef828e0565f006cc0f823590
refs/heads/master: 1c9d3df5e88ad7db23f5b22f4341c39722a904a4
6 changes: 6 additions & 0 deletions trunk/arch/arm/mm/copypage-v4mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/tlbflush.h>
#include <asm/cacheflush.h>

#include "mm.h"

Expand Down Expand Up @@ -69,6 +70,11 @@ mc_copy_user_page(void *from, void *to)

void v4_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr)
{
struct page *page = virt_to_page(kfrom);

if (test_and_clear_bit(PG_dcache_dirty, &page->flags))
__flush_dcache_page(page_mapping(page), page);

spin_lock(&minicache_lock);

set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0);
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/arm/mm/copypage-v6.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ static void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned lo
{
unsigned int offset = CACHE_COLOUR(vaddr);
unsigned long from, to;
struct page *page = virt_to_page(kfrom);

if (test_and_clear_bit(PG_dcache_dirty, &page->flags))
__flush_dcache_page(page_mapping(page), page);

/*
* Discard data in the kernel mapping for the new page.
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/arm/mm/copypage-xscale.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/tlbflush.h>
#include <asm/cacheflush.h>

#include "mm.h"

Expand Down Expand Up @@ -91,6 +92,11 @@ mc_copy_user_page(void *from, void *to)

void xscale_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr)
{
struct page *page = virt_to_page(kfrom);

if (test_and_clear_bit(PG_dcache_dirty, &page->flags))
__flush_dcache_page(page_mapping(page), page);

spin_lock(&minicache_lock);

set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-arm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ extern void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
*/
extern void flush_dcache_page(struct page *);

extern void __flush_dcache_page(struct address_space *mapping, struct page *page);

#define flush_dcache_mmap_lock(mapping) \
write_lock_irq(&(mapping)->tree_lock)
#define flush_dcache_mmap_unlock(mapping) \
Expand Down

0 comments on commit 4f3f742

Please sign in to comment.