Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbppc/mpc85xx do page recolor.



details:   https://anonhg.NetBSD.org/src/rev/7e12c55344c6
branches:  trunk
changeset: 805116:7e12c55344c6
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Fri Dec 19 04:31:41 2014 +0000

description:
do page recolor.

diffstat:

 sys/arch/evbppc/mpc85xx/machdep.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 762f384a745d -r 7e12c55344c6 sys/arch/evbppc/mpc85xx/machdep.c
--- a/sys/arch/evbppc/mpc85xx/machdep.c Fri Dec 19 04:25:52 2014 +0000
+++ b/sys/arch/evbppc/mpc85xx/machdep.c Fri Dec 19 04:31:41 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.35 2014/12/19 04:15:36 nonaka Exp $      */
+/*     $NetBSD: machdep.c,v 1.36 2014/12/19 04:31:41 nonaka Exp $      */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -639,6 +639,7 @@
 {
        struct cpu_info * const ci = curcpu();
        const uint32_t l1cfg0 = mfspr(SPR_L1CFG0);
+       const int dcache_assoc = L1CFG_CNWAY_GET(l1cfg0);
 
        ci->ci_ci.dcache_size = L1CFG_CSIZE_GET(l1cfg0);
        ci->ci_ci.dcache_line_size = 32 << L1CFG_CBSIZE_GET(l1cfg0);
@@ -653,6 +654,11 @@
                ci->ci_ci.icache_line_size = ci->ci_ci.dcache_line_size;
        }
 
+       /*
+        * Possibly recolor.
+        */
+       uvm_page_recolor(atop(curcpu()->ci_ci.dcache_size / dcache_assoc));
+
 #ifdef DEBUG
        uint32_t l1csr0 = mfspr(SPR_L1CSR0);
        if ((L1CSR_CE & l1csr0) == 0)



Home | Main Index | Thread Index | Old Index