OSDN Git Service

parisc: Fix alignment of pa_tlb_lock in assembly on 32-bit SMP kernel
authorHelge Deller <deller@gmx.de>
Tue, 2 Jan 2018 19:36:44 +0000 (20:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2018 08:31:22 +0000 (09:31 +0100)
commitfb510265edaf4809c050e620231b6ea69507fe82
treef64729152e1f353dae9111cdf3b47931a63af3a3
parentf5edee88ad430356e5c6b1c309782cce3f736272
parisc: Fix alignment of pa_tlb_lock in assembly on 32-bit SMP kernel

commit 88776c0e70be0290f8357019d844aae15edaa967 upstream.

Qemu for PARISC reported on a 32bit SMP parisc kernel strange failures
about "Not-handled unaligned insn 0x0e8011d6 and 0x0c2011c9."

Those opcodes evaluate to the ldcw() assembly instruction which requires
(on 32bit) an alignment of 16 bytes to ensure atomicity.

As it turns out, qemu is correct and in our assembly code in entry.S and
pacache.S we don't pay attention to the required alignment.

This patch fixes the problem by aligning the lock offset in assembly
code in the same manner as we do in our C-code.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/parisc/include/asm/ldcw.h
arch/parisc/kernel/entry.S
arch/parisc/kernel/pacache.S