diff --git a/arch/x86_64/irq.c b/arch/x86_64/irq.c index 633d6a2..a3e8ec1 100644 --- a/arch/x86_64/irq.c +++ b/arch/x86_64/irq.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -232,11 +233,15 @@ void isr_dispatch(struct cpu_context *regs) void irq_dispatch(struct cpu_context *regs) { + end_charge_period(); + irq_ack(regs->int_no); struct queue *hooks = &irq_hooks[regs->int_no - IRQ0]; queue_foreach(struct irq_hook, hook, hooks, irq_entry) { hook->irq_callback(); } + + start_charge_period(); } void syscall_dispatch(struct cpu_context *regs)