summaryrefslogtreecommitdiff
path: root/sys/arch/sgi/pci/macepcibridge.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sgi/pci/macepcibridge.c')
-rw-r--r--sys/arch/sgi/pci/macepcibridge.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/sys/arch/sgi/pci/macepcibridge.c b/sys/arch/sgi/pci/macepcibridge.c
index 3a946cca843..90b6646b683 100644
--- a/sys/arch/sgi/pci/macepcibridge.c
+++ b/sys/arch/sgi/pci/macepcibridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macepcibridge.c,v 1.8 2006/01/04 20:20:18 miod Exp $ */
+/* $OpenBSD: macepcibridge.c,v 1.9 2006/01/04 20:23:09 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se)
@@ -504,6 +504,8 @@ mace_pcib_write_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64
*(volatile u_int64_t *)(h + o) = v;
}
+extern int extent_malloc_flags;
+
int
mace_pcib_space_map(bus_space_tag_t t, bus_addr_t offs, bus_size_t size,
int cacheable, bus_space_handle_t *bshp)
@@ -513,13 +515,13 @@ mace_pcib_space_map(bus_space_tag_t t, bus_addr_t offs, bus_size_t size,
bpa = t->bus_base + (offs & 0x01ffffff);
if ((error = extent_alloc_region(t->bus_extent, bpa, size,
- EX_NOWAIT | EX_MALLOCOK))) {
+ EX_NOWAIT | extent_malloc_flags))) {
return error;
}
if ((error = bus_mem_add_mapping(bpa, size, cacheable, bshp))) {
- if (extent_free(t->bus_extent, bpa, size, EX_NOWAIT |
- ((phys_map != NULL) ? EX_MALLOCOK : 0))) {
+ if (extent_free(t->bus_extent, bpa, size,
+ EX_NOWAIT | extent_malloc_flags)) {
printf("bus_space_map: pa %p, size %p\n", bpa, size);
printf("bus_space_map: can't free region\n");
}
@@ -545,14 +547,8 @@ mace_pcib_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size
return;
}
- if (phys_map != NULL &&
- ((sva >= VM_MIN_KERNEL_ADDRESS) && (sva < VM_MAX_KERNEL_ADDRESS))) {
- /* do not free memory which was stolen from the vm system */
- uvm_km_free(kernel_map, sva, len);
- }
-
- if (extent_free(t->bus_extent, paddr, size, EX_NOWAIT |
- ((phys_map != NULL) ? EX_MALLOCOK : 0))) {
+ if (extent_free(t->bus_extent, paddr, size,
+ EX_NOWAIT | extent_malloc_flags)) {
printf("bus_space_map: pa %p, size %p\n", paddr, size);
printf("bus_space_map: can't free region\n");
}