Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172384
b: refs/heads/master
c: 421fe93
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Dec 1, 2009
1 parent 698488a commit 0b5a973
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 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: b7dc0b2cfc6e9bc7270915c642a8a8e999b6095e
refs/heads/master: 421fe93cc4b06b2f5e875cbe0f692800d4862ee5
7 changes: 7 additions & 0 deletions trunk/arch/arm/mm/fault-armv.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,14 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte)
if (!pfn_valid(pfn))
return;

/*
* The zero page is never written to, so never has any dirty
* cache lines, and therefore never needs to be flushed.
*/
page = pfn_to_page(pfn);
if (page == ZERO_PAGE(0))
return;

mapping = page_mapping(page);
#ifndef CONFIG_SMP
if (test_and_clear_bit(PG_dcache_dirty, &page->flags))
Expand Down
11 changes: 10 additions & 1 deletion trunk/arch/arm/mm/flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,16 @@ static void __flush_dcache_aliases(struct address_space *mapping, struct page *p
*/
void flush_dcache_page(struct page *page)
{
struct address_space *mapping = page_mapping(page);
struct address_space *mapping;

/*
* The zero page is never written to, so never has any dirty
* cache lines, and therefore never needs to be flushed.
*/
if (page == ZERO_PAGE(0))
return;

mapping = page_mapping(page);

#ifndef CONFIG_SMP
if (!PageHighMem(page) && mapping && !mapping_mapped(mapping))
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ void __init paging_init(struct machine_desc *mdesc)
*/
zero_page = alloc_bootmem_low_pages(PAGE_SIZE);
empty_zero_page = virt_to_page(zero_page);
flush_dcache_page(empty_zero_page);
__flush_dcache_page(NULL, empty_zero_page);
}

/*
Expand Down

0 comments on commit 0b5a973

Please sign in to comment.