aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1995-10-06 09:47:58 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1995-10-06 09:47:58 +0000
commitb67501dcdaa1daa90f08792251ef92125273561b (patch)
tree35375384aa341db532b683ca247c2d8b66f58c2b /sys
parente83e1865c0ae71c2756f59ee7139f61963223d44 (diff)
downloadsrc-b67501dcdaa1daa90f08792251ef92125273561b.tar.gz
src-b67501dcdaa1daa90f08792251ef92125273561b.zip
Avoid some 64bit divides.
Notes
Notes: svn path=/head/; revision=11262
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/specfs/spec_vnops.c10
-rw-r--r--sys/miscfs/specfs/spec_vnops.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index 1b27852910dd..8705c7b9d72e 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.6 (Berkeley) 4/9/94
- * $Id: spec_vnops.c,v 1.13 1995/07/29 11:40:31 bde Exp $
+ * $Id: spec_vnops.c,v 1.14 1995/09/04 00:20:37 dyson Exp $
*/
#include <sys/param.h>
@@ -251,9 +251,9 @@ spec_read(ap)
dpart.part->p_fstype == FS_BSDFFS &&
dpart.part->p_frag != 0 && dpart.part->p_fsize != 0)
bsize = dpart.part->p_frag * dpart.part->p_fsize;
- bscale = bsize / DEV_BSIZE;
+ bscale = bsize >> DEV_BSHIFT;
do {
- bn = (uio->uio_offset / DEV_BSIZE) &~ (bscale - 1);
+ bn = (uio->uio_offset >> DEV_BSHIFT) &~ (bscale - 1);
on = uio->uio_offset % bsize;
n = min((unsigned)(bsize - on), uio->uio_resid);
if (vp->v_lastr + bscale == bn) {
@@ -331,9 +331,9 @@ spec_write(ap)
bsize = dpart.part->p_frag *
dpart.part->p_fsize;
}
- blkmask = (bsize / DEV_BSIZE) - 1;
+ blkmask = (bsize >> DEV_BSHIFT) - 1;
do {
- bn = (uio->uio_offset / DEV_BSIZE) &~ blkmask;
+ bn = (uio->uio_offset >> DEV_BSHIFT) &~ blkmask;
on = uio->uio_offset % bsize;
n = min((unsigned)(bsize - on), uio->uio_resid);
if (n == bsize)
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c
index 1b27852910dd..8705c7b9d72e 100644
--- a/sys/miscfs/specfs/spec_vnops.c
+++ b/sys/miscfs/specfs/spec_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.6 (Berkeley) 4/9/94
- * $Id: spec_vnops.c,v 1.13 1995/07/29 11:40:31 bde Exp $
+ * $Id: spec_vnops.c,v 1.14 1995/09/04 00:20:37 dyson Exp $
*/
#include <sys/param.h>
@@ -251,9 +251,9 @@ spec_read(ap)
dpart.part->p_fstype == FS_BSDFFS &&
dpart.part->p_frag != 0 && dpart.part->p_fsize != 0)
bsize = dpart.part->p_frag * dpart.part->p_fsize;
- bscale = bsize / DEV_BSIZE;
+ bscale = bsize >> DEV_BSHIFT;
do {
- bn = (uio->uio_offset / DEV_BSIZE) &~ (bscale - 1);
+ bn = (uio->uio_offset >> DEV_BSHIFT) &~ (bscale - 1);
on = uio->uio_offset % bsize;
n = min((unsigned)(bsize - on), uio->uio_resid);
if (vp->v_lastr + bscale == bn) {
@@ -331,9 +331,9 @@ spec_write(ap)
bsize = dpart.part->p_frag *
dpart.part->p_fsize;
}
- blkmask = (bsize / DEV_BSIZE) - 1;
+ blkmask = (bsize >> DEV_BSHIFT) - 1;
do {
- bn = (uio->uio_offset / DEV_BSIZE) &~ blkmask;
+ bn = (uio->uio_offset >> DEV_BSHIFT) &~ blkmask;
on = uio->uio_offset % bsize;
n = min((unsigned)(bsize - on), uio->uio_resid);
if (n == bsize)