Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha Rename pmap_asn_info to pmap_percpu, and pmap...



details:   https://anonhg.NetBSD.org/src/rev/76572d4bb9c1
branches:  trunk
changeset: 983572:76572d4bb9c1
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat May 29 21:54:50 2021 +0000

description:
Rename pmap_asn_info to pmap_percpu, and pmap::pm_asni to pmap::pm_percpu.
No functional change.

diffstat:

 sys/arch/alpha/alpha/pmap.c   |  30 +++++++++++++++---------------
 sys/arch/alpha/include/pmap.h |  16 ++++++++--------
 2 files changed, 23 insertions(+), 23 deletions(-)

diffs (139 lines):

diff -r 17c5f5f5ba5e -r 76572d4bb9c1 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c       Sat May 29 21:08:44 2021 +0000
+++ b/sys/arch/alpha/alpha/pmap.c       Sat May 29 21:54:50 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.278 2021/05/24 03:43:24 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.279 2021/05/29 21:54:50 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020
@@ -135,7 +135,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.278 2021/05/24 03:43:24 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.279 2021/05/29 21:54:50 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -265,9 +265,9 @@
 static struct pool_cache pmap_l1pt_cache __read_mostly;
 static struct pool_cache pmap_pv_cache __read_mostly;
 
-CTASSERT(offsetof(struct pmap, pm_asni[0]) == COHERENCY_UNIT);
+CTASSERT(offsetof(struct pmap, pm_percpu[0]) == COHERENCY_UNIT);
 CTASSERT(PMAP_SIZEOF(ALPHA_MAXPROCS) < ALPHA_PGBYTES);
-CTASSERT(sizeof(struct pmap_asn_info) == COHERENCY_UNIT);
+CTASSERT(sizeof(struct pmap_percpu) == COHERENCY_UNIT);
 
 /*
  * Address Space Numbers.
@@ -880,7 +880,7 @@
                 * so force allocation of a new ASN when the pmap becomes
                 * active again.
                 */
-               pmap->pm_asni[ci->ci_cpuid].pma_asngen = PMAP_ASNGEN_INVALID;
+               pmap->pm_percpu[ci->ci_cpuid].pmc_asngen = PMAP_ASNGEN_INVALID;
                atomic_and_ulong(&pmap->pm_cpus, ~cpu_mask);
 
                /*
@@ -1580,8 +1580,8 @@
         * when the pmap is activated.
         */
        for (i = 0; i < pmap_ncpuids; i++) {
-               pmap->pm_asni[i].pma_asn = PMAP_ASN_KERNEL;
-               pmap->pm_asni[i].pma_asngen = PMAP_ASNGEN_INVALID;
+               pmap->pm_percpu[i].pmc_asn = PMAP_ASN_KERNEL;
+               pmap->pm_percpu[i].pmc_asngen = PMAP_ASNGEN_INVALID;
        }
 
  try_again:
@@ -3814,7 +3814,7 @@
        if (pmap_max_asn == 0)
                return 0;
 
-       struct pmap_asn_info * const pma = &pmap->pm_asni[ci->ci_cpuid];
+       struct pmap_percpu * const pmc = &pmap->pm_percpu[ci->ci_cpuid];
 
        /*
         * Hopefully, we can continue using the one we have...
@@ -3824,14 +3824,14 @@
         * the generation counter at 1, but initialize pmaps with
         * 0; this forces the first ASN allocation to occur.
         */
-       if (pma->pma_asngen == ci->ci_asn_gen) {
+       if (pmc->pmc_asngen == ci->ci_asn_gen) {
 #ifdef DEBUG
                if (pmapdebug & PDB_ASN)
                        printf("pmap_asn_alloc: same generation, keeping %u\n",
-                           pma->pma_asn);
+                           pmc->pmc_asn);
 #endif
                TLB_COUNT(asn_reuse);
-               return pma->pma_asn;
+               return pmc->pmc_asn;
        }
 
        /*
@@ -3874,8 +3874,8 @@
        /*
         * Assign the new ASN and validate the generation number.
         */
-       pma->pma_asn = ci->ci_next_asn++;
-       pma->pma_asngen = ci->ci_asn_gen;
+       pmc->pmc_asn = ci->ci_next_asn++;
+       pmc->pmc_asngen = ci->ci_asn_gen;
        TLB_COUNT(asn_assign);
 
        /*
@@ -3887,7 +3887,7 @@
 #ifdef DEBUG
        if (pmapdebug & PDB_ASN)
                printf("pmap_asn_alloc: assigning %u to pmap %p\n",
-                   pma->pma_asn, pmap);
+                   pmc->pmc_asn, pmap);
 #endif
-       return pma->pma_asn;
+       return pmc->pmc_asn;
 }
diff -r 17c5f5f5ba5e -r 76572d4bb9c1 sys/arch/alpha/include/pmap.h
--- a/sys/arch/alpha/include/pmap.h     Sat May 29 21:08:44 2021 +0000
+++ b/sys/arch/alpha/include/pmap.h     Sat May 29 21:54:50 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.85 2021/05/24 03:43:24 thorpej Exp $ */
+/* $NetBSD: pmap.h,v 1.86 2021/05/29 21:54:51 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -131,11 +131,11 @@
  * allocate any ASN info for the kernel pmap at all.
  * arrays which hold enough for ALPHA_MAXPROCS.
  */
-struct pmap_asn_info {
-       unsigned int            pma_asn;        /* address space number */
-       unsigned int            pma_pad0;
-       unsigned long           pma_asngen;     /* ASN generation number */
-       unsigned long           pma_padN[(COHERENCY_UNIT / 8) - 2];
+struct pmap_percpu {
+       unsigned int            pmc_asn;        /* address space number */
+       unsigned int            pmc_pad0;
+       unsigned long           pmc_asngen;     /* ASN generation number */
+       unsigned long           pmc_padN[(COHERENCY_UNIT / 8) - 2];
 };
 
 struct pmap {  /* pmaps are aligned to COHERENCY_UNIT boundaries */
@@ -148,12 +148,12 @@
        unsigned int            __pm_spare;     /* [44] spare field */
        TAILQ_ENTRY(pmap)       pm_list;        /* [48] list of all pmaps */
        /* -- COHERENCY_UNIT boundary -- */
-       struct pmap_asn_info    pm_asni[];      /* [64] ASN information */
+       struct pmap_percpu      pm_percpu[];    /* [64] per-CPU data */
                        /*      variable length         */
 };
 
 #define        PMAP_SIZEOF(x)                                                  \
-       (ALIGN(offsetof(struct pmap, pm_asni[(x)])))
+       (ALIGN(offsetof(struct pmap, pm_percpu[(x)])))
 
 #define        PMAP_ASN_KERNEL         0       /* kernel-reserved ASN */
 #define        PMAP_ASN_FIRST_USER     1       /* first user ASN */



Home | Main Index | Thread Index | Old Index