Date: Thu, 13 Sep 2018 07:13:13 +0000 (UTC) From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338630 - head/sys/x86/x86 Message-ID: <201809130713.w8D7DDrf027882@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: royger Date: Thu Sep 13 07:13:13 2018 New Revision: 338630 URL: https://svnweb.freebsd.org/changeset/base/338630 Log: 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 Modified: head/sys/x86/x86/local_apic.c Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Thu Sep 13 07:12:16 2018 (r338629) +++ head/sys/x86/x86/local_apic.c Thu Sep 13 07:13:13 2018 (r338630) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809130713.w8D7DDrf027882>