xref: /illumos-gate/usr/src/man/man9f/vmem_add.9f (revision 5a342f146a946ddf6f5f5afd4a5dd5baf11d7dd4)
1*5a342f14SRichard Lowe.\"
2*5a342f14SRichard Lowe.\" This file and its contents are supplied under the terms of the
3*5a342f14SRichard Lowe.\" Common Development and Distribution License ("CDDL"), version 1.0.
4*5a342f14SRichard Lowe.\" You may only use this file in accordance with the terms of version
5*5a342f14SRichard Lowe.\" 1.0 of the CDDL.
6*5a342f14SRichard Lowe.\"
7*5a342f14SRichard Lowe.\" A full copy of the text of the CDDL should have accompanied this
8*5a342f14SRichard Lowe.\" source.  A copy of the CDDL is also available via the Internet at
9*5a342f14SRichard Lowe.\" http://www.illumos.org/license/CDDL.
10*5a342f14SRichard Lowe.\"
11*5a342f14SRichard Lowe.\"
12*5a342f14SRichard Lowe.\" Copyright 2017, Richard Lowe.
13*5a342f14SRichard Lowe.\"
14*5a342f14SRichard Lowe.Dd Jan 18, 2017
15*5a342f14SRichard Lowe.Dt VMEM_ADD 9F
16*5a342f14SRichard Lowe.Os
17*5a342f14SRichard Lowe.Sh NAME
18*5a342f14SRichard Lowe.Nm vmem_add
19*5a342f14SRichard Lowe.Nd add spans to a vmem arena
20*5a342f14SRichard Lowe.Sh SYNOPSIS
21*5a342f14SRichard Lowe.In sys/vmem.h
22*5a342f14SRichard Lowe.Ft void *
23*5a342f14SRichard Lowe.Fo vmem_add
24*5a342f14SRichard Lowe.Fa "vmem_t *vmp"
25*5a342f14SRichard Lowe.Fa "void *vaddr"
26*5a342f14SRichard Lowe.Fa "size_t size"
27*5a342f14SRichard Lowe.Fa "int vmflag"
28*5a342f14SRichard Lowe.Fc
29*5a342f14SRichard Lowe.Sh INTERFACE LEVEL
30*5a342f14SRichard Loweillumos DDI specific
31*5a342f14SRichard Lowe.Sh PARAMETERS
32*5a342f14SRichard Lowe.Bl -tag -width Ds
33*5a342f14SRichard Lowe.It Fa vmp
34*5a342f14SRichard LoweThe vmem arena to which the span should be added.
35*5a342f14SRichard Lowe.It Fa vaddr
36*5a342f14SRichard LoweThe base address of the span to add.
37*5a342f14SRichard Lowe.It Fa size
38*5a342f14SRichard LoweThe size of the span to add.
39*5a342f14SRichard Lowe.It Fa vmflag
40*5a342f14SRichard LoweFlags affecting the allocation of the span to add.
41*5a342f14SRichard Lowe.El
42*5a342f14SRichard Lowe.Sh DESCRIPTION
43*5a342f14SRichard LoweThe
44*5a342f14SRichard Lowe.Fn vmem_add
45*5a342f14SRichard Lowefunction adds
46*5a342f14SRichard Lowe.Fa size
47*5a342f14SRichard Lowebytes starting at
48*5a342f14SRichard Lowe.Fa vaddr
49*5a342f14SRichard Loweto a vmem arena from which future calls to
50*5a342f14SRichard Lowe.Fn vmem_alloc
51*5a342f14SRichard Lowemay allocate.
52*5a342f14SRichard Lowe.Pp
53*5a342f14SRichard Lowe.Dv VM_SLEEP
54*5a342f14SRichard Loweor
55*5a342f14SRichard Lowe.Dv VM_NOSLEEP
56*5a342f14SRichard Lowemust be specified in
57*5a342f14SRichard Lowe.Fa vmflag ,
58*5a342f14SRichard Loweand indicate whether the addition may block.
59*5a342f14SRichard Lowe.Sh CONTEXT
60*5a342f14SRichard LoweThis function can be called from either user or kernel context.
61*5a342f14SRichard LoweIf the
62*5a342f14SRichard Lowe.Dv VM_NOSLEEP
63*5a342f14SRichard Loweflag is specified, it may also be called from interrupt context.
64*5a342f14SRichard Lowe.Sh RETURN VALUES
65*5a342f14SRichard LoweUpon success
66*5a342f14SRichard Lowe.Fn vmem_add
67*5a342f14SRichard Lowereturns
68*5a342f14SRichard Lowe.Fa vaddr .
69*5a342f14SRichard LoweOn failure,
70*5a342f14SRichard Lowe.Dv NULL
71*5a342f14SRichard Loweis returned.
72*5a342f14SRichard Lowe.Sh SEE ALSO
73*5a342f14SRichard Lowe.Xr vmem 9 ,
74*5a342f14SRichard Lowe.Xr vmem_alloc 9F ,
75*5a342f14SRichard Lowe.Xr vmem_create 9F
76