From 4cddf39fa9f2c247e9b4dffe23108d570a07d80c Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Wed, 31 Mar 2010 19:46:28 +0000 Subject: Make sure the boundaries of uvm_pglistalloc() calls are set up with low being page-aligned, and high being end of page (i.e. high & PAGE_MASK == PAGE_MASK) everywhere, for consistency. Future code will depend on this. ok deraadt@ --- sys/arch/mac68k/dev/if_mc_obio.c | 6 +++--- sys/arch/mac68k/dev/if_sn.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/arch/mac68k') diff --git a/sys/arch/mac68k/dev/if_mc_obio.c b/sys/arch/mac68k/dev/if_mc_obio.c index 5601ebd76c5..89f701e9a7d 100644 --- a/sys/arch/mac68k/dev/if_mc_obio.c +++ b/sys/arch/mac68k/dev/if_mc_obio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mc_obio.c,v 1.8 2009/04/14 16:01:04 oga Exp $ */ +/* $OpenBSD: if_mc_obio.c,v 1.9 2010/03/31 19:46:27 miod Exp $ */ /* $NetBSD: if_mc_obio.c,v 1.13 2004/03/26 12:15:46 wiz Exp $ */ /*- @@ -138,7 +138,7 @@ mc_obio_attach(parent, self, aux) /* allocate memory for transmit buffer and mark it non-cacheable */ TAILQ_INIT(&txlist); - if (uvm_pglistalloc(PAGE_SIZE, 0, -PAGE_SIZE, PAGE_SIZE, 0, + if (uvm_pglistalloc(PAGE_SIZE, 0, -1, PAGE_SIZE, 0, &txlist, 1, UVM_PLA_NOWAIT) != 0) { printf(": could not allocate transmit buffer memory\n"); goto out1; @@ -158,7 +158,7 @@ mc_obio_attach(parent, self, aux) * allocate memory for receive buffer and mark it non-cacheable */ TAILQ_INIT(&rxlist); - if (uvm_pglistalloc(MC_NPAGES * PAGE_SIZE, 0, -PAGE_SIZE, PAGE_SIZE, 0, + if (uvm_pglistalloc(MC_NPAGES * PAGE_SIZE, 0, -1, PAGE_SIZE, 0, &rxlist, 1, UVM_PLA_NOWAIT) != 0) { printf(": could not allocate receive buffer memory\n"); goto out3; diff --git a/sys/arch/mac68k/dev/if_sn.c b/sys/arch/mac68k/dev/if_sn.c index 74bf85d5c3d..b60fbe50eb0 100644 --- a/sys/arch/mac68k/dev/if_sn.c +++ b/sys/arch/mac68k/dev/if_sn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sn.c,v 1.53 2009/04/14 16:01:04 oga Exp $ */ +/* $OpenBSD: if_sn.c,v 1.54 2010/03/31 19:46:27 miod Exp $ */ /* $NetBSD: if_sn.c,v 1.13 1997/04/25 03:40:10 briggs Exp $ */ /* @@ -113,7 +113,7 @@ snsetup(struct sn_softc *sc, u_int8_t *lladdr) * to do that? */ TAILQ_INIT(&pglist); - error = uvm_pglistalloc(SN_NPAGES * PAGE_SIZE, 0, -PAGE_SIZE, + error = uvm_pglistalloc(SN_NPAGES * PAGE_SIZE, 0, -1, PAGE_SIZE, 0, &pglist, 1, UVM_PLA_NOWAIT); if (error != 0) { printf(": could not allocate descriptor memory\n"); -- cgit v1.2.3