svn commit: r338807 - in head/sys: amd64/amd64 amd64/include dev/drm2 dev/drm2/i915 i386/i386 i386/include x86/iommu

Konstantin Belousov kostikbel at gmail.com
Fri Sep 28 17:26:30 UTC 2018


On Fri, Sep 28, 2018 at 07:02:34PM +0200, Tijl Coosemans wrote:
> The removal of #ifdef DEV_APIC breaks building kernels without device
> apic:
> 
> /usr/src/sys/i386/i386/pmap.c:1465:28: error: 
>       use of undeclared identifier 'lapic_paddr'
>         if (pmap_kextract(sva) == lapic_paddr)
>                                   ^
> 1 error generated.

Does the following work for you ?  If not, please provide me your
kernel config.

diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index a969eef2881..0c303e25a59 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -1456,6 +1456,7 @@ pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva)
 		return;
 	}
 
+#ifdef DEV_APIC
 	/*
 	 * XXX: Some CPUs fault, hang, or trash the local APIC
 	 * registers if we use CLFLUSH on the local APIC
@@ -1464,6 +1465,7 @@ pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva)
 	 */
 	if (pmap_kextract(sva) == lapic_paddr)
 		return;
+#endif
 
 	if ((cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0) {
 		/*


More information about the svn-src-head mailing list