Author: nbd Date: 2016-01-25 11:28:29 +0100 (Mon, 25 Jan 2016) New Revision: 48482
Modified: trunk/target/linux/generic/patches-4.3/101-MIPS-fix-cache-flushing-for-highmem-pages.patch trunk/target/linux/generic/patches-4.3/309-mips_fuse_workaround.patch trunk/target/linux/generic/patches-4.4/101-MIPS-fix-cache-flushing-for-highmem-pages.patch trunk/target/linux/generic/patches-4.4/309-mips_fuse_workaround.patch Log: kernel: fix a small bug in the MIPS highmem fix Signed-off-by: Felix Fietkau <[email protected]> Modified: trunk/target/linux/generic/patches-4.3/101-MIPS-fix-cache-flushing-for-highmem-pages.patch =================================================================== --- trunk/target/linux/generic/patches-4.3/101-MIPS-fix-cache-flushing-for-highmem-pages.patch 2016-01-25 10:28:19 UTC (rev 48481) +++ trunk/target/linux/generic/patches-4.3/101-MIPS-fix-cache-flushing-for-highmem-pages.patch 2016-01-25 10:28:29 UTC (rev 48482) @@ -79,17 +79,23 @@ 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; Modified: trunk/target/linux/generic/patches-4.3/309-mips_fuse_workaround.patch =================================================================== --- trunk/target/linux/generic/patches-4.3/309-mips_fuse_workaround.patch 2016-01-25 10:28:19 UTC (rev 48481) +++ trunk/target/linux/generic/patches-4.3/309-mips_fuse_workaround.patch 2016-01-25 10:28:29 UTC (rev 48482) @@ -1,6 +1,6 @@ --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c -@@ -38,6 +38,7 @@ void (*__flush_cache_vunmap)(void); +@@ -39,6 +39,7 @@ void (*__flush_cache_vunmap)(void); void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size); EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range); Modified: trunk/target/linux/generic/patches-4.4/101-MIPS-fix-cache-flushing-for-highmem-pages.patch =================================================================== --- trunk/target/linux/generic/patches-4.4/101-MIPS-fix-cache-flushing-for-highmem-pages.patch 2016-01-25 10:28:19 UTC (rev 48481) +++ trunk/target/linux/generic/patches-4.4/101-MIPS-fix-cache-flushing-for-highmem-pages.patch 2016-01-25 10:28:29 UTC (rev 48482) @@ -79,17 +79,23 @@ 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; Modified: trunk/target/linux/generic/patches-4.4/309-mips_fuse_workaround.patch =================================================================== --- trunk/target/linux/generic/patches-4.4/309-mips_fuse_workaround.patch 2016-01-25 10:28:19 UTC (rev 48481) +++ trunk/target/linux/generic/patches-4.4/309-mips_fuse_workaround.patch 2016-01-25 10:28:29 UTC (rev 48482) @@ -1,6 +1,6 @@ --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c -@@ -38,6 +38,7 @@ void (*__flush_cache_vunmap)(void); +@@ -39,6 +39,7 @@ void (*__flush_cache_vunmap)(void); void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size); EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range); _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
