Changeset 8e7c9fe in mainline for kernel/arch/ppc32/src/interrupt.c
- Timestamp:
- 2014-09-12T03:45:25Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c53b58e
- Parents:
- 3eb0c85 (diff), 105d8d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/src/interrupt.c
r3eb0c85 r8e7c9fe 36 36 #include <interrupt.h> 37 37 #include <arch/interrupt.h> 38 #include <arch/istate.h> 38 39 #include <typedefs.h> 39 40 #include <arch.h> 40 #include <time/clock.h>41 41 #include <ipc/sysipc.h> 42 42 #include <arch/drivers/pic.h> … … 46 46 #include <log.h> 47 47 48 void start_decrementer(void) 48 static uint32_t decrementer_value; 49 50 void decrementer_start(uint32_t val) 51 { 52 decrementer_value = val; 53 decrementer_restart(); 54 } 55 56 void decrementer_restart(void) 49 57 { 50 58 asm volatile ( 51 59 "mtdec %[dec]\n" 52 :: [dec] "r" ( 1000)60 :: [dec] "r" (decrementer_value) 53 61 ); 54 62 } … … 104 112 { 105 113 uint8_t inum; 106 114 107 115 while ((inum = pic_get_pending()) != 255) { 108 116 irq_t *irq = irq_dispatch_and_lock(inum); … … 138 146 } 139 147 148 static void exception_fp_unavailable(unsigned int n, istate_t *istate) 149 { 150 #ifdef CONFIG_FPU_LAZY 151 scheduler_fpu_lazy_request(); 152 /* 153 * Propagate MSR_FP from MSR back to istate's SRR1, which will become 154 * the next MSR. 155 */ 156 istate->srr1 |= msr_read() & MSR_FP; 157 #else 158 fault_if_from_uspace(istate, "FPU fault."); 159 panic_badtrap(istate, n, "FPU fault."); 160 #endif 161 } 162 140 163 static void exception_decrementer(unsigned int n, istate_t *istate) 141 164 { 142 start_decrementer();165 decrementer_restart(); 143 166 clock(); 144 167 } … … 153 176 exc_register(VECTOR_EXTERNAL, "external", true, 154 177 exception_external); 178 exc_register(VECTOR_FP_UNAVAILABLE, "fp_unavailable", true, 179 exception_fp_unavailable); 155 180 exc_register(VECTOR_DECREMENTER, "timer", true, 156 181 exception_decrementer);
Note:
See TracChangeset
for help on using the changeset viewer.