Changeset de57e060 in mainline for kernel/arch/ia64/src/drivers/it.c


Ignore:
Timestamp:
2006-10-18T20:51:15Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
80ca47e
Parents:
cd13c2a
Message:

Convert ia64 to the new IRQ and notification scheme.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/src/drivers/it.c

    rcd13c2a rde57e060  
    4242#include <arch/barrier.h>
    4343#include <time/clock.h>
     44#include <ddi/irq.h>
     45#include <ddi/device.h>
    4446#include <arch.h>
    4547
     48#define IT_SERVICE_CLOCKS 64
    4649
    47 #define IT_SERVICE_CLOCKS 64
     50static irq_t it_irq;
     51
     52static irq_ownership_t it_claim(void);
     53static void it_interrupt(irq_t *irq, void *arg, ...);
    4854
    4955/** Initialize Interval Timer. */
     
    5157{
    5258        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);
    5366
    5467        /* initialize Interval Timer external interrupt vector */
     
    6881}
    6982
     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 */
     89irq_ownership_t it_claim(void)
     90{
     91        return IRQ_ACCEPT;
     92}
    7093
    7194/** Process Interval Timer interrupt. */
    72 void it_interrupt(void)
     95void it_interrupt(irq_t *irq, void *arg, ...)
    7396{
    7497        int64_t c;
     
    84107
    85108                m += IT_DELTA;
    86                 if (m-c<0)
     109                if (m - c < 0)
    87110                        CPU->missed_clock_ticks++;
    88111                else
     
    94117       
    95118        clock();
     119       
     120        /*
     121         * This one is a good candidate for moving to a separate
     122         * kernel thread private to ski.c
     123         */
    96124        poll_keyboard();
    97125}
Note: See TracChangeset for help on using the changeset viewer.