summaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2022-03-27 18:53:42 +0200
committerHelge Deller <deller@gmx.de>2022-03-29 16:23:11 +0200
commit08a491b2e4b1c4c618ee82d3f4b0ff3b20c5acf5 (patch)
tree1095027bc085c8213383e3c30dd9664719c05285 /arch/parisc
parentae085d7f9365de7da27ab5c0d16b12d51ea7fca9 (diff)
downloadlinux-08a491b2e4b1c4c618ee82d3f4b0ff3b20c5acf5.tar.bz2
Revert "parisc: Fix invalidate/flush vmap routines"
This reverts commit 53d862fac4a09b9c56cca0433fa9de5732fd05a1. 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: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/cache.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 456e879d34a8..d41fee3a9874 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -611,8 +611,8 @@ void
flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn)
{
if (pfn_valid(pfn)) {
- flush_tlb_page(vma, vmaddr);
if (likely(vma->vm_mm->context.space_id)) {
+ flush_tlb_page(vma, vmaddr);
__flush_cache_page(vma, vmaddr, PFN_PHYS(pfn));
} else {
__purge_cache_page(vma, vmaddr, PFN_PHYS(pfn));
@@ -624,7 +624,6 @@ void flush_kernel_vmap_range(void *vaddr, int size)
{
unsigned long start = (unsigned long)vaddr;
unsigned long end = start + size;
- unsigned long flags, physaddr;
if ((!IS_ENABLED(CONFIG_SMP) || !arch_irqs_disabled()) &&
(unsigned long)size >= parisc_cache_flush_threshold) {
@@ -633,14 +632,8 @@ void flush_kernel_vmap_range(void *vaddr, int size)
return;
}
- while (start < end) {
- physaddr = lpa(start);
- purge_tlb_start(flags);
- pdtlb(SR_KERNEL, start);
- purge_tlb_end(flags);
- flush_dcache_page_asm(physaddr, start);
- start += PAGE_SIZE;
- }
+ flush_kernel_dcache_range_asm(start, end);
+ flush_tlb_kernel_range(start, end);
}
EXPORT_SYMBOL(flush_kernel_vmap_range);
@@ -648,7 +641,6 @@ void invalidate_kernel_vmap_range(void *vaddr, int size)
{
unsigned long start = (unsigned long)vaddr;
unsigned long end = start + size;
- unsigned long flags, physaddr;
if ((!IS_ENABLED(CONFIG_SMP) || !arch_irqs_disabled()) &&
(unsigned long)size >= parisc_cache_flush_threshold) {
@@ -657,13 +649,7 @@ void invalidate_kernel_vmap_range(void *vaddr, int size)
return;
}
- while (start < end) {
- physaddr = lpa(start);
- purge_tlb_start(flags);
- pdtlb(SR_KERNEL, start);
- purge_tlb_end(flags);
- purge_dcache_page_asm(physaddr, start);
- start += PAGE_SIZE;
- }
+ purge_kernel_dcache_range_asm(start, end);
+ flush_tlb_kernel_range(start, end);
}
EXPORT_SYMBOL(invalidate_kernel_vmap_range);