| version 1.182, 2010/01/20 23:40:42 |
version 1.182.2.1, 2010/04/30 14:44:12 |
|
|
| /* $NetBSD$ */ |
/* $NetBSD$ */ |
| |
|
| /*- |
/*- |
| * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008 The NetBSD Foundation, Inc. |
* Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010 |
| |
* The NetBSD Foundation, Inc. |
| * All rights reserved. |
* All rights reserved. |
| * |
* |
| * This code is derived from software contributed to The NetBSD Foundation |
* This code is derived from software contributed to The NetBSD Foundation |
| Line 1904 pool_print1(struct pool *pp, const char |
|
| Line 1905 pool_print1(struct pool *pp, const char |
|
| if (pc != NULL) { |
if (pc != NULL) { |
| cpuhit = 0; |
cpuhit = 0; |
| cpumiss = 0; |
cpumiss = 0; |
| for (i = 0; i < MAXCPUS; i++) { |
for (i = 0; i < __arraycount(pc->pc_cpus); i++) { |
| if ((cc = pc->pc_cpus[i]) == NULL) |
if ((cc = pc->pc_cpus[i]) == NULL) |
| continue; |
continue; |
| cpuhit += cc->cc_hits; |
cpuhit += cc->cc_hits; |
| Line 2158 pool_cache_destroy(pool_cache_t pc) |
|
| Line 2159 pool_cache_destroy(pool_cache_t pc) |
|
| mutex_exit(&pp->pr_lock); |
mutex_exit(&pp->pr_lock); |
| |
|
| /* Destroy per-CPU data */ |
/* Destroy per-CPU data */ |
| for (i = 0; i < MAXCPUS; i++) |
for (i = 0; i < __arraycount(pc->pc_cpus); i++) |
| pool_cache_invalidate_cpu(pc, i); |
pool_cache_invalidate_cpu(pc, i); |
| |
|
| /* Finally, destroy it. */ |
/* Finally, destroy it. */ |
| Line 2180 pool_cache_cpu_init1(struct cpu_info *ci |
|
| Line 2181 pool_cache_cpu_init1(struct cpu_info *ci |
|
| |
|
| index = ci->ci_index; |
index = ci->ci_index; |
| |
|
| KASSERT(index < MAXCPUS); |
KASSERT(index < __arraycount(pc->pc_cpus)); |
| |
|
| if ((cc = pc->pc_cpus[index]) != NULL) { |
if ((cc = pc->pc_cpus[index]) != NULL) { |
| KASSERT(cc->cc_cpuindex == index); |
KASSERT(cc->cc_cpuindex == index); |
|
|
| goto print; |
goto print; |
| } |
} |
| } |
} |
| for (i = 0; i < MAXCPUS; i++) { |
for (i = 0; i < __arraycount(pc->pc_cpus); i++) { |
| pool_cache_cpu_t *cc; |
pool_cache_cpu_t *cc; |
| |
|
| if ((cc = pc->pc_cpus[i]) == NULL) { |
if ((cc = pc->pc_cpus[i]) == NULL) { |