From 3b03ca3bbe853d1ef0dd01e34915bf4b962d3e7c Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 15 Dec 2011 05:07:16 +0000 Subject: [PATCH] Eliminate vestiges of page coloring. --- sys/arm/arm/vm_machdep.c | 4 +--- sys/dev/ti/if_ti.c | 3 +-- sys/i386/xen/mp_machdep.c | 3 +-- sys/ia64/ia64/uma_machdep.c | 3 +-- sys/powerpc/aim/mmu_oea64.c | 3 +-- sys/powerpc/aim/uma_machdep.c | 3 +-- sys/sparc64/sparc64/vm_machdep.c | 3 +-- 7 files changed, 7 insertions(+), 15 deletions(-) diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index 1f31e3d056f..54e561e872e 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -617,7 +617,6 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) void *ret; struct arm_small_page *sp; TAILQ_HEAD(,arm_small_page) *head; - static vm_pindex_t color; vm_page_t m; *flags = UMA_SLAB_PRIV; @@ -650,8 +649,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) if (wait & M_ZERO) pflags |= VM_ALLOC_ZERO; for (;;) { - m = vm_page_alloc(NULL, color++, - pflags | VM_ALLOC_NOOBJ); + m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ); if (m == NULL) { if (wait & M_NOWAIT) return (NULL); diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index d57be534348..ead690103e4 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -1562,7 +1562,6 @@ ti_newbuf_jumbo(struct ti_softc *sc, int idx, struct mbuf *m_old) struct mbuf *m[3] = {NULL, NULL, NULL}; struct ti_rx_desc_ext *r; vm_page_t frame; - static int color; /* 1 extra buf to make nobufs easy*/ struct sf_buf *sf[3] = {NULL, NULL, NULL}; int i; @@ -1605,7 +1604,7 @@ ti_newbuf_jumbo(struct ti_softc *sc, int idx, struct mbuf *m_old) "failed -- packet dropped!\n"); goto nobufs; } - frame = vm_page_alloc(NULL, color++, + frame = vm_page_alloc(NULL, 0, VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (frame == NULL) { diff --git a/sys/i386/xen/mp_machdep.c b/sys/i386/xen/mp_machdep.c index a0ef1e8c4da..b36eed2f6e7 100644 --- a/sys/i386/xen/mp_machdep.c +++ b/sys/i386/xen/mp_machdep.c @@ -815,7 +815,6 @@ cpu_initialize_context(unsigned int cpu) vm_offset_t boot_stack; vm_offset_t newPTD; vm_paddr_t ma[NPGPTD]; - static int color; int i; /* @@ -825,7 +824,7 @@ cpu_initialize_context(unsigned int cpu) * */ for (i = 0; i < NPGPTD + 2; i++) { - m[i] = vm_page_alloc(NULL, color++, + m[i] = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO); diff --git a/sys/ia64/ia64/uma_machdep.c b/sys/ia64/ia64/uma_machdep.c index c8084ba0cb8..37353ffa58d 100644 --- a/sys/ia64/ia64/uma_machdep.c +++ b/sys/ia64/ia64/uma_machdep.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); void * uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) { - static vm_pindex_t color; void *va; vm_page_t m; int pflags; @@ -55,7 +54,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) pflags |= VM_ALLOC_ZERO; for (;;) { - m = vm_page_alloc(NULL, color++, pflags | VM_ALLOC_NOOBJ); + m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ); if (m == NULL) { if (wait & M_NOWAIT) return (NULL); diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index 441378010c0..d58e8dee164 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -1402,7 +1402,6 @@ moea64_uma_page_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) * kmem allocation routines, calling kmem for a new address here * can lead to multiply locking non-recursive mutexes. */ - static vm_pindex_t color; vm_offset_t va; vm_page_t m; @@ -1422,7 +1421,7 @@ moea64_uma_page_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) pflags |= VM_ALLOC_ZERO; for (;;) { - m = vm_page_alloc(NULL, color++, pflags | VM_ALLOC_NOOBJ); + m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ); if (m == NULL) { if (wait & M_NOWAIT) return (NULL); diff --git a/sys/powerpc/aim/uma_machdep.c b/sys/powerpc/aim/uma_machdep.c index 6b28d67186f..39deb4305c8 100644 --- a/sys/powerpc/aim/uma_machdep.c +++ b/sys/powerpc/aim/uma_machdep.c @@ -51,7 +51,6 @@ SYSCTL_INT(_hw, OID_AUTO, uma_mdpages, CTLFLAG_RD, &hw_uma_mdpages, 0, void * uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) { - static vm_pindex_t color; void *va; vm_page_t m; int pflags; @@ -65,7 +64,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) pflags |= VM_ALLOC_ZERO; for (;;) { - m = vm_page_alloc(NULL, color++, pflags | VM_ALLOC_NOOBJ); + m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ); if (m == NULL) { if (wait & M_NOWAIT) return (NULL); diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c index 36f1cc546cd..cdb94c7fe96 100644 --- a/sys/sparc64/sparc64/vm_machdep.c +++ b/sys/sparc64/sparc64/vm_machdep.c @@ -493,7 +493,6 @@ swi_vm(void *v) void * uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) { - static vm_pindex_t color; vm_paddr_t pa; vm_page_t m; int pflags; @@ -512,7 +511,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) pflags |= VM_ALLOC_ZERO; for (;;) { - m = vm_page_alloc(NULL, color++, pflags | VM_ALLOC_NOOBJ); + m = vm_page_alloc(NULL, 0, pflags | VM_ALLOC_NOOBJ); if (m == NULL) { if (wait & M_NOWAIT) return (NULL);