Module Name: src Committed By: nonaka Date: Fri Dec 19 04:31:41 UTC 2014
Modified Files: src/sys/arch/evbppc/mpc85xx: machdep.c Log Message: do page recolor. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/evbppc/mpc85xx/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/evbppc/mpc85xx/machdep.c diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.35 src/sys/arch/evbppc/mpc85xx/machdep.c:1.36 --- src/sys/arch/evbppc/mpc85xx/machdep.c:1.35 Fri Dec 19 04:15:36 2014 +++ src/sys/arch/evbppc/mpc85xx/machdep.c Fri Dec 19 04:31:41 2014 @@ -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 @@ cpu_probe_cache(void) { 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 @@ cpu_probe_cache(void) 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)