diff options
Diffstat (limited to 'target/linux/generic/patches-4.3/101-MIPS-fix-cache-flushing-for-highmem-pages.patch')
-rw-r--r-- | target/linux/generic/patches-4.3/101-MIPS-fix-cache-flushing-for-highmem-pages.patch | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/target/linux/generic/patches-4.3/101-MIPS-fix-cache-flushing-for-highmem-pages.patch b/target/linux/generic/patches-4.3/101-MIPS-fix-cache-flushing-for-highmem-pages.patch index d7220af..6a6c581 100644 --- a/target/linux/generic/patches-4.3/101-MIPS-fix-cache-flushing-for-highmem-pages.patch +++ b/target/linux/generic/patches-4.3/101-MIPS-fix-cache-flushing-for-highmem-pages.patch @@ -79,17 +79,23 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org> addr = (unsigned long) page_address(page); flush_data_cache_page(addr); -@@ -142,7 +161,12 @@ void __update_cache(struct vm_area_struc +@@ -142,12 +161,17 @@ void __update_cache(struct vm_area_struc if (unlikely(!pfn_valid(pfn))) return; page = pfn_to_page(pfn); - if (page_mapping(page) && Page_dcache_dirty(page)) { -+ if (!Page_dcache_dirty(page)) ++ if (!Page_dcache_dirty(page) || !page_mapping(page)) + return; + + if (PageHighMem(page)) { + flush_highmem_page(page); -+ } else if (page_mapping(page)) { ++ } else { addr = (unsigned long) page_address(page); if (exec || pages_do_alias(addr, address & PAGE_MASK)) flush_data_cache_page(addr); +- ClearPageDcacheDirty(page); + } ++ ClearPageDcacheDirty(page); + } + + unsigned long _page_cachable_default; |