Module Name: src Committed By: rin Date: Thu Mar 5 01:13:00 UTC 2020
Modified Files: src/sys/arch/powerpc/ibm4xx: copyinstr.c copyoutstr.c Log Message: Use dcbst instead of dcbf to flush cache; the former does not invalidate the cache line, which should be used immediately in most cases. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/ibm4xx/copyinstr.c \ src/sys/arch/powerpc/ibm4xx/copyoutstr.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/powerpc/ibm4xx/copyinstr.c diff -u src/sys/arch/powerpc/ibm4xx/copyinstr.c:1.11 src/sys/arch/powerpc/ibm4xx/copyinstr.c:1.12 --- src/sys/arch/powerpc/ibm4xx/copyinstr.c:1.11 Thu Mar 5 01:10:57 2020 +++ src/sys/arch/powerpc/ibm4xx/copyinstr.c Thu Mar 5 01:13:00 2020 @@ -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 @@ copyinstr(const void *udaddr, void *kadd "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;" Index: src/sys/arch/powerpc/ibm4xx/copyoutstr.c diff -u src/sys/arch/powerpc/ibm4xx/copyoutstr.c:1.11 src/sys/arch/powerpc/ibm4xx/copyoutstr.c:1.12 --- src/sys/arch/powerpc/ibm4xx/copyoutstr.c:1.11 Thu Mar 5 01:10:57 2020 +++ src/sys/arch/powerpc/ibm4xx/copyoutstr.c Thu Mar 5 01:13:00 2020 @@ -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 @@ copyoutstr(const void *kaddr, void *udad "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;"