diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-03-30 15:11:26 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-03-30 15:11:26 -0700 |
commit | d5fd43bac8396c9b213faf14cd4560d73b30f618 (patch) | |
tree | 3d872c274360358a482619c09492752848f638be /arch/parisc/kernel/cache.c | |
parent | 57c06b6e1e74b62eabaacacbe40bdb29c7e990eb (diff) | |
parent | a9fe7fa7d874a536e0540469f314772c054a0323 (diff) | |
download | linux-d5fd43bac8396c9b213faf14cd4560d73b30f618.tar.gz linux-d5fd43bac8396c9b213faf14cd4560d73b30f618.tar.bz2 linux-d5fd43bac8396c9b213faf14cd4560d73b30f618.zip |
Merge tag 'for-5.18/parisc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull more parisc architecture updates from Helge Deller:
- Revert a patch to the invalidate/flush vmap routines which broke
kernel patching functions on older PA-RISC machines.
- Fix the kernel patching code wrt locking and flushing. Works now on
B160L machine as well.
- Fix CPU IRQ affinity for LASI, WAX and Dino chips
- Add CPU hotplug support
- Detect the hppa-suse-linux-gcc compiler when cross-compiling
* tag 'for-5.18/parisc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: Fix patch code locking and flushing
parisc: Find a new timesync master if current CPU is removed
parisc: Move common_stext into .text section when CONFIG_HOTPLUG_CPU=y
parisc: Rewrite arch_cpu_idle_dead() for CPU hotplugging
parisc: Implement __cpu_die() and __cpu_disable() for CPU hotplugging
parisc: Add PDC locking functions for rendezvous code
parisc: Move disable_sr_hashing_asm() into .text section
parisc: Move CPU startup-related functions into .text section
parisc: Move store_cpu_topology() into text section
parisc: Switch from GENERIC_CPU_DEVICES to GENERIC_ARCH_TOPOLOGY
parisc: Ensure set_firmware_width() is called only once
parisc: Add constants for control registers and clean up mfctl()
parisc: Detect hppa-suse-linux-gcc compiler for cross-building
parisc: Clean up cpu_check_affinity() and drop cpu_set_affinity_irq()
parisc: Fix CPU affinity for Lasi, WAX and Dino chips
Revert "parisc: Fix invalidate/flush vmap routines"
Diffstat (limited to 'arch/parisc/kernel/cache.c')
-rw-r--r-- | arch/parisc/kernel/cache.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index 456e879d34a8..23348199f3f8 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c @@ -273,7 +273,7 @@ parisc_cache_init(void) } } -void __init disable_sr_hashing(void) +void disable_sr_hashing(void) { int srhash_type, retval; unsigned long space_bits; @@ -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); |