]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Fix minimum alignment requirement of IRQ stack
authorMatt Redfearn <matt.redfearn@imgtec.com>
Mon, 10 Jul 2017 08:43:31 +0000 (09:43 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 11 Jul 2017 12:13:06 +0000 (14:13 +0200)
commitae682c9fae873f823a1ed43665b9da93eb1d9526
tree60b05c55e9ace94852b6f61b78011550f6e80e53
parent5874d4e4ddbf4ff35889b8ef220f989dc9424167
MIPS: Fix minimum alignment requirement of IRQ stack

Commit 588cbf75877c ("MIPS: IRQ Stack: Unwind IRQ stack onto task
stack") erroneously set the initial stack pointer of the IRQ stack to a
value with a 4 byte alignment. The MIPS32 ABI requires that the minimum
stack alignment is 8 byte, and the MIPS64 ABIs(n32/n64) require 16 byte
minimum alignment. Fix IRQ_STACK_START such that it leaves space for the
dummy stack frame (containing interrupted task kernel stack pointer)
while also meeting minimum alignment requirements.

Fixes: 588cbf75877c ("MIPS: IRQ Stack: Unwind IRQ stack onto task stack")
Reported-by: Darius Ivanauskas <dasilt@yahoo.com>
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Aaron Tomlin <atomlin@redhat.com>
Cc: Jason A. Donenfeld <jason@zx2c4.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/16760/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/irq.h