Rev 1920 | Rev 1923 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1920 | Rev 1922 | ||
---|---|---|---|
Line 44... | Line 44... | ||
44 | #include <arch/barrier.h> |
44 | #include <arch/barrier.h> |
45 | #include <print.h> |
45 | #include <print.h> |
46 | #include <arch.h> |
46 | #include <arch.h> |
47 | #include <mm/tlb.h> |
47 | #include <mm/tlb.h> |
48 | #include <config.h> |
48 | #include <config.h> |
- | 49 | #include <synch/spinlock.h> |
|
49 | 50 | ||
50 | /* |
51 | /* |
51 | * To be removed once we get rid of the dependency in ipc_irq_bind_arch(). |
52 | * To be removed once we get rid of the dependency in ipc_irq_bind_arch(). |
52 | */ |
53 | */ |
53 | #include <arch/drivers/kbd.h> |
54 | #include <arch/drivers/kbd.h> |
Line 86... | Line 87... | ||
86 | uint64_t data0; |
87 | uint64_t data0; |
87 | 88 | ||
88 | intrcv = asi_u64_read(ASI_INTR_RECEIVE, 0); |
89 | intrcv = asi_u64_read(ASI_INTR_RECEIVE, 0); |
89 | data0 = asi_u64_read(ASI_UDB_INTR_R, ASI_UDB_INTR_R_DATA_0); |
90 | data0 = asi_u64_read(ASI_UDB_INTR_R, ASI_UDB_INTR_R_DATA_0); |
90 | 91 | ||
91 | irq_t *irq = irq_dispatch(data0); |
92 | irq_t *irq = irq_dispatch_and_lock(data0); |
92 | if (irq) { |
93 | if (irq) { |
93 | /* |
94 | /* |
94 | * The IRQ handler was found. |
95 | * The IRQ handler was found. |
95 | */ |
96 | */ |
96 | irq->handler(irq, irq->arg); |
97 | irq->handler(irq, irq->arg); |
- | 98 | spinlock_unlock(&irq->lock); |
|
97 | } else if (data0 > config.base) { |
99 | } else if (data0 > config.base) { |
98 | /* |
100 | /* |
99 | * This is a cross-call. |
101 | * This is a cross-call. |
100 | * data0 contains address of kernel function. |
102 | * data0 contains address of kernel function. |
101 | * We call the function only after we verify |
103 | * We call the function only after we verify |