Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbmips add an OCTEON_MEMSIZE option to override th...



details:   https://anonhg.NetBSD.org/src/rev/9b90dd2e47d9
branches:  trunk
changeset: 820060:9b90dd2e47d9
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Dec 28 03:27:08 2016 +0000

description:
add an OCTEON_MEMSIZE option to override the uboot provided memory
size.  limiting this to 256 avoids an annoying uvm freelist problem on
the 512mb erlite, partly described here:

http://mail-index.netbsd.org/tech-kern/2016/12/20/msg021358.html

diffstat:

 sys/arch/evbmips/cavium/machdep.c  |  9 +++++++--
 sys/arch/evbmips/conf/files.octeon |  5 ++++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diffs (49 lines):

diff -r e620c0edf518 -r 9b90dd2e47d9 sys/arch/evbmips/cavium/machdep.c
--- a/sys/arch/evbmips/cavium/machdep.c Wed Dec 28 03:02:54 2016 +0000
+++ b/sys/arch/evbmips/cavium/machdep.c Wed Dec 28 03:27:08 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.9 2016/12/22 14:47:56 cherry Exp $       */
+/*     $NetBSD: machdep.c,v 1.10 2016/12/28 03:27:08 mrg Exp $ */
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -112,9 +112,10 @@
  */
 
 #include "opt_multiprocessor.h"
+#include "opt_cavium.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.9 2016/12/22 14:47:56 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.10 2016/12/28 03:27:08 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -203,7 +204,11 @@
            sizeof(octeon_btinfo));
 
        corefreq = octeon_btinfo.obt_eclock_hz;
+#ifdef OCTEON_MEMSIZE // avoid uvm issue
+       memsize = OCTEON_MEMSIZE;
+#else
        memsize = octeon_btinfo.obt_dram_size * 1024 * 1024;
+#endif
 
        octeon_cal_timer(corefreq);
 
diff -r e620c0edf518 -r 9b90dd2e47d9 sys/arch/evbmips/conf/files.octeon
--- a/sys/arch/evbmips/conf/files.octeon        Wed Dec 28 03:02:54 2016 +0000
+++ b/sys/arch/evbmips/conf/files.octeon        Wed Dec 28 03:27:08 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.octeon,v 1.5 2016/12/09 10:30:48 roy Exp $
+#      $NetBSD: files.octeon,v 1.6 2016/12/28 03:27:08 mrg Exp $
 
 file   arch/evbmips/cavium/autoconf.c
 file   arch/evbmips/cavium/machdep.c
@@ -18,3 +18,6 @@
 
 # Memory Disk
 file   dev/md_root.c                           memory_disk_hooks
+
+# workaround Cavium 50x0 problem vs uvm freelists
+defparam opt_cavium.h          OCTEON_MEMSIZE



Home | Main Index | Thread Index | Old Index