summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/alpha/alpha/pmap.c2
-rw-r--r--sys/amd64/amd64/pmap.c2
-rw-r--r--sys/ia64/ia64/pmap.c2
-rw-r--r--sys/sparc64/sparc64/vm_machdep.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c
index 55d46fb..c14e42d 100644
--- a/sys/alpha/alpha/pmap.c
+++ b/sys/alpha/alpha/pmap.c
@@ -594,7 +594,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
}
va = (void *)ALPHA_PHYS_TO_K0SEG(m->phys_addr);
- if ((m->flags & PG_ZERO) == 0)
+ if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0)
bzero(va, PAGE_SIZE);
return (va);
}
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 8a3226b..93bd3ac 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -557,7 +557,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
}
va = (void *)PHYS_TO_DMAP(m->phys_addr);
- if ((m->flags & PG_ZERO) == 0)
+ if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0)
pagezero(va);
return (va);
}
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c
index 77effaa..43405bd 100644
--- a/sys/ia64/ia64/pmap.c
+++ b/sys/ia64/ia64/pmap.c
@@ -539,7 +539,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
}
va = (void *)IA64_PHYS_TO_RR7(VM_PAGE_TO_PHYS(m));
- if ((m->flags & PG_ZERO) == 0)
+ if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0)
bzero(va, PAGE_SIZE);
return (va);
}
diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c
index 7f54e12..5b4b9ab 100644
--- a/sys/sparc64/sparc64/vm_machdep.c
+++ b/sys/sparc64/sparc64/vm_machdep.c
@@ -370,7 +370,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
dcache_page_inval(pa);
}
va = (void *)TLB_PHYS_TO_DIRECT(pa);
- if ((m->flags & PG_ZERO) == 0)
+ if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0)
bzero(va, PAGE_SIZE);
return (va);
}
OpenPOWER on IntegriCloud