Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/ibm4xx Use dcbst instead of dcbf to flush c...



details:   https://anonhg.NetBSD.org/src/rev/c95e62fda8db
branches:  trunk
changeset: 1007931:c95e62fda8db
user:      rin <rin%NetBSD.org@localhost>
date:      Thu Mar 05 01:13:00 2020 +0000

description:
Use dcbst instead of dcbf to flush cache; the former does not invalidate
the cache line, which should be used immediately in most cases.

diffstat:

 sys/arch/powerpc/ibm4xx/copyinstr.c  |  6 +++---
 sys/arch/powerpc/ibm4xx/copyoutstr.c |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r b4627d58d303 -r c95e62fda8db sys/arch/powerpc/ibm4xx/copyinstr.c
--- a/sys/arch/powerpc/ibm4xx/copyinstr.c       Thu Mar 05 01:10:57 2020 +0000
+++ b/sys/arch/powerpc/ibm4xx/copyinstr.c       Thu Mar 05 01:13:00 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copyinstr.c,v 1.11 2020/03/05 01:10:57 rin Exp $       */
+/*     $NetBSD: copyinstr.c,v 1.12 2020/03/05 01:13:00 rin Exp $       */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copyinstr.c,v 1.11 2020/03/05 01:10:57 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copyinstr.c,v 1.12 2020/03/05 01:13:00 rin Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -83,7 +83,7 @@
                "lbz %2,0(%5); addi %5,%5,1;"   /* Load byte */
                "sync; isync;"
                "mtpid %1;sync;"
-               "stb %2,0(%6); dcbf 0,%6; addi %6,%6,1;"
+               "stb %2,0(%6); dcbst 0,%6; addi %6,%6,1;"
                                                /* Store kernel byte */
                "sync; isync;"
                "or. %2,%2,%2;"
diff -r b4627d58d303 -r c95e62fda8db sys/arch/powerpc/ibm4xx/copyoutstr.c
--- a/sys/arch/powerpc/ibm4xx/copyoutstr.c      Thu Mar 05 01:10:57 2020 +0000
+++ b/sys/arch/powerpc/ibm4xx/copyoutstr.c      Thu Mar 05 01:13:00 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copyoutstr.c,v 1.11 2020/03/05 01:10:57 rin Exp $      */
+/*     $NetBSD: copyoutstr.c,v 1.12 2020/03/05 01:13:00 rin Exp $      */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copyoutstr.c,v 1.11 2020/03/05 01:10:57 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copyoutstr.c,v 1.12 2020/03/05 01:13:00 rin Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -83,7 +83,7 @@
                "lbz %2,0(%6); addi %6,%6,1;"   /* Store kernel byte */
                "sync; isync;"
                "mtpid %4; sync;"               /* Load user ctx */
-               "stb %2,0(%5); dcbf 0,%5; addi %5,%5,1;"
+               "stb %2,0(%5); dcbst 0,%5; addi %5,%5,1;"
                                                /* Load byte */
                "sync; isync;"
                "or. %2,%2,%2;"



Home | Main Index | Thread Index | Old Index