Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Make uvm_physseg_set_avail_start(9) available uncond...
details: https://anonhg.NetBSD.org/src/rev/779f5e680979
branches: trunk
changeset: 349829:779f5e680979
user: cherry <cherry%NetBSD.org@localhost>
date: Sun Dec 25 06:30:58 2016 +0000
description:
Make uvm_physseg_set_avail_start(9) available unconditional to UVM_HOTPLUG
diffstat:
sys/uvm/uvm_physseg.c | 54 ++++++++++++++++++++++----------------------------
1 files changed, 24 insertions(+), 30 deletions(-)
diffs (79 lines):
diff -r 79a159daefda -r 779f5e680979 sys/uvm/uvm_physseg.c
--- a/sys/uvm/uvm_physseg.c Sun Dec 25 04:35:30 2016 +0000
+++ b/sys/uvm/uvm_physseg.c Sun Dec 25 06:30:58 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_physseg.c,v 1.4 2016/12/25 03:39:26 christos Exp $ */
+/* $NetBSD: uvm_physseg.c,v 1.5 2016/12/25 06:30:58 cherry Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -543,34 +543,6 @@
return ps;
}
-#if defined(PMAP_STEAL_MEMORY)
-void
-uvm_physseg_set_avail_start(uvm_physseg_t upm, paddr_t avail_start)
-{
- struct uvm_physseg *ps = HANDLE_TO_PHYSSEG_NODE(upm);
-
-#if defined(DIAGNOSTIC)
- paddr_t avail_end;
- avail_end = uvm_physseg_get_avail_end(upm);
-#endif
- KASSERT(avail_start < avail_end && avail_start >= ps->start);
- ps->avail_start = avail_start;
-}
-void uvm_physseg_set_avail_end(uvm_physseg_t upm, paddr_t avail_end)
-{
- struct uvm_physseg *ps = HANDLE_TO_PHYSSEG_NODE(upm);
-
-#if defined(DIAGNOSTIC)
- paddr_t avail_start;
- avail_start = uvm_physseg_get_avail_start(upm);
-#endif
-
- KASSERT(avail_end > avail_start && avail_end <= ps->end);
-
- ps->avail_end = avail_end;
-}
-
-#endif /* PMAP_STEAL_MEMORY */
#else /* UVM_HOTPLUG */
/*
@@ -1036,11 +1008,33 @@
void
uvm_physseg_set_avail_start(uvm_physseg_t upm, paddr_t avail_start)
{
+ struct uvm_physseg *ps = HANDLE_TO_PHYSSEG_NODE(upm);
+
+#if defined(DIAGNOSTIC)
+ paddr_t avail_end;
+ avail_end = uvm_physseg_get_avail_end(upm);
KASSERT(uvm_physseg_valid_p(upm));
- HANDLE_TO_PHYSSEG_NODE(upm)->avail_start = avail_start;
+ KASSERT(avail_start < avail_end && avail_start >= ps->start);
+#endif
+
+ ps->avail_start = avail_start;
}
+void uvm_physseg_set_avail_end(uvm_physseg_t upm, paddr_t avail_end)
+{
+ struct uvm_physseg *ps = HANDLE_TO_PHYSSEG_NODE(upm);
+
+#if defined(DIAGNOSTIC)
+ paddr_t avail_start;
+ avail_start = uvm_physseg_get_avail_start(upm);
+ KASSERT(uvm_physseg_valid_p(upm));
+ KASSERT(avail_end > avail_start && avail_end <= ps->end);
#endif
+ ps->avail_end = avail_end;
+}
+
+#endif /* PMAP_STEAL_MEMORY */
+
paddr_t
uvm_physseg_get_avail_end(uvm_physseg_t upm)
{
Home |
Main Index |
Thread Index |
Old Index