From owner-freebsd-hackers@freebsd.org Wed Apr 26 04:59:40 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BBF6D51813 for ; Wed, 26 Apr 2017 04:59:40 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-51.reflexion.net [208.70.210.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D41023CF for ; Wed, 26 Apr 2017 04:59:39 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 9771 invoked from network); 26 Apr 2017 04:59:38 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 26 Apr 2017 04:59:38 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.0) with SMTP; Wed, 26 Apr 2017 00:59:38 -0400 (EDT) Received: (qmail 4057 invoked from network); 26 Apr 2017 04:59:38 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 26 Apr 2017 04:59:38 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 85028EC7B46; Tue, 25 Apr 2017 21:59:37 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Should sys/arm/arm/gic.h 's GIC_DEBUG_SPURIOUS be disabled? It would help Pine64+ 2GB and 1GB console use --and possibly other A64's Message-Id: <446204CA-0347-49FE-9EDC-24F4F273A0A3@dsl-only.net> Date: Tue, 25 Apr 2017 21:59:36 -0700 Cc: Tom Vijlbrief To: mmel@FreeBSD.org, freebsd-arm , freebsd-hackers@freebsd.org X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2017 04:59:40 -0000 This note is prompted by problems using the console on Pine64+ 2GB 's when it is busy. (And 1GB 's as reported by Tom V.) There are extensive messages about spurious interrupts. The following notes are written from the view of the A64's documented gic-400. All my testing has only found the A64's gic architecture's 1023 irq as the irq for everything the code classifies as spurious, everything that is "too large to be one of the used irq's" turns out to be the 1023 value. I find no evidence of any such generation of large irq's other than automatic 1023's generated by the gic itself. arm_gic_intr handles the 1023's appropriately from what I read. No 1023 should be a problem. I've not found anything saying that the 1023's should not be generated by the gic, it appears optional for various ones being generated that are seen in the first read of GICC_IAR for a core. Other gics might not. (I've not checked the gic status in an rpi3 but an rpi3 with the same kernel does not generate the spurious interrupt messages.) The "next_irq:" code should get a 1023 when no more interrupts are available for the core for an ARM64 and its gic --and it does. It appears that something like: # svnlite diff /usr/src/sys/arm/arm/gic.h = = Index: = /usr/src/sys/arm/arm/gic.h =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 --- /usr/src/sys/arm/arm/gic.h (revision 317015) +++ /usr/src/sys/arm/arm/gic.h (working copy) @@ -39,7 +39,7 @@ #ifndef _ARM_GIC_H_ #define _ARM_GIC_H_ =20 -#define GIC_DEBUG_SPURIOUS +//#define GIC_DEBUG_SPURIOUS =20 #define GIC_FIRST_SGI 0 /* Irqs 0-15 are = SGIs/IPIs. */ #define GIC_LAST_SGI 15 would be more appropriate for at least the Pine64+ 2GB and 1GB so that the debug messages do not mess up use of the console (and cause the extra activity and its consequences). This might help other A64's too. The same sort of thing goes for stable/11's sys/arm/arm/gic.c that still has the older code structure but with GIC_DEBUG_SPURIOUS defined and used to cause the messages. The GIC_DEBUG_SPURIOUS goes back to gic.c in head -r291424 from 2015-Nov 28 (UTC) via mmel. While GIC_DEBUG_SPURIOUS moved to gic.h it seem to have stayed enabled since it was added. Note: In my testing I temporarily made variations of the messages that reported more. I found nothing I could point to as suggesting an error. It all seemed fine because of the 1023 status and the code's handling that that. [Some --but far form all-- this activity is visible in a different sequence of list submittals. The above is the overall conclusion of my investigation. The other messages clearly show my learning-as-I-go status for this.] =3D=3D=3D Mark Millard markmi at dsl-only.net