Use PMAP_TLB_MAX instead of MAXCPUS.

This commit is contained in:
nonaka 2015-01-05 05:35:18 +00:00
parent 0e4eb59327
commit 038a27157d
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.8 2014/12/25 08:11:09 nonaka Exp $ */
/* $NetBSD: pmap.c,v 1.9 2015/01/05 05:35:18 nonaka Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@ -67,7 +67,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.8 2014/12/25 08:11:09 nonaka Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.9 2015/01/05 05:35:18 nonaka Exp $");
/*
* Manages physical address maps.
@ -197,7 +197,7 @@ CTASSERT(PMAP_ASID_RESERVED == 0);
* Initialize the kernel pmap.
*/
#ifdef MULTIPROCESSOR
#define PMAP_SIZE offsetof(struct pmap, pm_pai[MAXCPUS])
#define PMAP_SIZE offsetof(struct pmap, pm_pai[PMAP_TLB_MAX])
#else
#define PMAP_SIZE sizeof(struct pmap)
kmutex_t pmap_pvlist_mutex __aligned(COHERENCY_UNIT);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap_tlb.h,v 1.6 2014/04/03 14:46:25 matt Exp $ */
/* $NetBSD: pmap_tlb.h,v 1.7 2015/01/05 05:35:18 nonaka Exp $ */
/*
* Copyright (c) 1992, 1993
@ -144,7 +144,7 @@ struct pmap_tlb_info {
#ifdef _KERNEL
extern struct pmap_tlb_info pmap_tlb0_info;
#ifdef MULTIPROCESSOR
extern struct pmap_tlb_info *pmap_tlbs[MAXCPUS];
extern struct pmap_tlb_info *pmap_tlbs[PMAP_TLB_MAX];
extern u_int pmap_ntlbs;
#endif