Lines Matching +full:irq +full:- +full:signals

2  * Low-level system-call handling, trap handlers and context-switching
4 * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
5 * Copyright (C) 2008-2009 PetaLogix
25 #include <asm/asm-offsets.h>
160 /* Define how to call high-level functions. With MMU, virtual mode must be
161 * enabled when calling the high-level function. Clobbers R11.
192 swi r14, r1, PT_PC; /* PC, before IRQ/trap */ \
226 lwi r14, r1, PT_PC; /* RESTORE_LINK PC, before IRQ/trap */\
263 /* Kernel-mode state save. */ \
264 /* Reload kernel stack-ptr. */ \
268 /* addik r1, r1, -PT_SIZE; */ \
269 addik r1, r1, CONFIG_KERNEL_BASE_ADDR - CONFIG_KERNEL_START - PT_SIZE; \
273 1: /* User-mode state save. */ \
280 /* addik r1, r1, -PT_SIZE; */ \
281 addik r1, r1, THREAD_SIZE + CONFIG_KERNEL_BASE_ADDR - CONFIG_KERNEL_START - PT_SIZE; \
285 swi r0, r1, PT_MODE; /* Was in user-mode. */ \
295 addik r1, r1, -PT_SIZE
313 addik r1, r1, -PT_SIZE
336 * Syscall number in r12, args in r5-r10
353 addik r1, r1, -PT_SIZE; /* Make room on the stack. */
358 swi r0, r1, PT_MODE; /* Was in user-mode. */
367 /* where the trap should return need -8 to adjust for rtsd r15, 8*/
382 addik r3, r0, -ENOSYS
402 addi r11, r12, -__NR_syscalls;
406 add r12, r12, r12; /* convert num -> ptr */
423 /* where the trap should return need -8 to adjust for rtsd r15, 8 */
424 addi r15, r0, ret_from_trap-8
430 addi r3, r0, -ENOSYS;
433 /* We re-enable BIP bit before state restore */
467 beqi r11, 4f; /* Signals to handle, handle them */
470 bralid r15, do_notify_resume; /* Handle any signals */
482 lwi r1, r1, PT_R1 - PT_SIZE;/* Restore user stack pointer. */
494 rtbd r14, 0; /* Instructions to return from an IRQ */
515 addk r5, r0, r19 /* ... and argument - in r19 */
530 addik r17, r17, -4
532 /* PC, before IRQ/trap - this is one instruction above */
537 /* where the trap should return need -8 to adjust for rtsd r15, 8 */
538 addik r15, r0, ret_from_exc - 8
568 /* PC, before IRQ/trap - this is one instruction above */
571 /* where the trap should return need -8 to adjust for rtsd r15, 8 */
572 addik r15, r0, ret_from_exc-8
595 /* data and intruction trap - which is choose is resolved int fault.c */
598 /* PC, before IRQ/trap - this is one instruction above */
601 /* where the trap should return need -8 to adjust for rtsd r15, 8 */
602 addik r15, r0, ret_from_exc-8
610 /* PC, before IRQ/trap - this is one instruction above */
613 /* where the trap should return need -8 to adjust for rtsd r15, 8 */
614 addik r15, r0, ret_from_exc-8
641 beqi r11, 4f; /* Signals to handle, handle them */
644 * Handle a signal return; Pending signals should be in r18.
647 * points (for instance, call-saved registers (because the normal
648 * C-compiler calling sequence in the kernel makes sure they're
649 * preserved), and call-clobbered registers in the case of
655 bralid r15, do_notify_resume; /* Handle any signals */
668 lwi r1, r1, PT_R1 - PT_SIZE; /* Restore user stack pointer. */
680 rtbd r14, 0; /* Instructions to return from an IRQ */
690 * The stack-pointer (r1) should have already been saved to the memory
703 /* Kernel-mode state save. */
707 /* MS: Make room on the stack -> activation record */
708 addik r1, r1, -PT_SIZE;
711 swi r1, r1, PT_MODE; /* 0 - user mode, 1 - kernel mode */
713 /* User-mode state save. */
721 addik r1, r1, -PT_SIZE;
752 /* Handle a signal return; Pending signals should be in r18. */
754 bralid r15, do_notify_resume; /* Handle any signals */
767 lwi r1, r1, PT_R1 - PT_SIZE;
841 addik r3, r3, -1
846 /* return from reset need -8 to adjust for rtsd r15, 8 */
847 addik r15, r0, ret_from_reset - 8
873 addik r1, r1, -PT_SIZE - 36
920 addik r3, r3, -1
924 /* return from break need -8 to adjust for rtsd r15, 8 */
925 addik r15, r0, ret_from_break - 8
930 /* flush the d-cache */
935 * To make sure microblaze i-cache is in a proper state
936 * invalidate the i-cache.
962 /* MS: Kernel-mode state save - kgdb */
963 lwi r1, r0, TOPHYS(PER_CPU(ENTRY_SP)); /* Reload kernel stack-ptr*/
966 addik r1, r1, CONFIG_KERNEL_BASE_ADDR - CONFIG_KERNEL_START - PT_SIZE;
982 addik r11, r1, CONFIG_KERNEL_START - CONFIG_KERNEL_BASE_ADDR + PT_SIZE;
984 /* MS: r31 - current pointer isn't changed */
996 /* MS: User-mode state save - gdb */
1003 addik r1, r1, -PT_SIZE; /* Make room on the stack. */
1006 swi r0, r1, PT_MODE; /* Was in user-mode. */
1022 /* MS: Return to user space - gdb */
1037 beqi r11, 4f; /* Signals to handle, handle them */
1040 bralid r15, do_notify_resume; /* Handle any signals */
1051 lwi r1, r1, PT_R1 - PT_SIZE; /* Restore user stack pointer */
1056 /* MS: Return to kernel state - kgdb */
1089 /* save non-volatile registers */
1112 /* update r31, the current-give me pointer to task which will be next */
1121 /* non-volatile registers */
1161 addik r1, r1, -PT_SIZE
1283 syscall_table_size=(.-sys_call_table)
1288 .ascii "IRQ\0"
1290 .ascii "IRQ (PREEMPTED)\0"