linux/arch/parisc/kernel
Helge Deller 527a1d1ede parisc: Fix crash due alternative coding for NP iopdir_fdc bit
According to the found documentation, data cache flushes and sync
instructions are needed on the PCX-U+ (PA8200, e.g. C200/C240)
platforms, while PCX-W (PA8500, e.g. C360) platforms aparently don't
need those flushes when changing the IO PDIR data structures.

We have no documentation for PCX-W+ (PA8600) and PCX-W2 (PA8700) CPUs,
but Carlo Pisani reported that his C3600 machine (PA8600, PCX-W+) fails
when the fdc instructions were removed. His firmware didn't set the NIOP
bit, so one may assume it's a firmware bug since other C3750 machines
had the bit set.

Even if documentation (as mentioned above) states that PCX-W (PA8500,
e.g.  J5000) does not need fdc flushes, Sven could show that an Adaptec
29320A PCI-X SCSI controller reliably failed on a dd command during the
first five minutes in his J5000 when fdc flushes were missing.

Going forward, we will now NOT replace the fdc and sync assembler
instructions by NOPS if:
a) the NP iopdir_fdc bit was set by firmware, or
b) we find a CPU up to and including a PCX-W+ (PA8600).

This fixes the HPMC crashes on a C240 and C36XX machines. For other
machines we rely on the firmware to set the bit when needed.

In case one finds HPMC issues, people could try to boot their machines
with the "no-alternatives" kernel option to turn off any alternative
patching.

Reported-by: Sven Schnelle <svens@stackframe.org>
Reported-by: Carlo Pisani <carlojpisani@gmail.com>
Tested-by: Sven Schnelle <svens@stackframe.org>
Fixes: 3847dab774 ("parisc: Add alternative coding infrastructure")
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # 5.0+
2019-06-06 14:25:22 +02:00
..
syscalls uapi: Wire up the mount API syscalls on non-x86 arches [ver #2] 2019-05-16 12:23:45 -04:00
.gitignore parisc: add arch/parisc/kernel/.gitignore 2008-10-10 16:32:28 +00:00
alternative.c parisc: Fix crash due alternative coding for NP iopdir_fdc bit 2019-06-06 14:25:22 +02: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
cache.c parisc: Use __ro_after_init in cache.c 2019-05-10 21:00:44 +02: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: Use __ro_after_init in drivers.c 2019-05-10 21:00:44 +02:00
entry.S parisc: Use per-pagetable spinlock 2019-05-03 23:47:41 +02:00
firmware.c parisc: Use __ro_after_init in firmware.c 2019-05-10 21:00:44 +02:00
ftrace.c function_graph: Place ftrace_graph_entry_stub() prototype in include/linux/ftrace.h 2019-04-29 17:17:22 -04:00
hardware.c parisc: Move various functions and strings to init section 2018-03-27 18:52:21 +02:00
head.S parisc: Use __ro_after_init in head.S 2019-05-10 21:00:44 +02:00
hpmc.S parisc: Fix exported address of os_hpmc handler 2018-10-17 08:18:01 +02:00
inventory.c parisc: Use __ro_after_init in inventory.c 2019-05-10 21:00:44 +02:00
irq.c parisc: Improve initial IRQ to CPU assignment 2019-02-21 20:37:11 +01:00
jump_label.c parisc: Add static branch and JUMP_LABEL feature 2019-05-06 00:10:03 +02:00
kgdb.c parisc: add KGDB support 2019-05-03 23:47:38 +02:00
kprobes.c parisc: Implement kretprobes 2019-05-03 23:47:39 +02:00
Makefile parisc: Add static branch and JUMP_LABEL feature 2019-05-06 00:10:03 +02:00
module.c parisc: Split out alternative live patching code 2018-12-10 07:47:50 +01: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: Remove lock code to serialize TLB operations in pacache.S 2019-05-03 23:47:40 +02:00
parisc_ksyms.c parisc: Switch from DISCONTIGMEM to SPARSEMEM 2019-05-03 23:47:40 +02:00
patch.c parisc: remove unused flags parameter in __patch_text() 2019-05-03 23:47:39 +02:00
pci-dma.c dma-mapping: zero memory returned from dma_alloc_* 2018-12-20 08:13:52 +01:00
pci.c parisc: Use __ro_after_init in pci.c 2019-05-10 21:00:44 +02:00
pdc_chassis.c proc: introduce proc_create_single{,_data} 2018-05-16 07:23:35 +02:00
pdc_cons.c treewide: Switch DEFINE_TIMER callbacks to struct timer_list * 2017-11-21 15:57:05 -08:00
pdt.c mm/memory_failure: Remove unused trapno from memory_failure 2018-01-23 12:17:42 -06:00
perf_asm.S Revert "parisc: fix trivial section name warnings" 2008-06-13 10:49:45 -04:00
perf_images.h parisc: Use __ro_after_init in perf_images.h 2019-05-10 21:00:44 +02:00
perf.c parisc: Static initialization of spinlocks in perf and unwind code 2017-08-22 16:34:33 +02:00
process.c parisc: Use __ro_after_init in process.c 2019-05-10 21:00:45 +02:00
processor.c parisc: Use __ro_after_init in processor.c 2019-05-10 21:00:45 +02:00
ptrace.c parisc: add functions required by KPROBE_EVENTS 2019-05-03 23:47:39 +02:00
real2.S parisc: Fix and improve kernel stack unwinding 2018-08-13 09:54:17 +02:00
setup.c parisc: Use per-pagetable spinlock 2019-05-03 23:47:41 +02:00
signal32.c signal: Unify and correct copy_siginfo_to_user32 2018-01-15 19:56:20 -06:00
signal32.h signal: Unify and correct copy_siginfo_to_user32 2018-01-15 19:56:20 -06:00
signal.c parisc: Add alternative coding infrastructure 2018-10-17 17:22:26 +02:00
smp.c parisc: Count IPI function call interrupts 2019-02-21 20:37:11 +01:00
stacktrace.c parisc/stacktrace: Remove the pointless ULONG_MAX marker 2019-04-14 19:58:29 +02: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 parisc: Consider stack randomization for mmap base only when necessary 2019-05-03 23:47:38 +02:00
syscall.S parisc: Drop LDCW barrier in CAS code when running UP 2019-05-10 21:00:24 +02:00
time.c parisc: Use __ro_after_init in time.c 2019-05-10 21:00:45 +02:00
topology.c parisc: Add CPU topology support 2017-11-17 15:27:22 +01:00
traps.c parisc: Implement kprobes 2019-05-03 23:47:39 +02:00
unaligned.c signal/parisc: Use force_sig_fault where appropriate 2018-04-25 10:44:06 -05:00
unwind.c parisc: Use __ro_after_init in unwind.c 2019-05-10 21:00:45 +02:00
vmlinux.lds.S parisc: Allow building 64-bit kernel without -mlong-calls compiler option 2019-05-20 10:51:39 +02:00