svn commit: r338630 - head/sys/x86/x86

Roger Pau Monné royger at FreeBSD.org
Thu Sep 13 07:13:14 UTC 2018


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);


More information about the svn-src-all mailing list