From 6ebe52f4a9e381224b4d86218c52b8d30d3c03d7 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 27 Jan 2017 19:29:23 +0100 Subject: [PATCH] fetch.9/store.9: Adjust for recent changes. --- Makefile_upgrade.inc | 5 ++++ share/man/man9/Makefile | 12 ++++----- share/man/man9/fetch.9 | 27 ++++++++++---------- share/man/man9/store.9 | 56 +++++++++++++++++++++++------------------ 4 files changed, 56 insertions(+), 44 deletions(-) diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc index b64d0a3e0e..5def6079b7 100644 --- a/Makefile_upgrade.inc +++ b/Makefile_upgrade.inc @@ -3191,6 +3191,11 @@ TO_REMOVE+=/usr/include/bus/cam/scsi/scsi_low_pisa.h TO_REMOVE+=/usr/share/man/man4/ncv.4.gz TO_REMOVE+=/usr/share/man/man4/nsp.4.gz TO_REMOVE+=/usr/share/man/man4/stg.4.gz +TO_REMOVE+=/usr/share/man/man9/casuword.9.gz +TO_REMOVE+=/usr/share/man/man9/fusword.9.gz +TO_REMOVE+=/usr/share/man/man9/fuword.9.gz +TO_REMOVE+=/usr/share/man/man9/susword.9.gz +TO_REMOVE+=/usr/share/man/man9/suword.9.gz .if !defined(WANT_INSTALLER) TO_REMOVE+=/usr/sbin/dfuibe_installer diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 801b10b8a9..07d5ec1ed3 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -480,8 +480,8 @@ MLINKS+=EVENTHANDLER.9 EVENTHANDLER_DECLARE.9 \ EVENTHANDLER.9 EVENTHANDLER_REGISTER.9 \ EVENTHANDLER.9 eventhandler_register.9 MLINKS+=fetch.9 fubyte.9 \ - fetch.9 fusword.9 \ - fetch.9 fuword.9 + fetch.9 fuword32.9 \ + fetch.9 fuword64.9 MLINKS+=firmware.9 firmware_get.9 \ firmware.9 firmware_put.9 \ firmware.9 firmware_register.9 \ @@ -899,11 +899,11 @@ MLINKS+=spinlock.9 spin_init.9 \ spinlock.9 spin_unlock_quick.9 \ spinlock.9 spin_pool_lock.9 \ spinlock.9 spin_pool_unlock.9 -MLINKS+=store.9 casuword.9 \ +MLINKS+=store.9 casu32.9 \ + store.9 casu64.9 \ store.9 subyte.9 \ - store.9 susword.9 \ - store.9 suword.9 \ - store.9 suword32.9 + store.9 suword32.9 \ + store.9 suword64.9 MLINKS+=syscall.9 syscalls.master.5 MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_INT.9 \ diff --git a/share/man/man9/fetch.9 b/share/man/man9/fetch.9 index e0f4e72752..707219bca5 100644 --- a/share/man/man9/fetch.9 +++ b/share/man/man9/fetch.9 @@ -33,16 +33,15 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/share/man/man9/fetch.9,v 1.6.2.4 2001/12/17 11:30:18 ru Exp $ -.\" $DragonFly: src/share/man/man9/fetch.9,v 1.4 2007/04/07 19:29:52 swildner Exp $ .\" -.Dd March 14, 2010 +.Dd January 26, 2017 .Dt FETCH 9 .Os .Sh NAME .Nm fetch , .Nm fubyte , -.Nm fusword , -.Nm fuword +.Nm fuword32 , +.Nm fuword64 .Nd fetch data from user-space .Sh SYNOPSIS .In sys/types.h @@ -50,11 +49,11 @@ .In sys/systm.h .In sys/resourcevar.h .Ft int -.Fn fubyte "const void *base" -.Ft int -.Fn fusword "void *base" -.Ft long -.Fn fuword "const void *base" +.Fn fubyte "const uint8_t *base" +.Ft int32_t +.Fn fuword32 "const uint32_t *base" +.Ft int64_t +.Fn fuword64 "const uint64_t *base" .Sh DESCRIPTION The .Nm @@ -63,15 +62,15 @@ functions are designed to copy small amounts of data from user-space. The .Nm routines provide the following functionality: -.Bl -tag -width ".Fn fusword" +.Bl -tag -width ".Fn fuword32" .It Fn fubyte Fetches a byte of data from the user-space address .Fa base . -.It Fn fusword -Fetches a short word of data from the user-space address +.It Fn fuword32 +Fetches 32 bits of data from the user-space address .Fa base . -.It Fn fuword -Fetches a word of data from the user-space address +.It Fn fuword64 +Fetches 64 bits of data from the user-space address .Fa base . .El .Sh RETURN VALUES diff --git a/share/man/man9/store.9 b/share/man/man9/store.9 index 674f968b55..b5264a29f7 100644 --- a/share/man/man9/store.9 +++ b/share/man/man9/store.9 @@ -34,32 +34,32 @@ .\" .\" $FreeBSD: src/share/man/man9/store.9,v 1.7.2.4 2001/12/17 11:30:19 ru Exp $ .\" -.Dd December 23, 2011 +.Dd January 26, 2017 .Dt STORE 9 .Os .Sh NAME .Nm store , -.Nm casuword , +.Nm casu32 , +.Nm casu64 , .Nm subyte , -.Nm susword , -.Nm suword , -.Nm suword32 +.Nm suword32 , +.Nm suword64 .Nd store data to user-space .Sh SYNOPSIS .In sys/types.h .In sys/time.h .In sys/systm.h .In sys/resourcevar.h -.Ft u_long -.Fn casuword "u_long *base" "u_long oldval" "u_long newval" +.Ft uint32_t +.Fn casu32 "volatile uint32_t *p" "uint32_t oldval" "uint32_t newval" +.Ft uint64_t +.Fn casu64 "volatile uint64_t *p" "uint64_t oldval" "uint64_t newval" .Ft int -.Fn subyte "void *base" "int byte" +.Fn subyte "uint8_t *base" "uint8_t byte" .Ft int -.Fn susword "void *base" "int word" +.Fn suword32 "uint32_t *base" "int word" .Ft int -.Fn suword "void *base" "long word" -.Ft int -.Fn suword32 "void *base" "int word" +.Fn suword64 "uint64_t *base" "uint64_t word" .Sh DESCRIPTION The .Nm @@ -68,11 +68,23 @@ functions are designed to copy small amounts of data to user-space. The .Nm routines provide the following functionality: -.Bl -tag -width ".Fn casuword" -.It Fn casuword -Compares +.Bl -tag -width ".Fn suword32" +.It Fn casu32 +Compares the 32 bit +.Fa oldval +with the 32 bits at +.Fa base , +and if equal, +.Fa base +is set to +.Fa newval . +The old value at +.Fa base +is then returned. +.It Fn casu64 +Compares the 64 bit .Fa oldval -with the word at +with the 64 bits at .Fa base , and if equal, .Fa base @@ -84,16 +96,12 @@ is then returned. .It Fn subyte Stores a byte of data to the user-space address .Fa base . -.It Fn susword -Stores a short word of data to the user-space address +.It Fn suword32 +Stores 32 bits of data to the user-space address .Fa base . -.It Fn suword -Stores a word of data to the user-space address +.It Fn suword64 +Stores 64 bits of data to the user-space address .Fa base . -.It Fn suword32 -Like -.Fn suword , -for cases when 32 bits are desired. .El .Sh RETURN VALUES The -- 2.41.0