Commit 08a491b2 authored by Helge Deller's avatar Helge Deller

Revert "parisc: Fix invalidate/flush vmap routines"

This reverts commit 53d862fa.

It turned out that flush_kernel_vmap_range() is being called with
interrupts disabled.  There's no way to flush entire cache with
interrupts disabled.
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent ae085d7f
...@@ -611,8 +611,8 @@ void ...@@ -611,8 +611,8 @@ void
flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn) flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn)
{ {
if (pfn_valid(pfn)) { if (pfn_valid(pfn)) {
flush_tlb_page(vma, vmaddr);
if (likely(vma->vm_mm->context.space_id)) { if (likely(vma->vm_mm->context.space_id)) {
flush_tlb_page(vma, vmaddr);
__flush_cache_page(vma, vmaddr, PFN_PHYS(pfn)); __flush_cache_page(vma, vmaddr, PFN_PHYS(pfn));
} else { } else {
__purge_cache_page(vma, vmaddr, PFN_PHYS(pfn)); __purge_cache_page(vma, vmaddr, PFN_PHYS(pfn));
...@@ -624,7 +624,6 @@ void flush_kernel_vmap_range(void *vaddr, int size) ...@@ -624,7 +624,6 @@ void flush_kernel_vmap_range(void *vaddr, int size)
{ {
unsigned long start = (unsigned long)vaddr; unsigned long start = (unsigned long)vaddr;
unsigned long end = start + size; unsigned long end = start + size;
unsigned long flags, physaddr;
if ((!IS_ENABLED(CONFIG_SMP) || !arch_irqs_disabled()) && if ((!IS_ENABLED(CONFIG_SMP) || !arch_irqs_disabled()) &&
(unsigned long)size >= parisc_cache_flush_threshold) { (unsigned long)size >= parisc_cache_flush_threshold) {
...@@ -633,14 +632,8 @@ void flush_kernel_vmap_range(void *vaddr, int size) ...@@ -633,14 +632,8 @@ void flush_kernel_vmap_range(void *vaddr, int size)
return; return;
} }
while (start < end) { flush_kernel_dcache_range_asm(start, end);
physaddr = lpa(start); flush_tlb_kernel_range(start, end);
purge_tlb_start(flags);
pdtlb(SR_KERNEL, start);
purge_tlb_end(flags);
flush_dcache_page_asm(physaddr, start);
start += PAGE_SIZE;
}
} }
EXPORT_SYMBOL(flush_kernel_vmap_range); EXPORT_SYMBOL(flush_kernel_vmap_range);
...@@ -648,7 +641,6 @@ void invalidate_kernel_vmap_range(void *vaddr, int size) ...@@ -648,7 +641,6 @@ void invalidate_kernel_vmap_range(void *vaddr, int size)
{ {
unsigned long start = (unsigned long)vaddr; unsigned long start = (unsigned long)vaddr;
unsigned long end = start + size; unsigned long end = start + size;
unsigned long flags, physaddr;
if ((!IS_ENABLED(CONFIG_SMP) || !arch_irqs_disabled()) && if ((!IS_ENABLED(CONFIG_SMP) || !arch_irqs_disabled()) &&
(unsigned long)size >= parisc_cache_flush_threshold) { (unsigned long)size >= parisc_cache_flush_threshold) {
...@@ -657,13 +649,7 @@ void invalidate_kernel_vmap_range(void *vaddr, int size) ...@@ -657,13 +649,7 @@ void invalidate_kernel_vmap_range(void *vaddr, int size)
return; return;
} }
while (start < end) { purge_kernel_dcache_range_asm(start, end);
physaddr = lpa(start); flush_tlb_kernel_range(start, end);
purge_tlb_start(flags);
pdtlb(SR_KERNEL, start);
purge_tlb_end(flags);
purge_dcache_page_asm(physaddr, start);
start += PAGE_SIZE;
}
} }
EXPORT_SYMBOL(invalidate_kernel_vmap_range); EXPORT_SYMBOL(invalidate_kernel_vmap_range);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment