From owner-freebsd-mips@FreeBSD.ORG Wed Apr 28 11:28:36 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAC991065673 for ; Wed, 28 Apr 2010 11:28:36 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id 9E4688FC1A for ; Wed, 28 Apr 2010 11:28:36 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id 47BD318F38A for ; Wed, 28 Apr 2010 06:28:35 -0500 (CDT) Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by lavabit.com with ESMTP id 22JVH3UBDVPI for ; Wed, 28 Apr 2010 06:28:35 -0500 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1078) From: Rui Paulo In-Reply-To: Date: Wed, 28 Apr 2010 12:28:33 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <13B981BB-EDB1-4D39-A9CA-A1D4981E5732@freebsd.org> References: To: freebsd-mips@freebsd.org X-Mailer: Apple Mail (2.1078) Subject: Re: [PATCH] Account RMI XLR interrupts X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 11:28:36 -0000 On 20 Apr 2010, at 12:36, Rui Paulo wrote: > Hi, > The following patch accounts interrupts on the XLR and makes vmstat -i = and systat work display useful data. I think the commented out atomic = inc can go away, but I'm not sure. >=20 > Here's an example: >=20 > $ vmstat -i > interrupt total rate > int16: 56118 984 > int17: 214 3 > Total 56332 988 >=20 > int16 is the timer and int17 is the network interface (rge1). >=20 > Index: intr_machdep.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- intr_machdep.c (revision 206791) > +++ intr_machdep.c (working copy) > @@ -157,28 +157,17 @@ > for (i =3D sizeof(eirr) * 8 - 1; i >=3D 0; i--) { > if ((eirr & (1ULL << i)) =3D=3D 0) > continue; > ie =3D mips_intr_events[i]; > /* atomic_add_long(mih->cntp, 1); */ > + /* Don't account special IRQs */ > + switch (i) { > + case IRQ_IPI: > + case IRQ_MSGRING: > + break; > + default: > + mips_intrcnt_inc(mips_intr_counters[i]); > + } >=20 > write_c0_eirr64(1ULL << i); > pic_ack(i, 0); >=20 Can I commit this? Regards, -- Rui Paulo