]> rtime.felk.cvut.cz Git - arc.git/blobdiff - arch/ppc/mpc55xx/kernel/arch_krn.sx
Isr almost done
[arc.git] / arch / ppc / mpc55xx / kernel / arch_krn.sx
index 49b8ecff9f7e8b6e0ff542de774f209a7b5cda2c..603ef8535d967475c754a5e86083653d85513562 100644 (file)
@@ -47,7 +47,7 @@
 // #include "asm_book_e.h"\r
 .extern os_intc_pcb_tbl\r
 .extern os_intc_types_tbl\r
-.extern os_sys\r
+.extern Os_Sys\r
 .extern Os_ArchPanic\r
 \r
 #if defined(CFG_VLE)\r
@@ -63,6 +63,8 @@
 \r
 /* ----------------------------[private define]------------------------------*/\r
 \r
+//#define OLD_CALL             \r
+\r
 #define INTC_IACKR_PRC0                0xfff48010 \r
 #define INTC_EOIR_PRC0         0xfff48018\r
 #define INTC_IACKR                     0xfff48010\r
@@ -181,7 +183,7 @@ Os_ArchSwapContextTo:
        lwz             sp,PCB_STACK_CURR_P(r4)\r
 \r
        /* Set new current task */\r
-       LOAD_ADDR_32(3,os_sys)\r
+       LOAD_ADDR_32(3,Os_Sys)\r
        stw             r4,SYS_CURR_PCB_P(r3)\r
 \r
        /* Restore C context */\r
@@ -366,13 +368,13 @@ exception_IVOR4:
        mr              r4,sp                   \r
        \r
        /* Switch to interrupt stack if at depth 0 */\r
-       /* Load the value os_sys.int_nest_cnt */\r
-       LOAD_IND_32(r3,os_sys+SYS_INT_NEST_CNT)\r
+       /* Load the value Os_Sys.int_nest_cnt */\r
+       LOAD_IND_32(r3,Os_Sys+SYS_INT_NEST_CNT)\r
        cmpli   0,r3,0\r
        bne-    on_int_stack\r
 \r
        /* Load the interrupt stack */\r
-       LOAD_IND_32(r3,os_sys+SYS_INT_STACK)\r
+       LOAD_IND_32(r1,Os_Sys+SYS_INT_STACK)\r
 \r
 on_int_stack:\r
 \r
@@ -410,7 +412,11 @@ noSoftInt:
     ori   r3, r3,Os_Isr@l\r
     mtlr  r3\r
        mr    r3,r4             /* "old" stack as arg1 */\r
+#if defined(OLD_CALL)  \r
     lwz   r4, 0x0(r6)  /* Read the address from the for function/pcb entry */\r
+#else\r
+       mr       r4,r5\r
+#endif    \r
     blrl                               /* Call the entry */\r
 \r
        /* Notes!\r