Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/x86/local_apic.c
Show All 37 Lines | |||||
#include "opt_atpic.h" | #include "opt_atpic.h" | ||||
#include "opt_hwpmc_hooks.h" | #include "opt_hwpmc_hooks.h" | ||||
#include "opt_ddb.h" | #include "opt_ddb.h" | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/asan.h> | |||||
#include <sys/bus.h> | #include <sys/bus.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/pcpu.h> | #include <sys/pcpu.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/sched.h> | #include <sys/sched.h> | ||||
▲ Show 20 Lines • Show All 1,240 Lines • ▼ Show 20 Lines | native_lapic_eoi(void) | ||||
lapic_write32_nofence(LAPIC_EOI, 0); | lapic_write32_nofence(LAPIC_EOI, 0); | ||||
} | } | ||||
void | void | ||||
lapic_handle_intr(int vector, struct trapframe *frame) | lapic_handle_intr(int vector, struct trapframe *frame) | ||||
{ | { | ||||
struct intsrc *isrc; | struct intsrc *isrc; | ||||
/* The frame may have been written into a poisoned region. */ | |||||
kasan_mark(frame, sizeof(*frame), sizeof(*frame), 0); | |||||
isrc = intr_lookup_source(apic_idt_to_irq(PCPU_GET(apic_id), | isrc = intr_lookup_source(apic_idt_to_irq(PCPU_GET(apic_id), | ||||
vector)); | vector)); | ||||
intr_execute_handlers(isrc, frame); | intr_execute_handlers(isrc, frame); | ||||
} | } | ||||
void | void | ||||
lapic_handle_timer(struct trapframe *frame) | lapic_handle_timer(struct trapframe *frame) | ||||
{ | { | ||||
struct lapic *la; | struct lapic *la; | ||||
struct trapframe *oldframe; | struct trapframe *oldframe; | ||||
struct thread *td; | struct thread *td; | ||||
/* Send EOI first thing. */ | /* Send EOI first thing. */ | ||||
lapic_eoi(); | lapic_eoi(); | ||||
/* The frame may have been written into a poisoned region. */ | |||||
kasan_mark(frame, sizeof(*frame), sizeof(*frame), 0); | |||||
#if defined(SMP) && !defined(SCHED_ULE) | #if defined(SMP) && !defined(SCHED_ULE) | ||||
/* | /* | ||||
* Don't do any accounting for the disabled HTT cores, since it | * Don't do any accounting for the disabled HTT cores, since it | ||||
* will provide misleading numbers for the userland. | * will provide misleading numbers for the userland. | ||||
* | * | ||||
* No locking is necessary here, since even if we lose the race | * No locking is necessary here, since even if we lose the race | ||||
* when hlt_cpus_mask changes it is not a big deal, really. | * when hlt_cpus_mask changes it is not a big deal, really. | ||||
▲ Show 20 Lines • Show All 852 Lines • Show Last 20 Lines |