linux-stable/arch/parisc
John David Anglin c346494ec7 parisc: Restore __ldcw_align for PA-RISC 2.0 processors
commit 914988e099 upstream.

Back in 2005, Kyle McMartin removed the 16-byte alignment for
ldcw semaphores on PA 2.0 machines (CONFIG_PA20). This broke
spinlocks on pre PA8800 processors. The main symptom was random
faults in mmap'd memory (e.g., gcc compilations, etc).

Unfortunately, the errata for this ldcw change is lost.

The issue is the 16-byte alignment required for ldcw semaphore
instructions can only be reduced to natural alignment when the
ldcw operation can be handled coherently in cache. Only PA8800
and PA8900 processors actually support doing the operation in
cache.

Aligning the spinlock dynamically adds two integer instructions
to each spinlock.

Tested on rp3440, c8000 and a500.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Link: https://lore.kernel.org/linux-parisc/6b332788-2227-127f-ba6d-55e99ecf4ed8@bell.net/T/#t
Link: https://lore.kernel.org/linux-parisc/20050609050702.GB4641@roadwarrior.mcmartin.ca/
Cc: stable@vger.kernel.org
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-10 21:59:09 +02:00
..
boot parisc: Add missing FORCE prerequisite in Makefile 2021-09-09 12:44:30 +02:00
configs configs: remove the obsolete CONFIG_INPUT_POLLDEV 2021-09-08 11:50:28 -07:00
include parisc: Restore __ldcw_align for PA-RISC 2.0 processors 2023-10-10 21:59:09 +02:00
kernel parisc: irq: Make irq_stack_union static to avoid sparse warning 2023-10-06 13:18:15 +02:00
lib parisc: Add ioread64_lo_hi() and iowrite64_lo_hi() 2022-02-23 12:03:04 +01:00
math-emu parisc: math-emu: Fix fall-through warnings 2021-09-01 22:18:18 +02:00
mm parisc: Fix handling off probe non-access faults 2022-04-08 14:23:56 +02:00
defpalo.conf
install.sh parisc: Fix "make install" on newer debian releases 2021-12-08 09:04:55 +01:00
Kbuild parisc: move core-y in arch/parisc/Makefile to arch/parisc/Kbuild 2021-08-30 10:18:25 +02:00
Kconfig parisc: Allow CONFIG_64BIT with ARCH=parisc 2022-09-23 14:15:48 +02:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile parisc: Fix KBUILD_IMAGE for self-extracting kernel 2021-12-08 09:04:55 +01:00
nm