x86_64: always go through isr_common for lapic timer

We should always update the clocks on lapic timer,
so it should not short-circuit in kernel mode.
This commit is contained in:
K. Lange 2024-01-22 07:31:21 +09:00
parent 4c9f9a68e0
commit 5b0c5da5f5
2 changed files with 1 additions and 7 deletions

View File

@ -538,7 +538,7 @@ static void _page_fault(struct regs * r) {
static void _local_timer(struct regs * r) {
extern void arch_update_clock(void);
arch_update_clock();
switch_task(1);
if (r->cs != 0x08) switch_task(1);
}
/**

View File

@ -98,16 +98,10 @@ _isr123:
add $0xb0, %r12
movl $0, (%r12)
popq %r12
/* Are we in userspace? */
cmpq $8, 8(%rsp)
je 1f
/* Then we can proceed! */
pushq $0x00
pushq $123
jmp isr_common
1:
/* If we were not in userspace, nothing to do; we were already idle. */
iretq
.global _isr124