diff options
author | obrien <obrien@FreeBSD.org> | 2000-06-11 05:33:18 +0800 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2000-06-11 05:33:18 +0800 |
commit | 0ab09f1e7e08858ae65c056537d00fc842d6f860 (patch) | |
tree | ee9d5abb945aacf0adf2e2a925b5c51990cf8de1 /sysutils | |
parent | 183eb8aee636af758f070cf56d8b4b1df03a117b (diff) | |
download | freebsd-ports-gnome-0ab09f1e7e08858ae65c056537d00fc842d6f860.tar.gz freebsd-ports-gnome-0ab09f1e7e08858ae65c056537d00fc842d6f860.tar.zst freebsd-ports-gnome-0ab09f1e7e08858ae65c056537d00fc842d6f860.zip |
Use the correct number of interrupts on the Alpha.
Submitted by: Alexander Langer <alex@big.endian.de>
PR: 19064
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/xosview/files/patch-intmeter.cc | 24 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-kernel.cc | 63 | ||||
-rw-r--r-- | sysutils/xosview/files/patch-kernel.h | 15 |
3 files changed, 102 insertions, 0 deletions
diff --git a/sysutils/xosview/files/patch-intmeter.cc b/sysutils/xosview/files/patch-intmeter.cc new file mode 100644 index 000000000000..314b297abb7c --- /dev/null +++ b/sysutils/xosview/files/patch-intmeter.cc @@ -0,0 +1,24 @@ +--- bsd/intmeter.cc.orig Sat Jun 10 17:37:21 2000 ++++ bsd/intmeter.cc Sat Jun 10 17:37:51 2000 +@@ -22,9 +22,9 @@ + // out the door. + // Same goes for platforms (like Alpha) with more than 16 + // interrupts. +- : BitMeter( parent, "INTS", "IRQs", 16 /*BSDNumInts()*/, ++ : BitMeter( parent, "INTS", "IRQs", BSDNumInts(), + dolegends, dousedlegends ) { +- for ( int i = 0 ; i < 16 ; i++ ) ++ for ( int i = 0 ; i < BSDNumInts(); i++ ) + irqs_[i] = lastirqs_[i] = 0; + } + +@@ -34,7 +34,7 @@ + void IntMeter::checkevent( void ){ + getirqs(); + +- for ( int i = 0 ; i < 16 ; i++ ){ ++ for ( int i = 0 ; i < BSDNumInts() ; i++ ){ + bits_[i] = ((irqs_[i] - lastirqs_[i]) != 0); + lastirqs_[i] = irqs_[i]; + } + diff --git a/sysutils/xosview/files/patch-kernel.cc b/sysutils/xosview/files/patch-kernel.cc new file mode 100644 index 000000000000..7cf698907a1c --- /dev/null +++ b/sysutils/xosview/files/patch-kernel.cc @@ -0,0 +1,63 @@ +--- bsd/kernel.cc.orig Mon Jul 5 21:09:30 1999 ++++ bsd/kernel.cc Sat Jun 10 14:25:05 2000 +@@ -284,7 +284,12 @@ + while (nlp && nlp->n_name) { + if ((nlp->n_type == 0) || (nlp->n_value == 0)) + /*errx (-1, "kvm_nlist() lookup failed for symbol '%s'.", nlp->n_name);*/ ++#if defined(XOSVIEW_FREEBSD) && defined(__alpha__) ++ /* XXX: this should be properly fixed. */ ++ ; ++#else + warnx ("kvm_nlist() lookup failed for symbol '%s'.", nlp->n_name); ++#endif + nlp++; + } + #ifdef HAVE_DEVSTAT +@@ -792,25 +797,25 @@ + OpenKDIfNeeded(); + nintr = (nlst[EINTRCNT_SYM_INDEX].n_value - + nlst[INTRCNT_SYM_INDEX].n_value) / sizeof(int); +-#ifdef XOSVIEW_FREEBSD +- /* I'm not sure exactly how FreeBSD does things, but just do ++#if defined(i386) ++# if defined(XOSVIEW_FREEBSD) ++ /* I'm not sure exactly how FreeBSD/i386 does things, but just do + * 16 for now. bgrayson */ + return 16; +-#else +-# if defined(i386) ++# else + /* On the 386 platform, we count stray interrupts between + * intrct and eintrcnt, also, but we don't want to show these. */ + return nintr/2; +-# else +- return nintr; + # endif ++#else ++ return nintr; + #endif + } + #endif /* XOSVIEW_OPENBSD */ + + void + BSDGetIntrStats (unsigned long intrCount[NUM_INTR]) { +-#ifdef XOSVIEW_FREEBSD ++#if defined(XOSVIEW_FREEBSD) && defined(__i386__) + /* FreeBSD has an array of interrupt counts, indexed by device number. + These are also indirected by IRQ num with intr_countp: */ + safe_kvm_read (nlst[INTRCOUNTP_SYM_INDEX].n_value, +@@ -839,10 +844,10 @@ + intrCount[i] = kvm_intrptrs[i]; + #endif /* _BSDI_VERSION */ + +-#else /* XOSVIEW_FREEBSD */ +- // NetBSD/OpenBSD version, based on vmstat.c. Note that the pc532 +- // platform does support intrcnt and eintrcnt, but vmstat uses +- // the more advanced event counters to provide software ++#else /* XOSVIEW_FREEBSD & i386 */ ++ // NetBSD/OpenBSD & FreeBSD/Alpha version, based on vmstat.c. ++ // Note that the pc532 platform does support intrcnt and eintrcnt, but ++ // vmstat uses the more advanced event counters to provide software + // counts. We'll just use the intrcnt array here. If anyone + // has problems, please mail me. bgrayson + { diff --git a/sysutils/xosview/files/patch-kernel.h b/sysutils/xosview/files/patch-kernel.h new file mode 100644 index 000000000000..183fbbf4d2d5 --- /dev/null +++ b/sysutils/xosview/files/patch-kernel.h @@ -0,0 +1,15 @@ +--- bsd/kernel.h.orig Fri May 29 14:21:36 1998 ++++ bsd/kernel.h Sat Jun 10 14:18:22 2000 +@@ -67,7 +67,11 @@ + #endif + + +-#define NUM_INTR 16 ++#if defined(XOSVIEW_FREEBSD) && defined(__alpha__) ++# define NUM_INTR 256 ++#else ++# define NUM_INTR 16 ++#endif + + int + BSDIntrInit(); |