Skip to content

Commit 5fdc66e

Browse files
mpredfearnralfbaechle
authored andcommitted
MIPS: Fix minimum alignment requirement of IRQ stack
Commit db8466c ("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: db8466c ("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>
1 parent 6e62a88 commit 5fdc66e

File tree

1 file changed

+1
-1
lines changed
  • arch/mips/include/asm

1 file changed

+1
-1
lines changed

arch/mips/include/asm/irq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <irq.h>
1919

2020
#define IRQ_STACK_SIZE THREAD_SIZE
21-
#define IRQ_STACK_START (IRQ_STACK_SIZE - sizeof(unsigned long))
21+
#define IRQ_STACK_START (IRQ_STACK_SIZE - 16)
2222

2323
extern void *irq_stack[NR_CPUS];
2424

0 commit comments

Comments
 (0)