Skip to content

Commit

Permalink
lm32: Disable interrupts while restoring irq and syscall stackframe
Browse files Browse the repository at this point in the history
  • Loading branch information
larsclausen committed Jul 26, 2011
1 parent f77b794 commit 54b8f87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/lm32/boot/dts/mm1.dts
Expand Up @@ -6,12 +6,12 @@
interrupt-parent = <&pic>; interrupt-parent = <&pic>;


chosen { chosen {
bootargs = "root=/dev/root"; bootargs = "root=/dev/ram0 rootfstype=ext2 init=/bin/foobar.sh";
}; };


memory@0 { memory@0 {
device_type = "memory"; device_type = "memory";
reg = <0x00000000 0x8000000>; reg = <0x40000000 0x8000000>;
}; };


cpus { cpus {
Expand Down
6 changes: 6 additions & 0 deletions arch/lm32/kernel/entry.S
Expand Up @@ -261,6 +261,9 @@ ret


/* restore all caller saved registers saved in _save_irq_frame and return from exception */ /* restore all caller saved registers saved in _save_irq_frame and return from exception */
_restore_irq_frame_and_return: _restore_irq_frame_and_return:
rcsr r2, IE
andi r3, r2, 0xfffe
wcsr IE, r3
lw r2, (sp+132) lw r2, (sp+132)
mvhi r1, hi(kernel_mode) mvhi r1, hi(kernel_mode)
ori r1, r1, lo(kernel_mode) ori r1, r1, lo(kernel_mode)
Expand Down Expand Up @@ -332,6 +335,9 @@ _save_syscall_frame:


#define RETURN_FROM_SYSCALL_OR_EXCEPTION(label, addr_register, return_instr) \ #define RETURN_FROM_SYSCALL_OR_EXCEPTION(label, addr_register, return_instr) \
label: \ label: \
rcsr r2, IE; \
andi r3, r2, 0xfffe; \
wcsr IE, r3; \
lw r2, (sp+132); \ lw r2, (sp+132); \
mvhi r1, hi(kernel_mode); \ mvhi r1, hi(kernel_mode); \
ori r1, r1, lo(kernel_mode); \ ori r1, r1, lo(kernel_mode); \
Expand Down

0 comments on commit 54b8f87

Please sign in to comment.