summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2013-07-26 19:06:14 +0000
committerjeff <jeff@FreeBSD.org>2013-07-26 19:06:14 +0000
commitc8d343ae8b6bda9a70a4901342a1dfd1f22e5b75 (patch)
treed8f12a25a404a20fd1aef3df74095696b97b85a4 /sys/amd64
parent29d3efe0a8f20e5159be92b6c7f7d4df1ae20fb6 (diff)
downloadFreeBSD-src-c8d343ae8b6bda9a70a4901342a1dfd1f22e5b75.zip
FreeBSD-src-c8d343ae8b6bda9a70a4901342a1dfd1f22e5b75.tar.gz
- Use kmem_malloc rather than kmem_alloc() for GDT/LDT/tss allocations etc.
This eliminates some unusual uses of that API in favor of more typical uses of kmem_malloc(). Discussed with: kib/alc Tested by: pho Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/sys_machdep.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index 2f136ab..ac691d0 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -356,8 +356,8 @@ amd64_set_ioperm(td, uap)
*/
pcb = td->td_pcb;
if (pcb->pcb_tssp == NULL) {
- tssp = (struct amd64tss *)kmem_alloc(kernel_map,
- ctob(IOPAGES+1));
+ tssp = (struct amd64tss *)kmem_malloc(kernel_map,
+ ctob(IOPAGES+1), M_WAITOK);
if (tssp == NULL)
return (ENOMEM);
iomap = (char *)&tssp[1];
@@ -463,8 +463,9 @@ user_ldt_alloc(struct proc *p, int force)
return (mdp->md_ldt);
mtx_unlock(&dt_lock);
new_ldt = malloc(sizeof(struct proc_ldt), M_SUBPROC, M_WAITOK);
- new_ldt->ldt_base = (caddr_t)kmem_alloc(kernel_map,
- max_ldt_segment * sizeof(struct user_segment_descriptor));
+ new_ldt->ldt_base = (caddr_t)kmem_malloc(kernel_map,
+ max_ldt_segment * sizeof(struct user_segment_descriptor),
+ M_WAITOK);
if (new_ldt->ldt_base == NULL) {
FREE(new_ldt, M_SUBPROC);
mtx_lock(&dt_lock);
OpenPOWER on IntegriCloud