Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Oct 2009 12:20:59 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r197744 - in stable/8/sys: . amd64/amd64 amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci i386/i386
Message-ID:  <200910041220.n94CKxTH073639@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Oct  4 12:20:59 2009
New Revision: 197744
URL: http://svn.freebsd.org/changeset/base/197744

Log:
  MFC r197663:
  As a workaround, for Intel CPUs, do not use CLFLUSH in
  pmap_invalidate_cache_range() when self-snoop is apparently not reported
  in cpu features.
  
  Approved by:	re (bz, kensmith)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/amd64/initcpu.c
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/i386/i386/initcpu.c

Modified: stable/8/sys/amd64/amd64/initcpu.c
==============================================================================
--- stable/8/sys/amd64/amd64/initcpu.c	Sun Oct  4 12:14:49 2009	(r197743)
+++ stable/8/sys/amd64/amd64/initcpu.c	Sun Oct  4 12:20:59 2009	(r197744)
@@ -165,4 +165,10 @@ initializecpu(void)
 	 */
 	if ((cpu_feature & CPUID_CLFSH) != 0)
 		cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8;
+	/*
+	 * XXXKIB: (temporary) hack to work around traps generated when
+	 * CLFLUSHing APIC registers window.
+	 */
+	if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS))
+		cpu_feature &= ~CPUID_CLFSH;
 }

Modified: stable/8/sys/i386/i386/initcpu.c
==============================================================================
--- stable/8/sys/i386/i386/initcpu.c	Sun Oct  4 12:14:49 2009	(r197743)
+++ stable/8/sys/i386/i386/initcpu.c	Sun Oct  4 12:20:59 2009	(r197744)
@@ -717,6 +717,12 @@ initializecpu(void)
 	 */
 	if ((cpu_feature & CPUID_CLFSH) != 0)
 		cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8;
+	/*
+	 * XXXKIB: (temporary) hack to work around traps generated when
+	 * CLFLUSHing APIC registers window.
+	 */
+	if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS))
+		cpu_feature &= ~CPUID_CLFSH;
 
 #if defined(PC98) && !defined(CPU_UPGRADE_HW_CACHE)
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910041220.n94CKxTH073639>