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: Consistently use ua...



details:   https://anonhg.NetBSD.org/src/rev/5b8c56c9c429
branches:  trunk
changeset: 371726:5b8c56c9c429
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Oct 03 23:35:41 2022 +0000

description:
copy{in,out}str: Consistently use uaddr instead of udaddr.
Note that we use kaddr, not kdaddr, for kernel data address.

diffstat:

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

diffs (96 lines):

diff -r f254d4022e79 -r 5b8c56c9c429 sys/arch/powerpc/ibm4xx/copyinstr.c
--- a/sys/arch/powerpc/ibm4xx/copyinstr.c       Mon Oct 03 23:32:27 2022 +0000
+++ b/sys/arch/powerpc/ibm4xx/copyinstr.c       Mon Oct 03 23:35:41 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copyinstr.c,v 1.16 2022/10/03 23:32:27 rin Exp $       */
+/*     $NetBSD: copyinstr.c,v 1.17 2022/10/03 23:35:41 rin Exp $       */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copyinstr.c,v 1.16 2022/10/03 23:32:27 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copyinstr.c,v 1.17 2022/10/03 23:35:41 rin Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -44,7 +44,7 @@
 #include <machine/pcb.h>
 
 int
-copyinstr(const void *udaddr, void *kaddr, size_t len, size_t *done)
+copyinstr(const void *uaddr, void *kaddr, size_t len, size_t *done)
 {
        struct pmap *pm = curproc->p_vmspace->vm_map.pmap;
        size_t resid;
@@ -85,8 +85,8 @@
 
        "1:"    MTPID(%[ctx])                   /* Load user ctx */
                "isync;"
-               "lbz %[data],0(%[udaddr]);"     /* Load byte */
-               "addi %[udaddr],%[udaddr],1;"
+               "lbz %[data],0(%[uaddr]);"      /* Load byte */
+               "addi %[uaddr],%[uaddr],1;"
                "sync;"
 
                MTPID(%[pid])
@@ -107,7 +107,7 @@
 
                : [msr] "=&r" (msr), [pid] "=&r" (pid), [data] "=&r" (data),
                  [resid] "+r" (resid)
-               : [ctx] "r" (ctx), [udaddr] "b" (udaddr), [kaddr] "b" (kaddr));
+               : [ctx] "r" (ctx), [uaddr] "b" (uaddr), [kaddr] "b" (kaddr));
 
        curpcb->pcb_onfault = NULL;
        if (done)
diff -r f254d4022e79 -r 5b8c56c9c429 sys/arch/powerpc/ibm4xx/copyoutstr.c
--- a/sys/arch/powerpc/ibm4xx/copyoutstr.c      Mon Oct 03 23:32:27 2022 +0000
+++ b/sys/arch/powerpc/ibm4xx/copyoutstr.c      Mon Oct 03 23:35:41 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copyoutstr.c,v 1.16 2022/10/03 23:32:27 rin Exp $      */
+/*     $NetBSD: copyoutstr.c,v 1.17 2022/10/03 23:35:41 rin Exp $      */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copyoutstr.c,v 1.16 2022/10/03 23:32:27 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copyoutstr.c,v 1.17 2022/10/03 23:35:41 rin Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -44,7 +44,7 @@
 #include <machine/pcb.h>
 
 int
-copyoutstr(const void *kaddr, void *udaddr, size_t len, size_t *done)
+copyoutstr(const void *kaddr, void *uaddr, size_t len, size_t *done)
 {
        struct pmap *pm = curproc->p_vmspace->vm_map.pmap;
        size_t resid;
@@ -93,9 +93,9 @@
                MTPID(%[ctx])                   /* Load user ctx */
                "isync;"
 
-               "stb %[data],0(%[udaddr]);"     /* Store byte */
-               "dcbst 0,%[udaddr];"
-               "addi %[udaddr],%[udaddr],1;"
+               "stb %[data],0(%[uaddr]);"      /* Store byte */
+               "dcbst 0,%[uaddr];"
+               "addi %[uaddr],%[uaddr],1;"
 
                "or. %[data],%[data],%[data];"
                "sync;"
@@ -109,7 +109,7 @@
 
                : [msr] "=&r" (msr), [pid] "=&r" (pid), [data] "=&r" (data),
                  [resid] "+r" (resid)
-               : [ctx] "r" (ctx), [udaddr] "b" (udaddr), [kaddr] "b" (kaddr));
+               : [ctx] "r" (ctx), [uaddr] "b" (uaddr), [kaddr] "b" (kaddr));
 
        curpcb->pcb_onfault = NULL;
        if (done)



Home | Main Index | Thread Index | Old Index