From owner-freebsd-arm@freebsd.org Sat Apr 20 13:38:37 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B89E0158E4B5 for ; Sat, 20 Apr 2019 13:38:37 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (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 E411A918CC for ; Sat, 20 Apr 2019 13:38:36 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1555767511; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=pkCGUXId4sCEHzuEu9xFID8FuJeiOSgqi4VAXLdkBD+9z48q3CrPbrvdqE9/IJKSzgGm3Um3TZnGW 4j4xVPcrZOk4yjO+eCjYSwhDiNQXTeGRvg6ccs9aO9yMC5M5SNzsj1t7ziQ7oy9l6lMnoaU7hWPn1r AYbOx6iBOQRWgf5tV8K2JHsw0QrrNcN2hh+rIdAI0tYd8vqD9v4Ti4xr4yf3OH8Z0gjQlFgnOtvOmT cEmzckOR6tYplnxVt2okPlL7+nf0YwguZ2sFNEonZEAzZ6gQHJeu2Cdj0en0Nnrf0w2yZfV87f4BuO zP5roKgybCz8nIDt/zczriU4SU+oFiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=gSY80VAF6z6IgcrVvqPWFxTOeDq6WYDv62aFJ3s0WRU=; b=JO7VAJnQYlEZob7tqNdWDp5PV5lgzNF72MgmFQlIz6YqLwFjSaZMYpOeH7YZtXepY6hPOKLTXzB9y HrffIwvKX+SE6j2fycKr8I5GC7jDHsusQONZhLUjzPxfZSTzhcfRCdvyr7jcoSuHTT4m108nLwFws0 HvKrzV0gPOb0e2+nWDQXXzqSlz2gowXrsTTo4Axnjf11GA132kVWCuYP8Qo3NGBsOwYFSjBIdi3wmo XmajMyUTEn12FOARaT9kH0ht/UNkZuMXObYRV6BUUvefl14ccGxyfYTiYuyqi0mm3xM5VeVe7ae2YP h52b8u/ephRLOuUtrqIM/ykvYaon9CA== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=gSY80VAF6z6IgcrVvqPWFxTOeDq6WYDv62aFJ3s0WRU=; b=drir59sq/Z4uoqEYL+jf79CZMaK85tc+L5LoBEMhuAhF+2vFrB+2YaqBQQKhRfG3+fF+pg6Bekd9a t7e6ExNRUAXVoU53oAR9urdQVfPgbcuGp2TJWfAFus+Rmzt7ciT4oN7lyey8d1nqD8Ti/SpG5+h+NG TNAo9zYfWjZOdYGTPOKFhE03wyGnQKnWiqRuAYLOr6RZ9FdETta/am0ica/OXkJV3HXQ29Hmf/lc1+ 5QNH+gCZPLRj1tNRlc3tyOZ1LwzIpnNxitud53Bk4PcBHwRkxYUBg8N+b2/BnJ+/rQIeMcMz8n9LBl 3CQ+7GMBLCBnbkH4TcqMacbhmoH/WiQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 9456258c-6371-11e9-919f-112c64a8cf29 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 9456258c-6371-11e9-919f-112c64a8cf29; Sat, 20 Apr 2019 13:38:29 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x3KDcRrg057127; Sat, 20 Apr 2019 07:38:27 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <584546affdae591dbd204dc7e7385db628ba7b3e.camel@freebsd.org> Subject: Re: I2c producing crazy console messages [[Re: insanely-high interrupt rates -- PARTIAL resolution (Pi2)]] From: Ian Lepore To: Per Hedeland Cc: freebsd-arm@freebsd.org Date: Sat, 20 Apr 2019 07:38:27 -0600 In-Reply-To: References: <004ddba628b94b80845d8e509ddcb648d21fd6c9.camel@freebsd.org> <669892ac3fc37b0843a156c0ab102316829103fd.camel@freebsd.org> <663f2566-b035-7011-70eb-4163b41e6e55@denninger.net> <20190325164827.GL57400@cicely7.cicely.de> <3db9cf8a-68ee-e339-67bf-760ee51464fd@denninger.net> <874l7fyrpr.fsf@news-spur.riddles.org.uk> <701e011f-3088-8ed4-4fbb-6fa93ac698f5@denninger.net> <67133e19-2be5-ccd1-2ded-008b36a866ec@denninger.net> <6f6f8471-8624-c5e2-547c-42b712254126@denninger.net> <8bcdb1e1-e561-6255-848d-e532ad4d5918@denninger.net> <499b53d5-23ed-c33b-3715-018720c536a3@hedeland.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: E411A918CC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Apr 2019 13:38:38 -0000 On Sat, 2019-04-20 at 12:39 +0200, Per Hedeland wrote: > On 2019-04-19 18:04, Ian Lepore wrote: > > On Fri, 2019-04-19 at 13:32 +0200, Per Hedeland wrote: > > > But anyway I would be *extremely* surprised if I saw them, since > > > AFAIU > > > the i2c bus per se has no concept of interrupts - you need to > > > connect > > > some other wire from the device to e.g. a gpio pin (with > > > appropriate > > > config) in order to generate interrupts - and I haven't done > > > that. > > > (The > > > ads1015 does have an ALERT/RDY pin that could potentially be used > > > for > > > it, but since FreeBSD AFAIK doesn't have a way to deliver the > > > interrupts to userland code, I had no interest in it.) > > > > You're thinking about this all wrong. The interrupts have nothing > > to > > do with the i2c bus, but the i2c controller still uses interrupts > > to > > signal things like "trasnfer done" or "fifo empty". > > OK... > > > If there's nothing > > on the bus, you don't end up doing any transfers, so you don't get > > any > > spurious interrupts. > > That much is clear even to me, but I'm doing 128 transfers/second > without seeing any spurious interrupts. But I guess my observation > matches the second alternative in one of your earlier messages (where > the first alternative, as far as I understood, was about interrupts > from the i2c device itself...) - i.e. interrupts being dispatched to > multiple cores. This obviously can't happen on the RPi 0/1 that I've > tried, since they're single-core. > > Exactly so. I did all my recent rpi i2c driver work using an old rpi1 so I never saw the problem. Now I've got an rpi2, and oddly enough, last night I finally saw a few spurious interrupts while writing to an RTC chip (but never while reading from one). I also now have an ADS1015 in hand (gotta love amazon free same-day delivery). So hopefully today I can track this down, although without something like jtag debugging, the only way to know if it's the "multiple cores signalled at once" situation is to eliminate all other possibilities. -- Ian