Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen use short for irq2port[] to save memory (4KB), ...



details:   https://anonhg.NetBSD.org/src/rev/84748f45e2ce
branches:  trunk
changeset: 932757:84748f45e2ce
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Fri May 15 07:42:58 2020 +0000

description:
use short for irq2port[] to save memory (4KB), it only needs to store
numbers <= NR_EVENT_CHANNELS (2048)

diffstat:

 sys/arch/xen/include/intr.h |  4 ++--
 sys/arch/xen/x86/pintr.c    |  4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r a7f256eb1d98 -r 84748f45e2ce sys/arch/xen/include/intr.h
--- a/sys/arch/xen/include/intr.h       Fri May 15 07:31:07 2020 +0000
+++ b/sys/arch/xen/include/intr.h       Fri May 15 07:42:58 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.h,v 1.56 2020/05/14 19:36:02 jdolecek Exp $       */
+/*     $NetBSD: intr.h,v 1.57 2020/05/15 07:42:58 jdolecek Exp $       */
 /*     NetBSD intr.h,v 1.15 2004/10/31 10:39:34 yamt Exp       */
 
 /*-
@@ -64,7 +64,7 @@
 };
 
 extern struct intrstub xenev_stubs[];
-extern int irq2port[NR_EVENT_CHANNELS]; /* actually port + 1, so that 0 is invaid */
+extern short irq2port[NR_EVENT_CHANNELS]; /* actually port + 1, so that 0 is invaid */
 
 #ifdef MULTIPROCESSOR
 int xen_intr_biglock_wrapper(void *);
diff -r a7f256eb1d98 -r 84748f45e2ce sys/arch/xen/x86/pintr.c
--- a/sys/arch/xen/x86/pintr.c  Fri May 15 07:31:07 2020 +0000
+++ b/sys/arch/xen/x86/pintr.c  Fri May 15 07:42:58 2020 +0000
@@ -103,7 +103,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pintr.c,v 1.15 2020/05/15 07:31:07 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pintr.c,v 1.16 2020/05/15 07:42:58 jdolecek Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_xen.h"
@@ -148,7 +148,7 @@
 #endif /* NIOAPIC */
 
 // XXX NR_EVENT_CHANNELS is 2048, use some sparse structure?
-int irq2port[NR_EVENT_CHANNELS] = {0}; /* actually port + 1, so that 0 is invaid */
+short irq2port[NR_EVENT_CHANNELS] = {0}; /* actually port + 1, so that 0 is invaid */
 
 #if NACPICA > 0
 #include <machine/mpconfig.h>



Home | Main Index | Thread Index | Old Index