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 copy{in,out}str: Style sync with cop...



details:   https://anonhg.NetBSD.org/src/rev/e3a6009d2b71
branches:  trunk
changeset: 371736:e3a6009d2b71
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Oct 04 13:58:54 2022 +0000

description:
copy{in,out}str: Style sync with copy{in,out}. No binary changes.

diffstat:

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

diffs (103 lines):

diff -r 098a17f854d5 -r e3a6009d2b71 sys/arch/powerpc/ibm4xx/copyinstr.c
--- a/sys/arch/powerpc/ibm4xx/copyinstr.c       Tue Oct 04 13:45:50 2022 +0000
+++ b/sys/arch/powerpc/ibm4xx/copyinstr.c       Tue Oct 04 13:58:54 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copyinstr.c,v 1.19 2022/10/04 13:45:50 rin Exp $       */
+/*     $NetBSD: copyinstr.c,v 1.20 2022/10/04 13:58:54 rin Exp $       */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copyinstr.c,v 1.19 2022/10/04 13:45:50 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copyinstr.c,v 1.20 2022/10/04 13:58:54 rin Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -73,14 +73,11 @@
        resid = len;
        __asm volatile(
                "mtctr %[resid];"               /* Set up counter */
-
                "mfmsr %[msr];"                 /* Save MSR */
-
                "li %[pid],0x20;"               /* Disable IMMU */
                "andc %[pid],%[msr],%[pid];"
                "mtmsr %[pid];"
                "isync;"
-
                MFPID(%[pid])                   /* Save old PID */
 
        "1:"    MTPID(%[ctx])                   /* Load user ctx */
@@ -95,13 +92,11 @@
                "addi %[kaddr],%[kaddr],1;"
                "or. %[data],%[data],%[data];"
                "sync;"
-
                "bdnzf eq,1b;"                  /* while(ctr-- && !zero) */
 
                MTPID(%[pid])                   /* Restore PID, MSR */
                "mtmsr %[msr];"
                "isync;"
-
                "mfctr %[resid];"               /* Restore resid */
 
                : [msr] "=&r" (msr), [pid] "=&r" (pid), [data] "=&r" (data),
diff -r 098a17f854d5 -r e3a6009d2b71 sys/arch/powerpc/ibm4xx/copyoutstr.c
--- a/sys/arch/powerpc/ibm4xx/copyoutstr.c      Tue Oct 04 13:45:50 2022 +0000
+++ b/sys/arch/powerpc/ibm4xx/copyoutstr.c      Tue Oct 04 13:58:54 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copyoutstr.c,v 1.19 2022/10/04 13:45:50 rin Exp $      */
+/*     $NetBSD: copyoutstr.c,v 1.20 2022/10/04 13:58:54 rin Exp $      */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copyoutstr.c,v 1.19 2022/10/04 13:45:50 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copyoutstr.c,v 1.20 2022/10/04 13:58:54 rin Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -73,29 +73,23 @@
        resid = len;
        __asm volatile(
                "mtctr %[resid];"               /* Set up counter */
-
                "mfmsr %[msr];"                 /* Save MSR */
-
                "li %[pid],0x20;"               /* Disable IMMU */
                "andc %[pid],%[msr],%[pid];"
                "mtmsr %[pid];"
                "isync;"
-
                MFPID(%[pid])                   /* Save old PID */
 
        "1:"    MTPID(%[pid])
                "isync;"
-
                "lbz %[data],0(%[kaddr]);"      /* Load kernel byte */
                "addi %[kaddr],%[kaddr],1;"
                "sync;"
 
                MTPID(%[ctx])                   /* Load user ctx */
                "isync;"
-
                "stb %[data],0(%[uaddr]);"      /* Store byte */
                "addi %[uaddr],%[uaddr],1;"
-
                "or. %[data],%[data],%[data];"
                "sync;"
                "bdnzf eq,1b;"                  /* while(ctr-- && !zero) */
@@ -103,7 +97,6 @@
                MTPID(%[pid])                   /* Restore PID, MSR */
                "mtmsr %[msr];"
                "isync;"
-
                "mfctr %[resid];"               /* Restore resid */
 
                : [msr] "=&r" (msr), [pid] "=&r" (pid), [data] "=&r" (data),



Home | Main Index | Thread Index | Old Index