Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Partially revert previous. Rather than com...



details:   https://anonhg.NetBSD.org/src/rev/73ff870f4a8e
branches:  trunk
changeset: 824300:73ff870f4a8e
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Wed May 31 10:08:24 2017 +0000

description:
Partially revert previous.  Rather than completely removing the loop
around calls to x86_pause(), just drastically reduce the repeat count.
It's still good to have some real delay here (among other things, for
letting the TSCs drift).

As discussed on IRC

diffstat:

 sys/arch/x86/x86/cpu.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r aff00daea41e -r 73ff870f4a8e sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Wed May 31 09:53:35 2017 +0000
+++ b/sys/arch/x86/x86/cpu.c    Wed May 31 10:08:24 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.126 2017/05/31 00:19:17 maya Exp $   */
+/*     $NetBSD: cpu.c,v 1.127 2017/05/31 10:08:24 pgoyette Exp $       */
 
 /*-
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.126 2017/05/31 00:19:17 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.127 2017/05/31 10:08:24 pgoyette Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"                /* for MPDEBUG */
@@ -835,7 +835,9 @@
                        }
                        x86_mwait(0, 0);
                } else {
-                       x86_pause();
+                       for (i = 100; i != 0; i--) {
+                               x86_pause();
+                       }
                }
        }
 



Home | Main Index | Thread Index | Old Index