All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/14] microblaze: Fix stack usage in interrupt handler
@ 2015-01-27 15:20 Michal Simek
  2015-01-27 15:20 ` [U-Boot] [PATCH 02/14] microblaze: Show return address from exception Michal Simek
                   ` (12 more replies)
  0 siblings, 13 replies; 19+ messages in thread
From: Michal Simek @ 2015-01-27 15:20 UTC (permalink / raw)
  To: u-boot

Do not save registers below r1 stack pointer because
it is not checked by stack undeflow is not able to detect
it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 arch/microblaze/cpu/irq.S | 121 +++++++++++++++++++++++-----------------------
 1 file changed, 60 insertions(+), 61 deletions(-)

diff --git a/arch/microblaze/cpu/irq.S b/arch/microblaze/cpu/irq.S
index 24015898b0aa..5cfe1516bfcd 100644
--- a/arch/microblaze/cpu/irq.S
+++ b/arch/microblaze/cpu/irq.S
@@ -11,71 +11,70 @@
 	.text
 	.global _interrupt_handler
 _interrupt_handler:
-	swi	r2, r1, -4
-	swi	r3, r1, -8
-	swi	r4, r1, -12
-	swi	r5, r1, -16
-	swi	r6, r1, -20
-	swi	r7, r1, -24
-	swi	r8, r1, -28
-	swi	r9, r1, -32
-	swi	r10, r1, -36
-	swi	r11, r1, -40
-	swi	r12, r1, -44
-	swi	r13, r1, -48
-	swi	r14, r1, -52
-	swi	r15, r1, -56
-	swi	r16, r1, -60
-	swi	r17, r1, -64
-	swi	r18, r1, -68
-	swi	r19, r1, -72
-	swi	r20, r1, -76
-	swi	r21, r1, -80
-	swi	r22, r1, -84
-	swi	r23, r1, -88
-	swi	r24, r1, -92
-	swi	r25, r1, -96
-	swi	r26, r1, -100
-	swi	r27, r1, -104
-	swi	r28, r1, -108
-	swi	r29, r1, -112
-	swi	r30, r1, -116
-	swi	r31, r1, -120
 	addik	r1, r1, -124
+	swi	r2, r1, 4
+	swi	r3, r1, 8
+	swi	r4, r1, 12
+	swi	r5, r1, 16
+	swi	r6, r1, 20
+	swi	r7, r1, 24
+	swi	r8, r1, 28
+	swi	r9, r1, 32
+	swi	r10, r1, 36
+	swi	r11, r1, 40
+	swi	r12, r1, 44
+	swi	r13, r1, 48
+	swi	r14, r1, 52
+	swi	r15, r1, 56
+	swi	r16, r1, 60
+	swi	r17, r1, 64
+	swi	r18, r1, 68
+	swi	r19, r1, 72
+	swi	r20, r1, 76
+	swi	r21, r1, 80
+	swi	r22, r1, 84
+	swi	r23, r1, 88
+	swi	r24, r1, 92
+	swi	r25, r1, 96
+	swi	r26, r1, 100
+	swi	r27, r1, 104
+	swi	r28, r1, 108
+	swi	r29, r1, 112
+	swi	r30, r1, 116
+	swi	r31, r1, 120
 	brlid	r15, interrupt_handler
 	nop
+	lwi	r31, r1, 120
+	lwi	r30, r1, 116
+	lwi	r29, r1, 112
+	lwi	r28, r1, 108
+	lwi	r27, r1, 104
+	lwi	r26, r1, 100
+	lwi	r25, r1, 96
+	lwi	r24, r1, 92
+	lwi	r23, r1, 88
+	lwi	r22, r1, 84
+	lwi	r21, r1, 80
+	lwi	r20, r1, 76
+	lwi	r19, r1, 72
+	lwi	r18, r1, 68
+	lwi	r17, r1, 64
+	lwi	r16, r1, 60
+	lwi	r15, r1, 56
+	lwi	r14, r1, 52
+	lwi	r13, r1, 48
+	lwi	r12, r1, 44
+	lwi	r11, r1, 40
+	lwi	r10, r1, 36
+	lwi	r9, r1, 32
+	lwi	r8, r1, 28
+	lwi	r7, r1, 24
+	lwi	r6, r1, 20
+	lwi	r5, r1, 16
+	lwi	r4, r1, 12
+	lwi	r3, r1, 8
+	lwi	r2, r1, 4
 	addik	r1, r1, 124
-	lwi	r31, r1, -120
-	lwi	r30, r1, -116
-	lwi	r29, r1, -112
-	lwi	r28, r1, -108
-	lwi	r27, r1, -104
-	lwi	r26, r1, -100
-	lwi	r25, r1, -96
-	lwi	r24, r1, -92
-	lwi	r23, r1, -88
-	lwi	r22, r1, -84
-	lwi	r21, r1, -80
-	lwi	r20, r1, -76
-	lwi	r19, r1, -72
-	lwi	r18, r1, -68
-	lwi	r17, r1, -64
-	lwi	r16, r1, -60
-	lwi	r15, r1, -56
-	lwi	r14, r1, -52
-	lwi	r13, r1, -48
-	lwi	r12, r1, -44
-	lwi	r11, r1, -40
-	lwi	r10, r1, -36
-	lwi	r9, r1, -32
-	lwi	r8, r1, -28
-	lwi	r7, r1, -24
-	lwi	r6, r1, -20
-	lwi	r5, r1, -16
-	lwi	r4, r1, -12
-	lwi	r3, r1, -8
-	lwi	r2, r1, -4
-
 	rtid	r14, 0
 	nop
 	.size _interrupt_handler,.-_interrupt_handler
--
1.8.2.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150127/769766d1/attachment.pgp>

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-01-30 16:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-27 15:20 [U-Boot] [PATCH 01/14] microblaze: Fix stack usage in interrupt handler Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 02/14] microblaze: Show return address from exception Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 03/14] microblaze: Fix coding style in exception.c Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 04/14] microblaze: Remove DEBUG_INT macro and use debug() instead Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 05/14] microblaze: Fix coding style Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 06/14] microblaze: Add debug message about enabling interrupts Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 07/14] microblaze: Remove unneeded data section adding from DTB Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 08/14] microblaze: Use standard interrupt_init() function Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 09/14] microblaze: Remove unused asm label Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 10/14] microblaze: Fix gd_t address which is placed at the end of BRAM Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 11/14] microblaze: Enable SPL_NOR support when FLASH_BASE is setup Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 12/14] microblaze: Move architecture to use generic board init Michal Simek
2015-01-29  2:15   ` Simon Glass
2015-01-29 14:20     ` Michal Simek
2015-01-29 15:45       ` Simon Glass
2015-01-30 10:13         ` Michal Simek
2015-01-30 16:29           ` Simon Glass
2015-01-27 15:20 ` [U-Boot] [PATCH 13/14] microblaze: Speedup code copy Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 14/14] bdinfo: Show information about fdt blob via bdinfo Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.