]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerHelge Deller <deller@gmx.de>
Tue, 2 Jan 2018 21:21:54 +0000 (22:21 +0100)
commit1d292234204b1f87af08af46d516a026d7c2a71a
treebc64c9059b85aec589d66e2c38a6510d0778d2f8
parente9f0614546a791d90d94b6808bed815eec733a0b
parisc: Fix alignment of pa_tlb_lock in assembly on 32-bit SMP kernel

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>
Cc: <stable@vger.kernel.org> # v4.0+
arch/parisc/include/asm/ldcw.h
arch/parisc/kernel/entry.S
arch/parisc/kernel/pacache.S