Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/cortex Save a few pages by only allocating LPI ...



details:   https://anonhg.NetBSD.org/src/rev/5949601cb2c2
branches:  trunk
changeset: 445806:5949601cb2c2
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Nov 13 10:33:03 2018 +0000

description:
Save a few pages by only allocating LPI pending tables for "ncpu" instead of "MAXCPU" CPUs.

diffstat:

 sys/arch/arm/cortex/gicv3.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 635066d8245f -r 5949601cb2c2 sys/arch/arm/cortex/gicv3.c
--- a/sys/arch/arm/cortex/gicv3.c       Tue Nov 13 10:31:01 2018 +0000
+++ b/sys/arch/arm/cortex/gicv3.c       Tue Nov 13 10:33:03 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3.c,v 1.7 2018/11/10 11:46:31 jmcneill Exp $ */
+/* $NetBSD: gicv3.c,v 1.8 2018/11/13 10:33:03 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
 #define        _INTR_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.7 2018/11/10 11:46:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.8 2018/11/13 10:33:03 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -673,7 +673,7 @@
         * Allocate LPI pending tables
         */
        const bus_size_t lpipend_sz = (sc->sc_lpi.pic_maxsources + sc->sc_lpi.pic_irqbase) / NBBY;
-       for (int cpuindex = 0; cpuindex < MAXCPUS; cpuindex++) {
+       for (int cpuindex = 0; cpuindex < ncpu; cpuindex++) {
                gicv3_dma_alloc(sc, &sc->sc_lpipend[cpuindex], lpipend_sz, 0x10000);
                KASSERT((sc->sc_lpipend[cpuindex].segs[0].ds_addr & ~GICR_PENDBASER_Physical_Address) == 0);
        }



Home | Main Index | Thread Index | Old Index