lapic: skip setting intrcnt if lapic is not present
Instead of panicking. Legacy PVH mode doesn't provide a lapic, and since native_lapic_intrcnt is called unconditionally this would cause the assert to trigger. Change the assert into a continue in order to take into account the possibility of systems without a lapic. Reviewed by: jhb Approved by: re (gjb) Sponsored by: Citrix Systems R&D Differential revision: https://reviews.freebsd.org/D17015
This commit is contained in:
parent
4edbde911b
commit
d7627401ec
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338630
@ -855,7 +855,8 @@ native_lapic_intrcnt(void *dummy __unused)
|
||||
|
||||
STAILQ_FOREACH(pc, &cpuhead, pc_allcpu) {
|
||||
la = &lapics[pc->pc_apic_id];
|
||||
KASSERT(la->la_present, ("missing APIC structure"));
|
||||
if (!la->la_present)
|
||||
continue;
|
||||
|
||||
snprintf(buf, sizeof(buf), "cpu%d:timer", pc->pc_cpuid);
|
||||
intrcnt_add(buf, &la->la_timer_count);
|
||||
|
Loading…
Reference in New Issue
Block a user