Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbmips/cavium If booting a MULTIPROCESSOR kernel, ...



details:   https://anonhg.NetBSD.org/src/rev/b2404d9e639e
branches:  trunk
changeset: 808830:b2404d9e639e
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Jun 04 05:21:09 2015 +0000

description:
If booting a MULTIPROCESSOR kernel, use the llsc atomic primitives

diffstat:

 sys/arch/evbmips/cavium/machdep.c |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r dd540ec51c84 -r b2404d9e639e sys/arch/evbmips/cavium/machdep.c
--- a/sys/arch/evbmips/cavium/machdep.c Thu Jun 04 02:28:06 2015 +0000
+++ b/sys/arch/evbmips/cavium/machdep.c Thu Jun 04 05:21:09 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.3 2015/06/01 22:55:12 matt Exp $ */
+/*     $NetBSD: machdep.c,v 1.4 2015/06/04 05:21:09 matt Exp $ */
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.3 2015/06/01 22:55:12 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.4 2015/06/04 05:21:09 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -275,7 +275,11 @@
         * first printf() after that is called).
         * Also clears the I+D caches.
         */
+#if MULTIPROCESSOR
+       mips_vector_init(NULL, true);
+#else
        mips_vector_init(NULL, false);
+#endif
 }
 
 void
@@ -439,9 +443,10 @@
        delay(80000);
 
        /* initiate chip soft-reset */
-       octeon_write_csr(CIU_SOFT_BIST, 0x0000000000000001ULL);
+       uint64_t fuse = octeon_read_csr(CIU_FUSE);
+       octeon_write_csr(CIU_SOFT_BIST, fuse);
        octeon_read_csr(CIU_SOFT_RST);
-       octeon_write_csr(CIU_SOFT_RST, 0x0000000000000001ULL);
+       octeon_write_csr(CIU_SOFT_RST, fuse);
 
        delay(1000000);
 



Home | Main Index | Thread Index | Old Index