linux/arch/parisc/kernel
John David Anglin 0adb24e03a parisc: Fix ordering of cache and TLB flushes
The change to flush_kernel_vmap_range() wasn't sufficient to avoid the
SMP stalls.  The problem is some drivers call these routines with
interrupts disabled.  Interrupts need to be enabled for flush_tlb_all()
and flush_cache_all() to work.  This version adds checks to ensure
interrupts are not disabled before calling routines that need IPI
interrupts.  When interrupts are disabled, we now drop into slower code.

The attached change fixes the ordering of cache and TLB flushes in
several cases.  When we flush the cache using the existing PTE/TLB
entries, we need to flush the TLB after doing the cache flush.  We don't
need to do this when we flush the entire instruction and data caches as
these flushes don't use the existing TLB entries.  The same is true for
tmpalias region flushes.

The flush_kernel_vmap_range() and invalidate_kernel_vmap_range()
routines have been updated.

Secondly, we added a new purge_kernel_dcache_range_asm() routine to
pacache.S and use it in invalidate_kernel_vmap_range().  Nominally,
purges are faster than flushes as the cache lines don't have to be
written back to memory.

Hopefully, this is sufficient to resolve the remaining problems due to
cache speculation.  So far, testing indicates that this is the case.  I
did work up a patch using tmpalias flushes, but there is a performance
hit because we need the physical address for each page, and we also need
to sequence access to the tmpalias flush code.  This increases the
probability of stalls.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: stable@vger.kernel.org # 4.9+
Signed-off-by: Helge Deller <deller@gmx.de>
2018-03-02 10:03:28 +01:00
..
.gitignore parisc: add arch/parisc/kernel/.gitignore 2008-10-10 16:32:28 +00:00
asm-offsets.c parisc: Drop per_cpu uaccess related exception_data struct 2017-05-10 17:46:13 +02:00
audit.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
binfmt_elf32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cache.c parisc: Fix ordering of cache and TLB flushes 2018-03-02 10:03:28 +01:00
compat_audit.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drivers.c parisc: Show unhashed hardware inventory 2018-01-02 21:00:57 +01:00
entry.S parisc: Fix alignment of pa_tlb_lock in assembly on 32-bit SMP kernel 2018-01-02 22:21:54 +01:00
firmware.c parisc: Add wrapper for pdc_instr() firmware function 2017-09-22 19:46:44 +02:00
ftrace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hardware.c parisc: add serial ports of C8000/1GHz machine to hardware database 2014-07-13 15:51:58 +02:00
head.S parisc: Fix ftrace function tracer 2016-04-14 17:47:19 +02:00
hpmc.S parisc: Align os_hpmc_size on word boundary 2017-12-17 21:06:25 +01:00
inventory.c parisc: Add Page Deallocation Table (PDT) support 2017-05-12 09:14:15 +02:00
irq.c parisc: Increase thread and stack size to 32kb 2017-07-31 08:41:26 +02:00
Makefile parisc: Add CPU topology support 2017-11-17 15:27:22 +01:00
module.c mm, vmalloc: use __GFP_HIGHMEM implicitly 2017-05-08 17:15:13 -07:00
pa7300lc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pacache.S parisc: Fix ordering of cache and TLB flushes 2018-03-02 10:03:28 +01:00
parisc_ksyms.c parisc: Export __cmpxchg_u64 unconditionally 2017-10-19 08:48:45 +02:00
pci-dma.c A couple of dma-mapping updates: 2017-11-14 16:54:12 -08:00
pci.c parisc: Use generic pci_mmap_resource_range() 2017-04-20 08:47:47 -05:00
pdc_chassis.c parisc: single_open() leaks 2013-05-05 00:10:41 -04:00
pdc_cons.c treewide: Switch DEFINE_TIMER callbacks to struct timer_list * 2017-11-21 15:57:05 -08:00
pdt.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf_asm.S Revert "parisc: fix trivial section name warnings" 2008-06-13 10:49:45 -04:00
perf_images.h
perf.c parisc: Static initialization of spinlocks in perf and unwind code 2017-08-22 16:34:33 +02:00
process.c parisc: qemu idle sleep support 2018-01-06 12:28:04 +01:00
processor.c parisc: Add CPU topology support 2017-11-17 15:27:22 +01:00
ptrace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
real2.S parisc: Make existing core files reuseable for bootloader 2017-08-22 16:34:35 +02:00
setup.c parisc: Add CPU topology support 2017-11-17 15:27:22 +01:00
signal32.c parisc: switch to {get,put}_compat_sigset() 2017-09-19 17:56:02 -04:00
signal32.h parisc: switch to {get,put}_compat_sigset() 2017-09-19 17:56:02 -04:00
signal.c Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 11:54:55 -08:00
smp.c parisc: Move init_per_cpu() into init section 2017-09-22 19:47:08 +02:00
stacktrace.c parisc: add LATENCYTOP_SUPPORT and CONFIG_STACKTRACE_SUPPORT 2009-03-31 02:51:34 +00:00
sys_parisc32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sys_parisc.c mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
syscall_table.S parisc: use compat_sys_keyctl() 2017-07-02 22:10:47 +02:00
syscall.S parisc: Fix validity check of pointer size argument in new CAS implementation 2017-11-17 15:27:13 +01:00
time.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
topology.c parisc: Add CPU topology support 2017-11-17 15:27:22 +01:00
traps.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
unaligned.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/debug.h> 2017-03-02 08:42:34 +01:00
unwind.c parisc: remove duplicate includes 2017-12-17 21:06:25 +01:00
vmlinux.lds.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00