52,6 → 52,7 |
#include <interrupt.h> |
#include <sysinfo/sysinfo.h> |
#include <print.h> |
#include <synch/rcu.h> |
|
/* |
* These codes read from z8530 data register are silently ignored. |
90,9 → 91,9 |
|
z8530_write_a(&z8530, WR9, WR9_MIE); /* Master Interrupt Enable. */ |
|
spinlock_lock(&z8530_irq.lock); |
z8530_irq.notif_cfg.notify = false; |
spinlock_unlock(&z8530_irq.lock); |
//rcu_read_lock() is not needed, ints are disabled |
//rcu: atomic update doesn't need reallocation |
rcu_dereference_pointer(z8530_irq.notif_cfg).notify = false; |
interrupts_restore(ipl); |
} |
|
100,9 → 101,10 |
void z8530_release(void) |
{ |
ipl_t ipl = interrupts_disable(); |
//rcu: atomic update doesn't need reallocation |
spinlock_lock(&z8530_irq.lock); |
if (z8530_irq.notif_cfg.answerbox) |
z8530_irq.notif_cfg.notify = true; |
if (rcu_dereference_pointer(z8530_irq.notif_cfg).answerbox) |
rcu_dereference_pointer(z8530_irq.notif_cfg).notify = true; |
spinlock_unlock(&z8530_irq.lock); |
interrupts_restore(ipl); |
} |
204,7 → 206,7 |
* we cannot handle it by scheduling one of the level |
* interrupt traps. Process the interrupt directly. |
*/ |
if (irq->notif_cfg.notify && irq->notif_cfg.answerbox) |
if (rcu_dereference_pointer(irq->notif_cfg).notify && rcu_dereference_pointer(irq->notif_cfg).answerbox) |
ipc_irq_send_notif(irq); |
else |
z8530_interrupt(); |