Changeset 5626277 in mainline for arch/mips32/src/interrupt.c


Ignore:
Timestamp:
2006-04-29T22:12:40Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
51a7dc1
Parents:
407862e
Message:

Added support for IRQ notifiactions.

  • seems to work correctly on ia32, amd64
  • the mips kbd probably lowers interrupts when the char is read from the port, we will have to find a way how to deal with it.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/src/interrupt.c

    r407862e r5626277  
    3434#include <time/clock.h>
    3535#include <arch/drivers/arc.h>
     36
     37#include <ipc/sysipc.h>
    3638
    3739/** Disable interrupts.
     
    8486{
    8587        cp0_cause_write(cp0_cause_read() & ~(1 << 8)); /* clear SW0 interrupt */
     88        ipc_irq_send_notif(0);
    8689}
    8790
     
    8992{
    9093        cp0_cause_write(cp0_cause_read() & ~(1 << 9)); /* clear SW1 interrupt */
     94        ipc_irq_send_notif(1);
    9195}
    9296
     
    98102        int_register(1, "swint1", swint1);
    99103}
     104
     105#include <print.h>
     106static void ipc_int(int n, istate_t *istate)
     107{
     108        ipc_irq_send_notif(n-INT_OFFSET);
     109}
     110
     111/* Reregister irq to be IPC-ready */
     112void irq_ipc_bind_arch(__native irq)
     113{
     114        /* Do not allow to redefine timer */
     115        /* Swint0, Swint1 are already handled */
     116        if (irq == TIMER_IRQ || irq < 2)
     117                return;
     118        int_register(irq, "ipc_int", ipc_int);
     119}
Note: See TracChangeset for help on using the changeset viewer.