summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-05-03 21:01:54 +0000
committerphk <phk@FreeBSD.org>1996-05-03 21:01:54 +0000
commit5d01dc3d502f27448cc5a6c62c8f103d25ac3df0 (patch)
tree6e409b4bdf1f55b895a65877ef5486cfc5442060 /sys/pci
parent6ed0fd2b8bab9bd3b84ab82f273df31ce328c87d (diff)
downloadFreeBSD-src-5d01dc3d502f27448cc5a6c62c8f103d25ac3df0.zip
FreeBSD-src-5d01dc3d502f27448cc5a6c62c8f103d25ac3df0.tar.gz
Another sweep over the pmap/vm macros, this time with more focus on
the usage. I'm not satisfied with the naming, but now at least there is less bogus stuff around.
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_de.c4
-rw-r--r--sys/pci/meteor.c5
-rw-r--r--sys/pci/ncr.c8
3 files changed, 8 insertions, 9 deletions
diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c
index 73832f2..274647c 100644
--- a/sys/pci/if_de.c
+++ b/sys/pci/if_de.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_de.c,v 1.44 1996/03/23 19:29:09 fenner Exp $
+ * $Id: if_de.c,v 1.45 1996/05/02 14:20:44 phk Exp $
*
*/
@@ -1301,7 +1301,7 @@ tulip_start(
do {
int len = m0->m_len;
caddr_t addr = mtod(m0, caddr_t);
- unsigned clsize = PAGE_SIZE - (((u_long) addr) & (PAGE_SIZE-1));
+ unsigned clsize = PAGE_SIZE - (((u_long) addr) & PAGE_MASK);
next_m0 = m0->m_next;
while (len > 0) {
diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c
index cf19e00..fd2f72a 100644
--- a/sys/pci/meteor.c
+++ b/sys/pci/meteor.c
@@ -1509,8 +1509,7 @@ meteor_ioctl(dev_t dev, int cmd, caddr_t arg, int flag, struct proc *pr)
return(EINVAL);
/* meteor_mem structure is on the page after the data */
mem = mtr->mem = (struct meteor_mem *) (mtr->bigbuf +
- ((mtr->frame_size *
- mtr->frames+PAGE_SIZE-1)/PAGE_SIZE)*PAGE_SIZE);
+ (round_page(mtr->frame_size * mtr->frames)));
mtr->current = 1;
mtr->synch_wait = 0;
mem->num_bufs = mtr->frames;
@@ -1599,7 +1598,7 @@ meteor_ioctl(dev_t dev, int cmd, caddr_t arg, int flag, struct proc *pr)
/* meteor_mem structure for SYNC Capture */
if (geo->frames > 1) temp += PAGE_SIZE;
- temp = (temp + PAGE_SIZE -1)/PAGE_SIZE;
+ temp = btoc(temp);
if (temp > mtr->alloc_pages
#ifdef METEOR_TEST_VIDEO
&& mtr->video.addr == 0
diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c
index cebdcb7..489ed3d0 100644
--- a/sys/pci/ncr.c
+++ b/sys/pci/ncr.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: ncr.c,v 1.70 1996/04/07 17:32:33 bde Exp $
+** $Id: ncr.c,v 1.71 1996/05/02 14:20:47 phk Exp $
**
** Device driver for the NCR 53C810 PCI-SCSI-Controller.
**
@@ -1254,7 +1254,7 @@ static void ncr_attach (pcici_t tag, int unit);
static char ident[] =
- "\n$Id: ncr.c,v 1.70 1996/04/07 17:32:33 bde Exp $\n";
+ "\n$Id: ncr.c,v 1.71 1996/05/02 14:20:47 phk Exp $\n";
static u_long ncr_version = NCR_VERSION * 11
+ (u_long) sizeof (struct ncb) * 7
@@ -6425,7 +6425,7 @@ static int ncr_scatter
free = MAX_SCATTER - 1;
- if (vaddr & (PAGE_SIZE-1)) free -= datalen / PAGE_SIZE;
+ if (vaddr & PAGE_MASK) free -= datalen / PAGE_SIZE;
if (free>1)
while ((chunk * free >= 2 * datalen) && (chunk>=1024))
@@ -6454,7 +6454,7 @@ static int ncr_scatter
/*
** continue this segment
*/
- pnext = (paddr & (~(PAGE_SIZE - 1))) + PAGE_SIZE;
+ pnext = (paddr & (~PAGE_MASK)) + PAGE_SIZE;
/*
** Compute max size
OpenPOWER on IntegriCloud