Patch "parisc: Optimize flush_kernel_vmap_range and invalidate_kernel_vmap_range" has been added to the 4.10-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
parisc: Optimize flush_kernel_vmap_range and invalidate_kernel_vmap_range
to the 4.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
parisc-optimize-flush_kernel_vmap_range-and-invalidate_kernel_vmap_range.patch
and it can be found in the queue-4.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
316ec0624f951166daedbe446988ef92ae72b59fMon Sep 17 00:00:00 2001
From: John David Anglin <[email protected]>
Date: Sat, 11 Mar 2017 18:03:34 -0500
Subject: parisc: Optimize flush_kernel_vmap_range and invalidate_kernel_vmap_range
From: John David Anglin <[email protected]>
commit 316ec0624f951166daedbe446988ef92ae72b59f upstream.
The previously submitted patch did not resolve the random segmentation faults observed on the phantom buildd system. There are still unresolved problems with the Debian 4.8 and 4.9 kernels on C8000.
The attached patch removes the flush of the offset map pages and does a whole data cache flush for large ranges. No other arch flushes the offset map in these routines as far as I can tell.
I have not observed any random segmentation faults on rp3440 in two weeks of testing with 4.10.0 and 4.10.1.
--- arch/parisc/include/asm/cacheflush.h | 23 ++--------------------- arch/parisc/kernel/cache.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 21 deletions(-)
arch/parisc/include/asm/cacheflush.h +2 -21
@@ -45,28 +45,9 @@ static inline void flush_kernel_dcache_p#define flush_kernel_dcache_range (start,size) \ flush_kernel_dcache_range_asm((start), (start)+(size)); -/* vmap range flushes and invalidates. Architecturally, we don't need -* the invalidate, because the CPU should refuse to speculate once an -* area has been flushed, so invalidate is left empty */ -static inline void flush_kernel_vmap_range (void *vaddr,int size) -{ -unsigned long start = (unsigned long )vaddr; -flush_kernel_dcache_range_asm (start, start + size); -} -static inline void invalidate_kernel_vmap_range (void *vaddr,int size) -{ -unsigned long start = (unsigned long )vaddr; -void *cursor = vaddr; - -for ( ; cursor < vaddr + size; cursor +=PAGE_SIZE ) { -struct page *page =vmalloc_to_page (cursor); - -if (test_and_clear_bit (PG_dcache_dirty, &page->flags)) -flush_kernel_dcache_page (page); - } -flush_kernel_dcache_range_asm (start, start + size); -} +void flush_kernel_vmap_range (void *vaddr,int size); +void invalidate_kernel_vmap_range (void *vaddr,int size);#define flush_cache_vmap (start, end) flush_cache_all()#define flush_cache_vunmap (start, end) flush_cache_all()
arch/parisc/kernel/cache.c +22 -0
@@ -633,3 +633,25 @@ flush_cache_page(struct vm_area_struct *__flush_cache_page (vma, vmaddr,PFN_PHYS (pfn)); } } + +void flush_kernel_vmap_range (void *vaddr,int size) +{ +unsigned long start = (unsigned long )vaddr; + +if ((unsigned long )size > parisc_cache_flush_threshold) +flush_data_cache (); +else +flush_kernel_dcache_range_asm (start, start + size); +} +EXPORT_SYMBOL (flush_kernel_vmap_range); + +void invalidate_kernel_vmap_range (void *vaddr,int size) +{ +unsigned long start = (unsigned long )vaddr; + +if ((unsigned long )size > parisc_cache_flush_threshold) +flush_data_cache (); +else +flush_kernel_dcache_range_asm (start, start + size); +} +EXPORT_SYMBOL (invalidate_kernel_vmap_range);
Patches currently in stable-queue which might be from [email protected] are
queue-4.10/parisc-optimize-flush_kernel_vmap_range-and-invalidate_kernel_vmap_range.patch