Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm/pmap Change cpu_tlb_info definition based on PMAP_TL...
details: https://anonhg.NetBSD.org/src/rev/a3d063e8c29b
branches: trunk
changeset: 328428:a3d063e8c29b
user: matt <matt%NetBSD.org@localhost>
date: Thu Apr 03 14:46:25 2014 +0000
description:
Change cpu_tlb_info definition based on PMAP_TLB_MAX instead of MULTIPROCESSOR
diffstat:
sys/uvm/pmap/pmap_tlb.c | 6 +++---
sys/uvm/pmap/pmap_tlb.h | 22 +++++++++++++---------
2 files changed, 16 insertions(+), 12 deletions(-)
diffs (73 lines):
diff -r 79e3f7f40f91 -r a3d063e8c29b sys/uvm/pmap/pmap_tlb.c
--- a/sys/uvm/pmap/pmap_tlb.c Thu Apr 03 14:45:44 2014 +0000
+++ b/sys/uvm/pmap/pmap_tlb.c Thu Apr 03 14:46:25 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_tlb.c,v 1.7 2014/04/03 14:23:38 matt Exp $ */
+/* $NetBSD: pmap_tlb.c,v 1.8 2014/04/03 14:46:25 matt Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.7 2014/04/03 14:23:38 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.8 2014/04/03 14:46:25 matt Exp $");
/*
* Manages address spaces in a TLB.
@@ -947,8 +947,8 @@
KASSERT(pm != pmap_kernel());
#if defined(MULTIPROCESSOR)
//KASSERT(!kcpuset_iszero(pm->pm_onproc)); // XXX
+#if PMAP_TLB_MAX > 1
struct cpu_info * const ci __diagused = curcpu();
-#if PMAP_TLB_MAX > 1
for (u_int i = 0; !kcpuset_iszero(pm->pm_active); i++) {
KASSERT(i < pmap_ntlbs);
struct pmap_tlb_info * const ti = pmap_tlbs[i];
diff -r 79e3f7f40f91 -r a3d063e8c29b sys/uvm/pmap/pmap_tlb.h
--- a/sys/uvm/pmap/pmap_tlb.h Thu Apr 03 14:45:44 2014 +0000
+++ b/sys/uvm/pmap/pmap_tlb.h Thu Apr 03 14:46:25 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_tlb.h,v 1.5 2014/03/30 15:26:15 matt Exp $ */
+/* $NetBSD: pmap_tlb.h,v 1.6 2014/04/03 14:46:25 matt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -76,8 +76,12 @@
#include <sys/kcpuset.h>
-#if defined(MULTIPROCESSOR) && !defined(PMAP_TLB_MAX)
-#define PMAP_TLB_MAX MAXCPUS
+#if !defined(PMAP_TLB_MAX)
+# if defined(MULTIPROCESSOR)
+# define PMAP_TLB_MAX MAXCPUS
+# else
+# define PMAP_TLB_MAX 1
+# endif
#endif
/*
@@ -145,14 +149,14 @@
#endif
#ifndef cpu_set_tlb_info
-#define cpu_set_tlb_info(ci, ti) ((void)((ci)->ci_tlb_info = (ti)))
+# define cpu_set_tlb_info(ci, ti) ((void)((ci)->ci_tlb_info = (ti)))
#endif
#ifndef cpu_tlb_info
-#ifdef MULTIPROCESSOR
-#define cpu_tlb_info(ci) ((ci)->ci_tlb_info)
-#else
-#define cpu_tlb_info(ci) (&pmap_tlb0_info)
-#endif
+# if PMAP_TLB_MAX > 1
+# define cpu_tlb_info(ci) ((ci)->ci_tlb_info)
+# else
+# define cpu_tlb_info(ci) (&pmap_tlb0_info)
+# endif
#endif
#ifdef MULTIPROCESSOR
Home |
Main Index |
Thread Index |
Old Index