Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/arch/hppa/hppa Pull up following revision(s) (request...



details:   https://anonhg.NetBSD.org/src/rev/8f1b61b346fe
branches:  netbsd-9
changeset: 366095:8f1b61b346fe
user:      martin <martin%NetBSD.org@localhost>
date:      Sat May 14 11:38:31 2022 +0000

description:
Pull up following revision(s) (requested by skrll in ticket #1448):

        sys/arch/hppa/hppa/idle_machdep.c: revision 1.4
        sys/arch/hppa/hppa/machdep.c: revision 1.17

Add some special NOPs to help qemu.
thanks to Helge Deller for the heads-up.

diffstat:

 sys/arch/hppa/hppa/idle_machdep.c |   9 ++++++---
 sys/arch/hppa/hppa/machdep.c      |  13 +++++++++----
 2 files changed, 15 insertions(+), 7 deletions(-)

diffs (62 lines):

diff -r d7d77b0ac7b0 -r 8f1b61b346fe sys/arch/hppa/hppa/idle_machdep.c
--- a/sys/arch/hppa/hppa/idle_machdep.c Sat May 14 11:37:06 2022 +0000
+++ b/sys/arch/hppa/hppa/idle_machdep.c Sat May 14 11:38:31 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: idle_machdep.c,v 1.3 2019/04/15 20:45:08 skrll Exp $   */
+/*     $NetBSD: idle_machdep.c,v 1.3.4.1 2022/05/14 11:38:31 martin Exp $      */
 
 /*
  * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: idle_machdep.c,v 1.3 2019/04/15 20:45:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: idle_machdep.c,v 1.3.4.1 2022/05/14 11:38:31 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -36,5 +36,8 @@
 void
 cpu_idle(void)
 {
-       /* do nothing */
+        /*
+        * This NOP instruction is used by qemu to detect the idle loop.
+        */
+       __asm volatile("or      %%r10,%%r10,%%r10" ::: "memory");
 }
diff -r d7d77b0ac7b0 -r 8f1b61b346fe sys/arch/hppa/hppa/machdep.c
--- a/sys/arch/hppa/hppa/machdep.c      Sat May 14 11:37:06 2022 +0000
+++ b/sys/arch/hppa/hppa/machdep.c      Sat May 14 11:38:31 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.10 2019/04/06 03:06:25 thorpej Exp $     */
+/*     $NetBSD: machdep.c,v 1.10.4.1 2022/05/14 11:38:31 martin Exp $  */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.10 2019/04/06 03:06:25 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.10.4.1 2022/05/14 11:38:31 martin Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -1459,8 +1459,13 @@
                    :: "r" (CMD_RESET), "r" (HPPA_LBCAST + iomod_command));
        }
 
-       for (;;)
-               /* loop while bus reset is coming up */ ;
+       for (;;) {
+               /*
+                * loop while bus reset is coming up.  This NOP instruction
+                * is used by qemu to detect the 'death loop'.
+                */
+               __asm volatile("or %%r31, %%r31, %%r31" ::: "memory");
+       }
        /* NOTREACHED */
 }
 



Home | Main Index | Thread Index | Old Index