From owner-p4-projects@FreeBSD.ORG Sun Jun 6 04:27:28 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A58D316A4D1; Sun, 6 Jun 2004 04:27:27 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7008516A4CF for ; Sun, 6 Jun 2004 04:27:27 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A17443D31 for ; Sun, 6 Jun 2004 04:27:27 -0700 (PDT) (envelope-from scottl@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i56BRRCM025724 for ; Sun, 6 Jun 2004 11:27:27 GMT (envelope-from scottl@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i56BRRaZ025721 for perforce@freebsd.org; Sun, 6 Jun 2004 11:27:27 GMT (envelope-from scottl@freebsd.org) Date: Sun, 6 Jun 2004 11:27:27 GMT Message-Id: <200406061127.i56BRRaZ025721@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to scottl@freebsd.org using -f From: Scott Long To: Perforce Change Reviews Subject: PERFORCE change 54262 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jun 2004 11:27:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=54262 Change 54262 by scottl@scottl-esp-sparc64 on 2004/06/06 11:26:55 Change to the uma API. Affected files ... .. //depot/projects/scottl-esp/src/sys/dev/esp/ncr53c9x.c#6 edit Differences ... ==== //depot/projects/scottl-esp/src/sys/dev/esp/ncr53c9x.c#6 (text+ko) ==== @@ -87,6 +87,7 @@ #include #include #include +#include #include #include @@ -144,8 +145,8 @@ } \ } while (0) -static int ecb_pool_initialized = 0; -static struct pool ecb_pool; +static int ecb_zone_initialized = 0; +static uma_zone_t ecb_zone; /* * Names for the NCR53c9x variants, correspnding to the variant tags @@ -430,11 +431,12 @@ NCR_MISC(("[NCR_INIT(%d) %d] ", doreset, sc->sc_state)); - if (!ecb_pool_initialized) { - /* All instances share this pool */ - pool_init(&ecb_pool, sizeof(struct ncr53c9x_ecb), 0, 0, 0, - "ncr53c9x_ecb", NULL); - ecb_pool_initialized = 1; + if (!ecb_zone_initialized) { + /* All instances share this zone */ + ecb_zone = uma_zcreate("ncr53c9x ecb zone", + sizeof(struct ncr53c9x_ecb), NULL, NULL, + NULL, NULL, 8, M_NOWAIT); + ecb_zone_initialized = 1; } if (sc->sc_state == 0) { @@ -777,7 +779,7 @@ { ecb->flags = 0; - pool_put(&ecb_pool, (void *)ecb); + uma_zfree(ecb_zone, (void *)ecb); return; } @@ -788,7 +790,7 @@ { struct ncr53c9x_ecb *ecb; - ecb = (struct ncr53c9x_ecb *)pool_get(&ecb_pool, PR_NOWAIT); + ecb = (struct ncr53c9x_ecb *)uma_zalloc(ecb_zone, M_NOWAIT); if (ecb) { memset(ecb, 0, sizeof(*ecb)); ecb->flags |= ECB_ALLOC;