summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/uvm/uvm_aobj.c39
-rw-r--r--sys/uvm/uvm_device.c21
-rw-r--r--sys/uvm/uvm_fault.c6
-rw-r--r--sys/uvm/uvm_loan.c8
-rw-r--r--sys/uvm/uvm_meter.c6
-rw-r--r--sys/uvm/uvm_page.c6
-rw-r--r--sys/uvm/uvm_pdaemon.c12
-rw-r--r--sys/uvm/uvm_stat.c6
-rw-r--r--sys/uvm/uvm_swap.c51
9 files changed, 75 insertions, 80 deletions
diff --git a/sys/uvm/uvm_aobj.c b/sys/uvm/uvm_aobj.c
index 77891de411c..0f7770a4707 100644
--- a/sys/uvm/uvm_aobj.c
+++ b/sys/uvm/uvm_aobj.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_aobj.c,v 1.38 2009/05/05 05:12:17 oga Exp $ */
+/* $OpenBSD: uvm_aobj.c,v 1.39 2009/05/08 13:50:15 ariane Exp $ */
/* $NetBSD: uvm_aobj.c,v 1.39 2001/02/18 21:19:08 chs Exp $ */
/*
@@ -167,19 +167,16 @@ struct pool uvm_aobj_pool;
* local functions
*/
-static struct uao_swhash_elt *uao_find_swhash_elt(struct uvm_aobj *, int,
- boolean_t);
-static int uao_find_swslot(struct uvm_aobj *, int);
-static boolean_t uao_flush(struct uvm_object *, voff_t,
- voff_t, int);
-static void uao_free(struct uvm_aobj *);
-static int uao_get(struct uvm_object *, voff_t,
- vm_page_t *, int *, int, vm_prot_t,
- int, int);
-static boolean_t uao_releasepg(struct vm_page *,
- struct vm_page **);
-static boolean_t uao_pagein(struct uvm_aobj *, int, int);
-static boolean_t uao_pagein_page(struct uvm_aobj *, int);
+struct uao_swhash_elt *uao_find_swhash_elt(struct uvm_aobj *, int,
+ boolean_t);
+static int uao_find_swslot(struct uvm_aobj *, int);
+boolean_t uao_flush(struct uvm_object *, voff_t, voff_t, int);
+void uao_free(struct uvm_aobj *);
+int uao_get(struct uvm_object *, voff_t, vm_page_t *,
+ int *, int, vm_prot_t, int, int);
+boolean_t uao_releasepg(struct vm_page *, struct vm_page **);
+boolean_t uao_pagein(struct uvm_aobj *, int, int);
+boolean_t uao_pagein_page(struct uvm_aobj *, int);
/*
* aobj_pager
@@ -223,7 +220,7 @@ static simple_lock_data_t uao_list_lock;
* => the object should be locked by the caller
*/
-static struct uao_swhash_elt *
+struct uao_swhash_elt *
uao_find_swhash_elt(struct uvm_aobj *aobj, int pageidx, boolean_t create)
{
struct uao_swhash *swhash;
@@ -261,7 +258,7 @@ uao_find_swhash_elt(struct uvm_aobj *aobj, int pageidx, boolean_t create)
*
* => object must be locked by caller
*/
-__inline static int
+static __inline int
uao_find_swslot(struct uvm_aobj *aobj, int pageidx)
{
@@ -378,7 +375,7 @@ uao_set_swslot(struct uvm_object *uobj, int pageidx, int slot)
*
* => the aobj should be dead
*/
-static void
+void
uao_free(struct uvm_aobj *aobj)
{
@@ -859,7 +856,7 @@ uao_flush(struct uvm_object *uobj, voff_t start, voff_t stop, int flags)
* => NOTE: offset is the offset of pps[0], _NOT_ pps[centeridx]
* => NOTE: caller must check for released pages!!
*/
-static int
+int
uao_get(struct uvm_object *uobj, voff_t offset, struct vm_page **pps,
int *npagesp, int centeridx, vm_prot_t access_type, int advice, int flags)
{
@@ -1160,7 +1157,7 @@ uao_get(struct uvm_object *uobj, voff_t offset, struct vm_page **pps,
* => we kill the aobj if it is not referenced and we are suppose to
* kill it ("KILLME").
*/
-static boolean_t
+boolean_t
uao_releasepg(struct vm_page *pg, struct vm_page **nextpgp /* OUT */)
{
struct uvm_aobj *aobj = (struct uvm_aobj *) pg->uobject;
@@ -1279,7 +1276,7 @@ restart:
* => aobj must be locked and is returned locked.
* => returns TRUE if pagein was aborted due to lack of memory.
*/
-static boolean_t
+boolean_t
uao_pagein(struct uvm_aobj *aobj, int startslot, int endslot)
{
boolean_t rv;
@@ -1353,7 +1350,7 @@ restart:
*
* => aobj must be locked and is returned locked.
*/
-static boolean_t
+boolean_t
uao_pagein_page(struct uvm_aobj *aobj, int pageidx)
{
struct vm_page *pg;
diff --git a/sys/uvm/uvm_device.c b/sys/uvm/uvm_device.c
index c3bc21ddea0..c383b94dbb9 100644
--- a/sys/uvm/uvm_device.c
+++ b/sys/uvm/uvm_device.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_device.c,v 1.30 2009/03/23 19:23:43 oga Exp $ */
+/* $OpenBSD: uvm_device.c,v 1.31 2009/05/08 13:50:15 ariane Exp $ */
/* $NetBSD: uvm_device.c,v 1.30 2000/11/25 06:27:59 chs Exp $ */
/*
@@ -63,14 +63,13 @@ static simple_lock_data_t udv_lock;
* functions
*/
-static void udv_init(void);
-static void udv_reference(struct uvm_object *);
-static void udv_detach(struct uvm_object *);
-static int udv_fault(struct uvm_faultinfo *, vaddr_t,
+void udv_init(void);
+void udv_reference(struct uvm_object *);
+void udv_detach(struct uvm_object *);
+int udv_fault(struct uvm_faultinfo *, vaddr_t,
vm_page_t *, int, int, vm_fault_t,
vm_prot_t, int);
-static boolean_t udv_flush(struct uvm_object *, voff_t, voff_t,
- int);
+boolean_t udv_flush(struct uvm_object *, voff_t, voff_t, int);
/*
* master pager structure
@@ -267,7 +266,7 @@ udv_attach(void *arg, vm_prot_t accessprot, voff_t off, vsize_t size)
* => caller must call with object unlocked.
*/
-static void
+void
udv_reference(struct uvm_object *uobj)
{
UVMHIST_FUNC("udv_reference"); UVMHIST_CALLED(maphist);
@@ -287,7 +286,7 @@ udv_reference(struct uvm_object *uobj)
* => caller must call with object unlocked and map locked.
*/
-static void
+void
udv_detach(struct uvm_object *uobj)
{
struct uvm_device *udv = (struct uvm_device *)uobj;
@@ -339,7 +338,7 @@ again:
* flush pages out of a uvm object. a no-op for devices.
*/
-static boolean_t
+boolean_t
udv_flush(struct uvm_object *uobj, voff_t start, voff_t stop, int flags)
{
@@ -362,7 +361,7 @@ udv_flush(struct uvm_object *uobj, voff_t start, voff_t stop, int flags)
* => NOTE: vaddr is the VA of pps[0] in ufi->entry, _NOT_ pps[centeridx]
*/
-static int
+int
udv_fault(struct uvm_faultinfo *ufi, vaddr_t vaddr, vm_page_t *pps, int npages,
int centeridx, vm_fault_t fault_type, vm_prot_t access_type, int flags)
{
diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c
index 57d3fe322bf..a596ef1d342 100644
--- a/sys/uvm/uvm_fault.c
+++ b/sys/uvm/uvm_fault.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_fault.c,v 1.52 2009/03/25 20:00:18 oga Exp $ */
+/* $OpenBSD: uvm_fault.c,v 1.53 2009/05/08 13:50:15 ariane Exp $ */
/* $NetBSD: uvm_fault.c,v 1.51 2000/08/06 00:22:53 thorpej Exp $ */
/*
@@ -175,7 +175,7 @@ static struct uvm_advice uvmadvice[] = {
* private prototypes
*/
-static void uvmfault_amapcopy(struct uvm_faultinfo *);
+void uvmfault_amapcopy(struct uvm_faultinfo *);
static __inline void uvmfault_anonflush(struct vm_anon **, int);
void uvmfault_unlockmaps(struct uvm_faultinfo *, boolean_t);
@@ -228,7 +228,7 @@ uvmfault_anonflush(struct vm_anon **anons, int n)
* => if we are out of RAM we sleep (waiting for more)
*/
-static void
+void
uvmfault_amapcopy(struct uvm_faultinfo *ufi)
{
diff --git a/sys/uvm/uvm_loan.c b/sys/uvm/uvm_loan.c
index fae7441c50a..989d0bb2867 100644
--- a/sys/uvm/uvm_loan.c
+++ b/sys/uvm/uvm_loan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_loan.c,v 1.29 2009/03/20 15:19:04 oga Exp $ */
+/* $OpenBSD: uvm_loan.c,v 1.30 2009/05/08 13:50:15 ariane Exp $ */
/* $NetBSD: uvm_loan.c,v 1.22 2000/06/27 17:29:25 mrg Exp $ */
/*
@@ -105,12 +105,12 @@
* local prototypes
*/
-static int uvm_loananon(struct uvm_faultinfo *, void ***,
+int uvm_loananon(struct uvm_faultinfo *, void ***,
int, struct vm_anon *);
static int uvm_loanentry(struct uvm_faultinfo *, void ***, int);
-static int uvm_loanuobj(struct uvm_faultinfo *, void ***,
+int uvm_loanuobj(struct uvm_faultinfo *, void ***,
int, vaddr_t);
-static int uvm_loanzero(struct uvm_faultinfo *, void ***, int);
+int uvm_loanzero(struct uvm_faultinfo *, void ***, int);
/*
* inlines
diff --git a/sys/uvm/uvm_meter.c b/sys/uvm/uvm_meter.c
index 7a77b187e60..60c9dbf9362 100644
--- a/sys/uvm/uvm_meter.c
+++ b/sys/uvm/uvm_meter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_meter.c,v 1.26 2009/03/23 13:25:11 art Exp $ */
+/* $OpenBSD: uvm_meter.c,v 1.27 2009/05/08 13:50:15 ariane Exp $ */
/* $NetBSD: uvm_meter.c,v 1.21 2001/07/14 06:36:03 matt Exp $ */
/*
@@ -76,7 +76,7 @@ static fixpt_t cexp[3] = {
* prototypes
*/
-static void uvm_loadav(struct loadavg *);
+void uvm_loadav(struct loadavg *);
/*
* uvm_meter: calculate load average and wake up the swapper (if needed)
@@ -94,7 +94,7 @@ uvm_meter(void)
* uvm_loadav: compute a tenex style load average of a quantity on
* 1, 5, and 15 minute intervals.
*/
-static void
+void
uvm_loadav(struct loadavg *avg)
{
CPU_INFO_ITERATOR cii;
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c
index 961dc193cb1..ea5bbf37d00 100644
--- a/sys/uvm/uvm_page.c
+++ b/sys/uvm/uvm_page.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_page.c,v 1.78 2009/05/04 18:08:06 oga Exp $ */
+/* $OpenBSD: uvm_page.c,v 1.79 2009/05/08 13:50:15 ariane Exp $ */
/* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */
/*
@@ -483,9 +483,9 @@ uvm_pageboot_alloc(vsize_t size)
*/
/* subroutine: try to allocate from memory chunks on the specified freelist */
-static boolean_t uvm_page_physget_freelist(paddr_t *, int);
+boolean_t uvm_page_physget_freelist(paddr_t *, int);
-static boolean_t
+boolean_t
uvm_page_physget_freelist(paddr_t *paddrp, int freelist)
{
int lcv, x;
diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c
index e5b88326899..e92069c3459 100644
--- a/sys/uvm/uvm_pdaemon.c
+++ b/sys/uvm/uvm_pdaemon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pdaemon.c,v 1.43 2009/05/04 18:08:06 oga Exp $ */
+/* $OpenBSD: uvm_pdaemon.c,v 1.44 2009/05/08 13:50:15 ariane Exp $ */
/* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */
/*
@@ -96,9 +96,9 @@
* local prototypes
*/
-static void uvmpd_scan(void);
-static boolean_t uvmpd_scan_inactive(struct pglist *);
-static void uvmpd_tune(void);
+void uvmpd_scan(void);
+boolean_t uvmpd_scan_inactive(struct pglist *);
+void uvmpd_tune(void);
/*
* uvm_wait: wait (sleep) for the page daemon to free some pages
@@ -155,7 +155,7 @@ uvm_wait(const char *wmsg)
* => caller must call with page queues locked
*/
-static void
+void
uvmpd_tune(void)
{
UVMHIST_FUNC("uvmpd_tune"); UVMHIST_CALLED(pdhist);
@@ -328,7 +328,7 @@ uvm_aiodone_daemon(void *arg)
* => we return TRUE if we are exiting because we met our target
*/
-static boolean_t
+boolean_t
uvmpd_scan_inactive(struct pglist *pglst)
{
boolean_t retval = FALSE; /* assume we haven't hit target */
diff --git a/sys/uvm/uvm_stat.c b/sys/uvm/uvm_stat.c
index 5e2e9601424..8593f60d4d5 100644
--- a/sys/uvm/uvm_stat.c
+++ b/sys/uvm/uvm_stat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_stat.c,v 1.20 2009/03/20 15:19:04 oga Exp $ */
+/* $OpenBSD: uvm_stat.c,v 1.21 2009/05/08 13:50:15 ariane Exp $ */
/* $NetBSD: uvm_stat.c,v 1.18 2001/03/09 01:02:13 chs Exp $ */
/*
@@ -68,7 +68,7 @@ int uvmhist_print_enabled = 1;
#ifdef UVMHIST
void uvmhist_dump(struct uvm_history *);
void uvm_hist(u_int32_t);
-static void uvmhist_dump_histories(struct uvm_history *[]);
+void uvmhist_dump_histories(struct uvm_history *[]);
#endif
void uvmcnt_dump(void);
@@ -93,7 +93,7 @@ uvmhist_dump(struct uvm_history *l)
/*
* print a merged list of uvm_history structures
*/
-static void
+void
uvmhist_dump_histories(struct uvm_history *hists[])
{
struct timeval tv;
diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c
index 38de9a4ec46..cc439744d0c 100644
--- a/sys/uvm/uvm_swap.c
+++ b/sys/uvm/uvm_swap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_swap.c,v 1.87 2009/03/23 22:07:41 oga Exp $ */
+/* $OpenBSD: uvm_swap.c,v 1.88 2009/05/08 13:50:15 ariane Exp $ */
/* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */
/*
@@ -229,24 +229,23 @@ struct rwlock swap_syscall_lock = RWLOCK_INITIALIZER("swplk");
/*
* prototypes
*/
-static void swapdrum_add(struct swapdev *, int);
-static struct swapdev *swapdrum_getsdp(int);
+void swapdrum_add(struct swapdev *, int);
+struct swapdev *swapdrum_getsdp(int);
-static struct swapdev *swaplist_find(struct vnode *, int);
-static void swaplist_insert(struct swapdev *,
- struct swappri *, int);
-static void swaplist_trim(void);
+struct swapdev *swaplist_find(struct vnode *, int);
+void swaplist_insert(struct swapdev *, struct swappri *, int);
+void swaplist_trim(void);
-static int swap_on(struct proc *, struct swapdev *);
-static int swap_off(struct proc *, struct swapdev *);
+int swap_on(struct proc *, struct swapdev *);
+int swap_off(struct proc *, struct swapdev *);
-static void sw_reg_strategy(struct swapdev *, struct buf *, int);
-static void sw_reg_iodone(struct buf *);
-static void sw_reg_start(struct swapdev *);
+void sw_reg_strategy(struct swapdev *, struct buf *, int);
+void sw_reg_iodone(struct buf *);
+void sw_reg_start(struct swapdev *);
-static int uvm_swap_io(struct vm_page **, int, int, int);
+int uvm_swap_io(struct vm_page **, int, int, int);
-static void swapmount(void);
+void swapmount(void);
#ifdef UVM_SWAP_ENCRYPT
/* for swap encrypt */
@@ -476,7 +475,7 @@ uvm_swap_finicrypt_all(void)
* FREE it if we don't need it... this it to prevent malloc blocking
* here while adding swap)
*/
-static void
+void
swaplist_insert(struct swapdev *sdp, struct swappri *newspp, int priority)
{
struct swappri *spp, *pspp;
@@ -528,7 +527,7 @@ swaplist_insert(struct swapdev *sdp, struct swappri *newspp, int priority)
* => caller must hold both swap_syscall_lock and uvm.swap_data_lock
* => we return the swapdev we found (and removed)
*/
-static struct swapdev *
+struct swapdev *
swaplist_find(struct vnode *vp, boolean_t remove)
{
struct swapdev *sdp;
@@ -561,7 +560,7 @@ swaplist_find(struct vnode *vp, boolean_t remove)
*
* => caller must hold both swap_syscall_lock and uvm.swap_data_lock
*/
-static void
+void
swaplist_trim(void)
{
struct swappri *spp, *nextspp;
@@ -582,7 +581,7 @@ swaplist_trim(void)
* => caller must hold swap_syscall_lock
* => uvm.swap_data_lock should be unlocked (we may sleep)
*/
-static void
+void
swapdrum_add(struct swapdev *sdp, int npages)
{
u_long result;
@@ -602,7 +601,7 @@ swapdrum_add(struct swapdev *sdp, int npages)
* => each swapdev takes one big contig chunk of the drum
* => caller must hold uvm.swap_data_lock
*/
-static struct swapdev *
+struct swapdev *
swapdrum_getsdp(int pgno)
{
struct swapdev *sdp;
@@ -890,7 +889,7 @@ out:
* => caller should leave uvm.swap_data_lock unlocked, we may lock it
* if needed.
*/
-static int
+int
swap_on(struct proc *p, struct swapdev *sdp)
{
static int count = 0; /* static */
@@ -1088,7 +1087,7 @@ bad:
*
* => swap data should be locked, we will unlock.
*/
-static int
+int
swap_off(struct proc *p, struct swapdev *sdp)
{
int error = 0;
@@ -1237,7 +1236,7 @@ swstrategy(struct buf *bp)
/*
* sw_reg_strategy: handle swap i/o to regular files
*/
-static void
+void
sw_reg_strategy(struct swapdev *sdp, struct buf *bp, int bn)
{
struct vnode *vp;
@@ -1414,7 +1413,7 @@ out: /* Arrive here at splbio */
*
* => reqs are sorted by disksort (above)
*/
-static void
+void
sw_reg_start(struct swapdev *sdp)
{
struct buf *bp;
@@ -1449,7 +1448,7 @@ sw_reg_start(struct swapdev *sdp)
*
* => note that we can recover the vndbuf struct by casting the buf ptr
*/
-static void
+void
sw_reg_iodone(struct buf *bp)
{
struct vndbuf *vbp = (struct vndbuf *) bp;
@@ -1743,7 +1742,7 @@ uvm_swap_get(struct vm_page *page, int swslot, int flags)
* uvm_swap_io: do an i/o operation to swap
*/
-static int
+int
uvm_swap_io(struct vm_page **pps, int startslot, int npages, int flags)
{
daddr64_t startblk;
@@ -2018,7 +2017,7 @@ uvm_swap_io(struct vm_page **pps, int startslot, int npages, int flags)
return (result);
}
-static void
+void
swapmount(void)
{
struct swapdev *sdp;