From owner-freebsd-mips@FreeBSD.ORG Tue Apr 20 11:36:34 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 E1131106564A for ; Tue, 20 Apr 2010 11:36:34 +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 8E3988FC25 for ; Tue, 20 Apr 2010 11:36:34 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id 06B3111BA4C for ; Tue, 20 Apr 2010 06:36:34 -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 0K8GFKKXANLV for ; Tue, 20 Apr 2010 06:36:34 -0500 From: Rui Paulo Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Tue, 20 Apr 2010 12:36:31 +0100 Message-Id: To: freebsd-mips@freebsd.org Mime-Version: 1.0 (Apple Message framework v1078) X-Mailer: Apple Mail (2.1078) Subject: [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: Tue, 20 Apr 2010 11:36:35 -0000 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. Here's an example: $ vmstat -i interrupt total rate int16: 56118 984 int17: 214 3 Total 56332 988 int16 is the timer and int17 is the network interface (rge1). 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); Regards, -- Rui Paulo