Skip to content
Browse files

lm32: Disable interrupts while restoring irq and syscall stackframe

  • Loading branch information...
1 parent f77b794 commit 54b8f87dadb0cf99ccacfedbc5212ebb747f9698 @larsclausen larsclausen committed
Showing with 8 additions and 2 deletions.
  1. +2 −2 arch/lm32/boot/dts/mm1.dts
  2. +6 −0 arch/lm32/kernel/entry.S
View
4 arch/lm32/boot/dts/mm1.dts
@@ -6,12 +6,12 @@
interrupt-parent = <&pic>;
chosen {
- bootargs = "root=/dev/root";
+ bootargs = "root=/dev/ram0 rootfstype=ext2 init=/bin/foobar.sh";
};
memory@0 {
device_type = "memory";
- reg = <0x00000000 0x8000000>;
+ reg = <0x40000000 0x8000000>;
};
cpus {
View
6 arch/lm32/kernel/entry.S
@@ -261,6 +261,9 @@ ret
/* restore all caller saved registers saved in _save_irq_frame and return from exception */
_restore_irq_frame_and_return:
+ rcsr r2, IE
+ andi r3, r2, 0xfffe
+ wcsr IE, r3
lw r2, (sp+132)
mvhi r1, hi(kernel_mode)
ori r1, r1, lo(kernel_mode)
@@ -332,6 +335,9 @@ _save_syscall_frame:
#define RETURN_FROM_SYSCALL_OR_EXCEPTION(label, addr_register, return_instr) \
label: \
+ rcsr r2, IE; \
+ andi r3, r2, 0xfffe; \
+ wcsr IE, r3; \
lw r2, (sp+132); \
mvhi r1, hi(kernel_mode); \
ori r1, r1, lo(kernel_mode); \

0 comments on commit 54b8f87

Please sign in to comment.
Something went wrong with that request. Please try again.