diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-10-12 22:18:34 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-12 22:18:34 -0400 |
commit | 964f7e5a56814b32c727821de77d22bd7ef782bc (patch) | |
tree | f0413940c7e1dcb7a4dead52d0b04a0093ad39e9 /arch | |
parent | af67c3a9e68ee0a9e30ee8582577408adba0e299 (diff) |
sh: force dcache flush if dcache_dirty bit set.
This too follows the ARM change, given that the issue at hand applies to
all platforms that implement lazy D-cache writeback.
This fixes up the case when a page mapping disappears between the
flush_dcache_page() call (when PG_dcache_dirty is set for the page) and
the update_mmu_cache() call -- such as in the case of swap cache being
freed early. This kills off the mapping test in update_mmu_cache() and
switches to simply testing for PG_dcache_dirty.
Reported-by: Nitin Gupta <ngupta@vflare.org>
Reported-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/mm/cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/mm/cache.c b/arch/sh/mm/cache.c index 35c37b7f717a..5e1091be9dc4 100644 --- a/arch/sh/mm/cache.c +++ b/arch/sh/mm/cache.c | |||
@@ -128,7 +128,7 @@ void __update_cache(struct vm_area_struct *vma, | |||
128 | return; | 128 | return; |
129 | 129 | ||
130 | page = pfn_to_page(pfn); | 130 | page = pfn_to_page(pfn); |
131 | if (pfn_valid(pfn) && page_mapping(page)) { | 131 | if (pfn_valid(pfn)) { |
132 | int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags); | 132 | int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags); |
133 | if (dirty) { | 133 | if (dirty) { |
134 | unsigned long addr = (unsigned long)page_address(page); | 134 | unsigned long addr = (unsigned long)page_address(page); |