summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_pmemrange.h
diff options
context:
space:
mode:
authorAriane van der Steldt <ariane@cvs.openbsd.org>2009-06-16 16:42:42 +0000
committerAriane van der Steldt <ariane@cvs.openbsd.org>2009-06-16 16:42:42 +0000
commitdf471f546425532f5eb23a525aa177e7cebfc201 (patch)
tree972d5345b01631db0b5c8763b0ddbc1ff716f769 /sys/uvm/uvm_pmemrange.h
parenta3f40e2b55539a27c6990efc4ebff8036b9a4938 (diff)
Backout pmemrange (which to most people is more well known as physmem
allocator). "i can't see any obvious problems" oga
Diffstat (limited to 'sys/uvm/uvm_pmemrange.h')
-rw-r--r--sys/uvm/uvm_pmemrange.h83
1 files changed, 0 insertions, 83 deletions
diff --git a/sys/uvm/uvm_pmemrange.h b/sys/uvm/uvm_pmemrange.h
deleted file mode 100644
index 493961f1f9c..00000000000
--- a/sys/uvm/uvm_pmemrange.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* $OpenBSD: uvm_pmemrange.h,v 1.3 2009/06/14 02:20:23 deraadt Exp $ */
-
-/*
- * Copyright (c) 2009 Ariane van der Steldt <ariane@stack.nl>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * uvm_pmemrange.h: describe and manage free physical memory.
- */
-
-#ifndef _UVM_UVM_PMEMRANGE_H_
-#define _UVM_UVM_PMEMRANGE_H_
-
-#include <uvm/uvm_extern.h>
-#include <uvm/uvm_page.h>
-
-RB_HEAD(uvm_pmr_addr, vm_page);
-RB_HEAD(uvm_pmr_size, vm_page);
-
-/*
- * Page types available:
- * - DIRTY: this page may contain random data.
- * - ZERO: this page has been zeroed.
- */
-#define UVM_PMR_MEMTYPE_DIRTY 1
-#define UVM_PMR_MEMTYPE_ZERO 1
-#define UVM_PMR_MEMTYPE_MAX 2
-
-/*
- * An address range of memory.
- */
-struct uvm_pmemrange {
- struct uvm_pmr_addr addr; /* Free page chunks, sorted by addr. */
- struct uvm_pmr_size size[UVM_PMR_MEMTYPE_MAX];
- /* Free page chunks, sorted by size. */
- TAILQ_HEAD(, vm_page) single[UVM_PMR_MEMTYPE_MAX];
- /* single page regions (uses pageq) */
-
- paddr_t low; /* Start of address range (pgno). */
- paddr_t high; /* End +1 (pgno). */
- int use; /* Use counter. */
- int nsegs; /* Current range count. */
-
- TAILQ_ENTRY(uvm_pmemrange) pmr_use;
- /* pmr, sorted by use */
- RB_ENTRY(uvm_pmemrange) pmr_addr;
- /* pmr, sorted by address */
-};
-
-RB_HEAD(uvm_pmemrange_addr, uvm_pmemrange);
-TAILQ_HEAD(uvm_pmemrange_use, uvm_pmemrange);
-
-/*
- * pmr control structure. Contained in uvm.pmr_control.
- */
-struct uvm_pmr_control {
- struct uvm_pmemrange_addr addr;
- struct uvm_pmemrange_use use;
-};
-
-void uvm_pmr_freepages(struct vm_page *, psize_t);
-void uvm_pmr_freepageq(struct pglist *pgl);
-int uvm_pmr_getpages(psize_t, paddr_t, paddr_t, paddr_t, paddr_t,
- int, int, struct pglist *);
-void uvm_pmr_init(void);
-
-#ifdef DDB
-int uvm_pmr_isfree(struct vm_page *pg);
-#endif
-
-#endif /* _UVM_UVM_PMEMRANGE_H_ */