diff options
author | Alfred Perlstein <alfred@FreeBSD.org> | 2003-01-21 08:56:16 +0000 |
---|---|---|
committer | Alfred Perlstein <alfred@FreeBSD.org> | 2003-01-21 08:56:16 +0000 |
commit | 44956c9863dc03344b03bdf6a83acf4e743f8e50 (patch) | |
tree | f16a2fb9fa7a7fbc4c19e981d278d5f6eb53234d /sys/amd64 | |
parent | 1326e03f7f8018164ece91fc0a3f15f9c65ff64a (diff) | |
download | src-44956c9863dc03344b03bdf6a83acf4e743f8e50.tar.gz src-44956c9863dc03344b03bdf6a83acf4e743f8e50.zip |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Notes
Notes:
svn path=/head/; revision=109623
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/amd64_mem.c | 2 | ||||
-rw-r--r-- | sys/amd64/amd64/bios.c | 2 | ||||
-rw-r--r-- | sys/amd64/amd64/busdma_machdep.c | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/mem.c | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 8 | ||||
-rw-r--r-- | sys/amd64/amd64/mptable.c | 8 | ||||
-rw-r--r-- | sys/amd64/amd64/sys_machdep.c | 2 | ||||
-rw-r--r-- | sys/amd64/ia32/ia32_misc.c | 10 | ||||
-rw-r--r-- | sys/amd64/include/mptable.h | 8 |
9 files changed, 24 insertions, 24 deletions
diff --git a/sys/amd64/amd64/amd64_mem.c b/sys/amd64/amd64/amd64_mem.c index 589fc64721cb..f3fc4e89db25 100644 --- a/sys/amd64/amd64/amd64_mem.c +++ b/sys/amd64/amd64/amd64_mem.c @@ -557,7 +557,7 @@ i686_mrinit(struct mem_range_softc *sc) sc->mr_desc = (struct mem_range_desc *)malloc(nmdesc * sizeof(struct mem_range_desc), - M_MEMDESC, M_WAITOK | M_ZERO); + M_MEMDESC, M_ZERO); sc->mr_ndesc = nmdesc; mrd = sc->mr_desc; diff --git a/sys/amd64/amd64/bios.c b/sys/amd64/amd64/bios.c index 747a3a14394f..ae14099f93be 100644 --- a/sys/amd64/amd64/bios.c +++ b/sys/amd64/amd64/bios.c @@ -388,7 +388,7 @@ bios16(struct bios_args *args, char *fmt, ...) /* * no page table, so create one and install it. */ - pte = (pt_entry_t *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK); + pte = (pt_entry_t *)malloc(PAGE_SIZE, M_TEMP, 0); ptd = (pd_entry_t *)((u_int)ptd + KERNBASE); *ptd = vtophys(pte) | PG_RW | PG_V; } else { diff --git a/sys/amd64/amd64/busdma_machdep.c b/sys/amd64/amd64/busdma_machdep.c index 315872643de0..eb6cc9dc29d4 100644 --- a/sys/amd64/amd64/busdma_machdep.c +++ b/sys/amd64/amd64/busdma_machdep.c @@ -339,7 +339,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, if ((dmat->maxsize <= PAGE_SIZE) && dmat->lowaddr >= ptoa(Maxmem)) { *vaddr = malloc(dmat->maxsize, M_DEVBUF, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK); + (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0); } else { /* * XXX Use Contigmalloc until it is merged into this facility @@ -347,7 +347,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, * multi-seg allocations yet though. */ *vaddr = contigmalloc(dmat->maxsize, M_DEVBUF, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK, + (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0, 0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul, dmat->boundary); } diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index 41fa63640b60..4905d3c8158c 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -265,7 +265,7 @@ mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) if (nd > 0) { md = (struct mem_range_desc *) malloc(nd * sizeof(struct mem_range_desc), - M_MEMDESC, M_WAITOK); + M_MEMDESC, 0); error = mem_range_attr_get(md, &nd); if (!error) error = copyout(md, mo->mo_desc, @@ -279,7 +279,7 @@ mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) case MEMRANGE_SET: md = (struct mem_range_desc *)malloc(sizeof(struct mem_range_desc), - M_MEMDESC, M_WAITOK); + M_MEMDESC, 0); error = copyin(mo->mo_desc, md, sizeof(struct mem_range_desc)); /* clamp description string */ md->mr_owner[sizeof(md->mr_owner) - 1] = 0; diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 00da6fa57dec..9b24c6f56962 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -919,13 +919,13 @@ mptable_pass2(void) pgeflag = 0; /* XXX - Not used under SMP yet. */ MALLOC(io_apic_versions, u_int32_t *, sizeof(u_int32_t) * mp_napics, - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); MALLOC(ioapic, volatile ioapic_t **, sizeof(ioapic_t *) * mp_napics, - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); MALLOC(io_apic_ints, io_int *, sizeof(io_int) * (nintrs + 1), - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); MALLOC(bus_data, bus_datum *, sizeof(bus_datum) * mp_nbusses, - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); bzero(ioapic, sizeof(ioapic_t *) * mp_napics); diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c index 00da6fa57dec..9b24c6f56962 100644 --- a/sys/amd64/amd64/mptable.c +++ b/sys/amd64/amd64/mptable.c @@ -919,13 +919,13 @@ mptable_pass2(void) pgeflag = 0; /* XXX - Not used under SMP yet. */ MALLOC(io_apic_versions, u_int32_t *, sizeof(u_int32_t) * mp_napics, - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); MALLOC(ioapic, volatile ioapic_t **, sizeof(ioapic_t *) * mp_napics, - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); MALLOC(io_apic_ints, io_int *, sizeof(io_int) * (nintrs + 1), - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); MALLOC(bus_data, bus_datum *, sizeof(bus_datum) * mp_nbusses, - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); bzero(ioapic, sizeof(ioapic_t *) * mp_napics); diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index e1347da53a54..4d98979c43a9 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -298,7 +298,7 @@ user_ldt_alloc(struct mdproc *mdp, int len) mtx_unlock_spin(&sched_lock); mtx_assert(&sched_lock, MA_NOTOWNED); MALLOC(new_ldt, struct proc_ldt *, sizeof(struct proc_ldt), - M_SUBPROC, M_WAITOK); + M_SUBPROC, 0); new_ldt->ldt_len = len = NEW_MAX_LD(len); new_ldt->ldt_base = (caddr_t)kmem_alloc(kernel_map, diff --git a/sys/amd64/ia32/ia32_misc.c b/sys/amd64/ia32/ia32_misc.c index 10eb642a1881..8b707b43ce8a 100644 --- a/sys/amd64/ia32/ia32_misc.c +++ b/sys/amd64/ia32/ia32_misc.c @@ -106,7 +106,7 @@ ia32_emul_find(td, sgp, prefix, path, pbuf, cflag) struct vattr vat; struct vattr vatroot; - buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK); + buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0); *pbuf = path; for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++) @@ -769,8 +769,8 @@ ia32_readv(struct thread *td, struct ia32_readv_args *uap) osize = uap->iovcnt * sizeof (struct iovec32); nsize = uap->iovcnt * sizeof (struct iovec); - oio = malloc(osize, M_TEMP, M_WAITOK); - nio = malloc(nsize, M_TEMP, M_WAITOK); + oio = malloc(osize, M_TEMP, 0); + nio = malloc(nsize, M_TEMP, 0); error = 0; if ((error = copyin(uap->iovp, oio, osize))) @@ -815,8 +815,8 @@ ia32_writev(struct thread *td, struct ia32_writev_args *uap) osize = uap->iovcnt * sizeof (struct iovec32); nsize = uap->iovcnt * sizeof (struct iovec); - oio = malloc(osize, M_TEMP, M_WAITOK); - nio = malloc(nsize, M_TEMP, M_WAITOK); + oio = malloc(osize, M_TEMP, 0); + nio = malloc(nsize, M_TEMP, 0); error = 0; if ((error = copyin(uap->iovp, oio, osize))) diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index 00da6fa57dec..9b24c6f56962 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -919,13 +919,13 @@ mptable_pass2(void) pgeflag = 0; /* XXX - Not used under SMP yet. */ MALLOC(io_apic_versions, u_int32_t *, sizeof(u_int32_t) * mp_napics, - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); MALLOC(ioapic, volatile ioapic_t **, sizeof(ioapic_t *) * mp_napics, - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); MALLOC(io_apic_ints, io_int *, sizeof(io_int) * (nintrs + 1), - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); MALLOC(bus_data, bus_datum *, sizeof(bus_datum) * mp_nbusses, - M_DEVBUF, M_WAITOK); + M_DEVBUF, 0); bzero(ioapic, sizeof(ioapic_t *) * mp_napics); |