Changeset de57e060 in mainline for kernel/arch/ia64/src/drivers/it.c
- Timestamp:
- 2006-10-18T20:51:15Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 80ca47e
- Parents:
- cd13c2a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/drivers/it.c
rcd13c2a rde57e060 42 42 #include <arch/barrier.h> 43 43 #include <time/clock.h> 44 #include <ddi/irq.h> 45 #include <ddi/device.h> 44 46 #include <arch.h> 45 47 48 #define IT_SERVICE_CLOCKS 64 46 49 47 #define IT_SERVICE_CLOCKS 64 50 static irq_t it_irq; 51 52 static irq_ownership_t it_claim(void); 53 static void it_interrupt(irq_t *irq, void *arg, ...); 48 54 49 55 /** Initialize Interval Timer. */ … … 51 57 { 52 58 cr_itv_t itv; 59 60 irq_initialize(&it_irq); 61 it_irq.inr = INTERRUPT_TIMER; 62 it_irq.devno = device_assign_devno(); 63 it_irq.claim = it_claim; 64 it_irq.handler = it_interrupt; 65 irq_register(&it_irq); 53 66 54 67 /* initialize Interval Timer external interrupt vector */ … … 68 81 } 69 82 83 /** Always claim ownership for this IRQ. 84 * 85 * Other devices are responsible to avoid using INR 0. 86 * 87 * @return Always IRQ_ACCEPT. 88 */ 89 irq_ownership_t it_claim(void) 90 { 91 return IRQ_ACCEPT; 92 } 70 93 71 94 /** Process Interval Timer interrupt. */ 72 void it_interrupt( void)95 void it_interrupt(irq_t *irq, void *arg, ...) 73 96 { 74 97 int64_t c; … … 84 107 85 108 m += IT_DELTA; 86 if (m -c<0)109 if (m - c < 0) 87 110 CPU->missed_clock_ticks++; 88 111 else … … 94 117 95 118 clock(); 119 120 /* 121 * This one is a good candidate for moving to a separate 122 * kernel thread private to ski.c 123 */ 96 124 poll_keyboard(); 97 125 }
Note:
See TracChangeset
for help on using the changeset viewer.