diff options
Diffstat (limited to 'arch/cris/arch-v10/kernel/entry.S')
-rw-r--r-- | arch/cris/arch-v10/kernel/entry.S | 54 |
1 files changed, 36 insertions, 18 deletions
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S index 1bc44f481c34..c0163bf94a50 100644 --- a/arch/cris/arch-v10/kernel/entry.S +++ b/arch/cris/arch-v10/kernel/entry.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: entry.S,v 1.23 2004/10/19 13:07:37 starvik Exp $ | 1 | /* $Id: entry.S,v 1.28 2005/06/20 05:06:30 starvik Exp $ |
2 | * | 2 | * |
3 | * linux/arch/cris/entry.S | 3 | * linux/arch/cris/entry.S |
4 | * | 4 | * |
@@ -7,6 +7,22 @@ | |||
7 | * Authors: Bjorn Wesen (bjornw@axis.com) | 7 | * Authors: Bjorn Wesen (bjornw@axis.com) |
8 | * | 8 | * |
9 | * $Log: entry.S,v $ | 9 | * $Log: entry.S,v $ |
10 | * Revision 1.28 2005/06/20 05:06:30 starvik | ||
11 | * Remove unnecessary diff to kernel.org tree | ||
12 | * | ||
13 | * Revision 1.27 2005/03/04 08:16:16 starvik | ||
14 | * Merge of Linux 2.6.11. | ||
15 | * | ||
16 | * Revision 1.26 2005/01/11 13:49:47 starvik | ||
17 | * Added NMI handler. | ||
18 | * | ||
19 | * Revision 1.25 2004/12/27 11:18:32 starvik | ||
20 | * Merge of Linux 2.6.10 (not functional yet). | ||
21 | * | ||
22 | * Revision 1.24 2004/12/22 10:41:23 starvik | ||
23 | * Updates to make v10 compile with the latest SMP aware generic code (even | ||
24 | * though v10 will never have SMP). | ||
25 | * | ||
10 | * Revision 1.23 2004/10/19 13:07:37 starvik | 26 | * Revision 1.23 2004/10/19 13:07:37 starvik |
11 | * Merge of Linux 2.6.9 | 27 | * Merge of Linux 2.6.9 |
12 | * | 28 | * |
@@ -279,6 +295,7 @@ | |||
279 | #ifdef CONFIG_PREEMPT | 295 | #ifdef CONFIG_PREEMPT |
280 | ; Check if preemptive kernel scheduling should be done | 296 | ; Check if preemptive kernel scheduling should be done |
281 | _resume_kernel: | 297 | _resume_kernel: |
298 | di | ||
282 | ; Load current task struct | 299 | ; Load current task struct |
283 | movs.w -8192, $r0 ; THREAD_SIZE = 8192 | 300 | movs.w -8192, $r0 ; THREAD_SIZE = 8192 |
284 | and.d $sp, $r0 | 301 | and.d $sp, $r0 |
@@ -291,12 +308,7 @@ _need_resched: | |||
291 | bpl _Rexit | 308 | bpl _Rexit |
292 | nop | 309 | nop |
293 | ; Ok, lets's do some preemptive kernel scheduling | 310 | ; Ok, lets's do some preemptive kernel scheduling |
294 | move.d PREEMPT_ACTIVE, $r10 | 311 | jsr preempt_schedule_irq |
295 | move.d $r10, [$r0+TI_preempt_count] ; Mark as active | ||
296 | ei | ||
297 | jsr schedule | ||
298 | clear.d [$r0+TI_preempt_count] ; Mark as inactive | ||
299 | di | ||
300 | ; Load new task struct | 312 | ; Load new task struct |
301 | movs.w -8192, $r0 ; THREAD_SIZE = 8192 | 313 | movs.w -8192, $r0 ; THREAD_SIZE = 8192 |
302 | and.d $sp, $r0 | 314 | and.d $sp, $r0 |
@@ -590,15 +602,15 @@ mmu_bus_fault: | |||
590 | move.d $r0, [$sp+16] | 602 | move.d $r0, [$sp+16] |
591 | 1: btstq 12, $r1 ; Refill? | 603 | 1: btstq 12, $r1 ; Refill? |
592 | bpl 2f | 604 | bpl 2f |
593 | lsrq PMD_SHIFT, $r1 ; Get PMD index into PGD (bit 24-31) | 605 | lsrq 24, $r1 ; Get PGD index (bit 24-31) |
594 | move.d [current_pgd], $r0 ; PGD for the current process | 606 | move.d [per_cpu__current_pgd], $r0 ; PGD for the current process |
595 | move.d [$r0+$r1.d], $r0 ; Get PMD | 607 | move.d [$r0+$r1.d], $r0 ; Get PMD |
596 | beq 2f | 608 | beq 2f |
597 | nop | 609 | nop |
598 | and.w PAGE_MASK, $r0 ; Remove PMD flags | 610 | and.w PAGE_MASK, $r0 ; Remove PMD flags |
599 | move.d [R_MMU_CAUSE], $r1 | 611 | move.d [R_MMU_CAUSE], $r1 |
600 | lsrq PAGE_SHIFT, $r1 | 612 | lsrq PAGE_SHIFT, $r1 |
601 | and.d 0x7ff, $r1 ; Get PTE index into PMD (bit 13-24) | 613 | and.d 0x7ff, $r1 ; Get PTE index into PGD (bit 13-23) |
602 | move.d [$r0+$r1.d], $r1 ; Get PTE | 614 | move.d [$r0+$r1.d], $r1 ; Get PTE |
603 | beq 2f | 615 | beq 2f |
604 | nop | 616 | nop |
@@ -656,11 +668,6 @@ hwbreakpoint: | |||
656 | nop | 668 | nop |
657 | 669 | ||
658 | IRQ1_interrupt: | 670 | IRQ1_interrupt: |
659 | |||
660 | #if defined(CONFIG_ETRAX_WATCHDOG) && !defined(CONFIG_SVINTO_SIM) | ||
661 | ;; If we receive a watchdog interrupt while it is not expected, then set | ||
662 | ;; up a canonical frame and dump register contents before dying. | ||
663 | |||
664 | ;; this prologue MUST match the one in irq.h and the struct in ptregs.h!!! | 671 | ;; this prologue MUST match the one in irq.h and the struct in ptregs.h!!! |
665 | move $brp,[$sp=$sp-16]; instruction pointer and room for a fake SBFS frame | 672 | move $brp,[$sp=$sp-16]; instruction pointer and room for a fake SBFS frame |
666 | push $srp | 673 | push $srp |
@@ -672,9 +679,16 @@ IRQ1_interrupt: | |||
672 | push $r10 ; push orig_r10 | 679 | push $r10 ; push orig_r10 |
673 | clear.d [$sp=$sp-4] ; frametype == 0, normal frame | 680 | clear.d [$sp=$sp-4] ; frametype == 0, normal frame |
674 | 681 | ||
675 | ;; We don't check that we actually were bit by the watchdog as opposed to | 682 | move.d [R_IRQ_MASK0_RD], $r1 ; External NMI or watchdog? |
676 | ;; an external NMI, since there is currently no handler for external NMI. | 683 | and.d 0x80000000, $r1 |
677 | 684 | beq wdog | |
685 | move.d $sp, $r10 | ||
686 | jsr handle_nmi | ||
687 | setf m ; Enable NMI again | ||
688 | retb ; Return from NMI | ||
689 | nop | ||
690 | wdog: | ||
691 | #if defined(CONFIG_ETRAX_WATCHDOG) && !defined(CONFIG_SVINTO_SIM) | ||
678 | ;; Check if we're waiting for reset to happen, as signalled by | 692 | ;; Check if we're waiting for reset to happen, as signalled by |
679 | ;; hard_reset_now setting cause_of_death to a magic value. If so, just | 693 | ;; hard_reset_now setting cause_of_death to a magic value. If so, just |
680 | ;; get stuck until reset happens. | 694 | ;; get stuck until reset happens. |
@@ -1118,6 +1132,10 @@ sys_call_table: | |||
1118 | .long sys_mq_getsetattr | 1132 | .long sys_mq_getsetattr |
1119 | .long sys_ni_syscall /* reserved for kexec */ | 1133 | .long sys_ni_syscall /* reserved for kexec */ |
1120 | .long sys_waitid | 1134 | .long sys_waitid |
1135 | .long sys_ni_syscall /* 285 */ /* available */ | ||
1136 | .long sys_add_key | ||
1137 | .long sys_request_key | ||
1138 | .long sys_keyctl | ||
1121 | 1139 | ||
1122 | /* | 1140 | /* |
1123 | * NOTE!! This doesn't have to be exact - we just have | 1141 | * NOTE!! This doesn't have to be exact - we just have |