Date: Sat, 10 Jun 2000 08:50:02 -0700 (PDT) From: Alexander Langer <alex@big.endian.de> To: freebsd-ports@FreeBSD.org Subject: Re: ports/19064: Xosview broken on AXP Alpha Message-ID: <200006101550.IAA09941@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/19064; it has been noted by GNATS. From: Alexander Langer <alex@big.endian.de> To: "David O'Brien" <obrien@NUXI.com> Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: ports/19064: Xosview broken on AXP Alpha Date: Sat, 10 Jun 2000 17:46:10 +0200 Please try these patches: FreeBSD/Alpha is derived from NetBSD/Alpha, so we should use the NetBSD specific code for Alpha. Can you tell me when FreeBSD changed from 16 to 16+ IRQ's? (hopefully FreeBSD_version). I then can also fix the 16+-IRQ-case, which fails due to hardcoding "16". Alex --- bsd/kernel.cc.old Sat Jun 10 15:45:05 2000 +++ bsd/kernel.cc Sat Jun 10 16:21:55 2000 @@ -284,7 +289,11 @@ 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);*/ +#ifndef __alpha__ warnx ("kvm_nlist() lookup failed for symbol '%s'.", nlp->n_name); +#else + ; +#endif nlp++; } #ifdef HAVE_DEVSTAT @@ -792,7 +802,7 @@ OpenKDIfNeeded(); nintr = (nlst[EINTRCNT_SYM_INDEX].n_value - nlst[INTRCNT_SYM_INDEX].n_value) / sizeof(int); -#ifdef XOSVIEW_FREEBSD +#if defined(XOSVIEW_FREEBSD) && !defined(__alpha__) /* I'm not sure exactly how FreeBSD does things, but just do * 16 for now. bgrayson */ return 16; @@ -810,9 +820,9 @@ void BSDGetIntrStats (unsigned long intrCount[NUM_INTR]) { -#ifdef XOSVIEW_FREEBSD +#if defined(XOSVIEW_FREEBSD) && !defined(__alpha__) /* 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, kvm_intrptrs, sizeof(kvm_intrptrs)); size_t len = --- bsd/kernel.h.old Sat Jun 10 16:57:26 2000 +++ bsd/kernel.h Sat Jun 10 16:57:59 2000 @@ -66,8 +66,11 @@ FreeBSDGetBufspace(int* bfsp); #endif - +#if defined(XOSVIEW_FREEBSD) && !defined(__alpha__) #define NUM_INTR 16 +#else if defined(XOSVIEW_FREEBSD) && defined(__alpha__) +#define NUM_INTR 256 +#endif int BSDIntrInit(); --- bsd/intmeter.cc.old 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]; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006101550.IAA09941>