Home | History | Annotate | Download | only in uvm

Lines Matching refs:uvm_physseg

1 /* $NetBSD: uvm_physseg.c,v 1.20 2024/01/13 09:44:42 tnn Exp $ */
84 #include <uvm/uvm_physseg.h>
87 * uvm_physseg: describes one segment of physical memory
89 struct uvm_physseg {
111 * exported in the header file uvm_physseg.h
123 #define HANDLE_TO_PHYSSEG_NODE(h) ((struct uvm_physseg *)(h))
159 static struct uvm_physseg uvm_physseg[VM_PHYSSEG_MAX];
171 if (sz % sizeof(struct uvm_physseg))
173 " of struct uvm_physseg at boot\n", __func__);
175 size_t n = sz / sizeof(struct uvm_physseg);
181 return &uvm_physseg[nseg - n];
201 * applies to free(). We only allow uvm_physseg related free()s
206 if (sz % sizeof(struct uvm_physseg))
207 panic("%s: tried to free size other than struct uvm_physseg"
217 if ((struct uvm_physseg *)p >= uvm_physseg &&
218 (struct uvm_physseg *)p < (uvm_physseg + VM_PHYSSEG_MAX)) {
219 if (sz % sizeof(struct uvm_physseg))
220 panic("%s: tried to free() other than struct uvm_physseg"
223 if ((sz / sizeof(struct uvm_physseg)) >= VM_PHYSSEG_MAX)
237 struct uvm_physseg *ps, *current_ps = NULL;
255 ps = uvm_physseg_alloc(sizeof (struct uvm_physseg));
313 uvm_physseg_free(ps, sizeof(struct uvm_physseg));
372 const struct uvm_physseg *enode1 = nnode1;
373 const struct uvm_physseg *enode2 = nnode2;
388 const struct uvm_physseg *enode = nnode;
404 .rbto_node_offset = offsetof(struct uvm_physseg, rb_node),
458 struct uvm_physseg *ps =
471 struct uvm_physseg *seg;
515 struct uvm_physseg *seg;
539 struct uvm_physseg * ps = NULL;
564 #define PHYSSEG_NODE_TO_HANDLE(u) ((int)((vsize_t) (u - vm_physmem) / sizeof(struct uvm_physseg)))
567 static struct uvm_physseg vm_physmem[VM_PHYSSEG_MAX] __read_mostly;
616 struct uvm_physseg *ps;
663 struct uvm_physseg *seg;
716 struct uvm_physseg *seg;
749 struct uvm_physseg *ps;
848 static inline int vm_physseg_find_contig(struct uvm_physseg *, int, paddr_t, psize_t *);
850 static inline int vm_physseg_find_bsearch(struct uvm_physseg *, int, paddr_t, psize_t *);
852 static inline int vm_physseg_find_linear(struct uvm_physseg *, int, paddr_t, psize_t *);
873 vm_physseg_find_contig(struct uvm_physseg *segs, int nsegs, paddr_t pframe, psize_t *offp)
888 vm_physseg_find_bsearch(struct uvm_physseg *segs, int nsegs, paddr_t pframe, psize_t *offp)
932 vm_physseg_find_linear(struct uvm_physseg *segs, int nsegs, paddr_t pframe, psize_t *offp)
962 struct uvm_physseg *ps = &vm_physmem[0];
963 struct uvm_physseg *end = &vm_physmem[vm_nphysseg];
987 struct uvm_physseg *ps;
1048 struct uvm_physseg *ps = HANDLE_TO_PHYSSEG_NODE(upm);
1064 struct uvm_physseg *ps = HANDLE_TO_PHYSSEG_NODE(upm);
1134 struct uvm_physseg *seg;
1171 struct uvm_physseg *seg = HANDLE_TO_PHYSSEG_NODE(upm);
1193 struct uvm_physseg *seg;
1244 struct uvm_physseg *ps;
1280 struct uvm_physseg *seg;
1310 struct uvm_physseg *current_ps;
1334 memset(seg, 0, sizeof(struct uvm_physseg));
1335 uvm_physseg_free(seg, sizeof(struct uvm_physseg));
1354 struct uvm_physseg *ps, *current_ps;
1355 ps = uvm_physseg_alloc(sizeof (struct uvm_physseg));