From owner-freebsd-arm@freebsd.org Mon Aug 24 16:37:34 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6C993C6A6F; Mon, 24 Aug 2020 16:37:34 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZyTT4cNJz3clp; Mon, 24 Aug 2020 16:37:33 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id 07OGbcsu009866 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 24 Aug 2020 09:37:38 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id 07OGbbrd009865; Mon, 24 Aug 2020 09:37:37 -0700 (PDT) (envelope-from fbsd) Date: Mon, 24 Aug 2020 09:37:36 -0700 From: bob prohaska To: freebsd-arm@freebsd.org, freebsd-current@freebsd.org Subject: Strange USB loop Message-ID: <20200824163736.GA9845@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 4BZyTT4cNJz3clp X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net X-Spamd-Result: default: False [3.14 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; WWW_DOT_DOMAIN(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.60)[0.598]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.64)[0.641]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm,freebsd-current]; MID_RHS_WWW(0.50)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 16:37:34 -0000 After updating to FreeBSD 13.0-CURRENT (GENERIC) #5 r364475: Mon Aug 24 06:47:29 PDT 2020 on a Pi3 it was necessary to disconnect the mouse, keyboard and usb-serial adapter to allow the machine to mount root from USB via a hub. Once the machine came back up with root mounted from USB, I tried plugging the serial adapter, mouse and keyboard back in via the hub. The FTDI serial adapater was recognized without trouble, but when the elderly Dell mouse was connected, a stream of uhub_reattach_port: giving up port reset - device vanished uhub_reattach_port: giving up port reset - device vanished uhub_reattach_port: giving up port reset - device vanished uhub_reattach_port: giving up port reset - device vanished uhub_reattach_port: giving up port reset - device vanished began to scroll on both the monitor and console. Unplugging the mouse made no difference. Plugging the mouse directly into the Pi's USB port allowed recognition and function, but the stream of errors persisted. Network access seems normal. It looks almost as if there's some sort of infinite loop running in the USB software. The need to disconnect mouse and keyboard to permit mountroot to work isn't new, but the "giving up port reset" _is_ new at least to me. Are there any experiments which might narrow down what's wrong? Thanks for reading, bob prohaska From owner-freebsd-arm@freebsd.org Mon Aug 24 17:26:42 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E56623C8872; Mon, 24 Aug 2020 17:26:42 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZzZ95z4Cz3yvn; Mon, 24 Aug 2020 17:26:41 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 4F2118D4A213; Mon, 24 Aug 2020 17:26:31 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id C106BE7082A; Mon, 24 Aug 2020 17:26:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id yRGOGs8MGUeI; Mon, 24 Aug 2020 17:26:29 +0000 (UTC) Received: from [169.254.45.172] (unknown [IPv6:fde9:577b:c1a9:4902:30c5:8164:4a84:388]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 37ACBE707AC; Mon, 24 Aug 2020 17:26:28 +0000 (UTC) From: "Bjoern A. Zeeb" To: "bob prohaska" Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org Subject: Re: Strange USB loop Date: Mon, 24 Aug 2020 17:26:27 +0000 X-Mailer: MailMate (2.0BETAr6146) Message-ID: <9E59062A-865E-454C-8D1F-AB42F33EA020@lists.zabbadoz.net> In-Reply-To: <20200824163736.GA9845@www.zefox.net> References: <20200824163736.GA9845@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4BZzZ95z4Cz3yvn X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of bzeeb-lists@lists.zabbadoz.net designates 2a01:4f8:13b:39f::9f:25 as permitted sender) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net X-Spamd-Result: default: False [-1.41 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:13b:39f::9f:25]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zabbadoz.net]; NEURAL_HAM_MEDIUM(-0.62)[-0.621]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.49)[-0.487]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm,freebsd-current] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 17:26:43 -0000 On 24 Aug 2020, at 16:37, bob prohaska wrote: > After updating to > FreeBSD 13.0-CURRENT (GENERIC) #5 r364475: Mon Aug 24 06:47:29 PDT 2020 > on a Pi3 it was necessary to disconnect the mouse, keyboard and usb-serial > adapter to allow the machine to mount root from USB via a hub. > > Once the machine came back up with root mounted from USB, I tried plugging > the serial adapter, mouse and keyboard back in via the hub. > > The FTDI serial adapater was recognized without trouble, but when the > elderly Dell mouse was connected, a stream of > > uhub_reattach_port: giving up port reset - device vanished > uhub_reattach_port: giving up port reset - device vanished > uhub_reattach_port: giving up port reset - device vanished > uhub_reattach_port: giving up port reset - device vanished > uhub_reattach_port: giving up port reset - device vanished > > began to scroll on both the monitor and console. Unplugging > the mouse made no difference. Plugging the mouse directly > into the Pi's USB port allowed recognition and function, > but the stream of errors persisted. Network access seems > normal. > > It looks almost as if there's some sort of infinite loop > running in the USB software. The need to disconnect mouse > and keyboard to permit mountroot to work isn't new, but > the "giving up port reset" _is_ new at least to me. > > Are there any experiments which might narrow down what's wrong? I hit something like it last weekend and found this one: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237666 /bz From owner-freebsd-arm@freebsd.org Mon Aug 24 20:18:44 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 72C073CC5AD for ; Mon, 24 Aug 2020 20:18:44 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb3Nc2DJmz4CvX; Mon, 24 Aug 2020 20:18:39 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id 07OKIWDX081021 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 24 Aug 2020 13:18:32 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id 07OKIVmt081019; Mon, 24 Aug 2020 13:18:31 -0700 (PDT) (envelope-from jmg) Date: Mon, 24 Aug 2020 13:18:31 -0700 From: John-Mark Gurney To: Ian Lepore Cc: Alexander Mishin , freebsd-arm@freebsd.org Subject: Re: Kmod driver at iicbus. attach() and config_intrhook(9) Message-ID: <20200824201830.GF4213@funkthat.com> Mail-Followup-To: Ian Lepore , Alexander Mishin , freebsd-arm@freebsd.org References: <7fabb65d99aaa74775c1daa91bffb873@mh.net.ru> <3249fa7e-554a-83ef-57b2-7c38aa0b4591@FreeBSD.org> <20200819072409.GA59949@bluezbox.com> <05145b71692af74b103bb226a2e93a15e1e851cb.camel@freebsd.org> <20200820223918.GC4213@funkthat.com> <20200820235301.GE4213@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.3-STABLE amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Mon, 24 Aug 2020 13:18:32 -0700 (PDT) X-Rspamd-Queue-Id: 4Bb3Nc2DJmz4CvX X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of jmg@gold.funkthat.com has no SPF policy when checking 208.87.223.18) smtp.mailfrom=jmg@gold.funkthat.com X-Spamd-Result: default: False [2.42 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[jmg]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[funkthat.com]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.89)[0.890]; NEURAL_SPAM_SHORT(0.33)[0.330]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[jmg@funkthat.com,jmg@gold.funkthat.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:32354, ipnet:208.87.216.0/21, country:US]; FROM_NEQ_ENVFROM(0.00)[jmg@funkthat.com,jmg@gold.funkthat.com]; MAILMAN_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 20:18:44 -0000 Ian Lepore wrote this message on Thu, Aug 20, 2020 at 18:40 -0600: > On Thu, 2020-08-20 at 16:53 -0700, John-Mark Gurney wrote: > > > Hmm, yeah, it looks like more has been done along these lines than I > > > remembered. In fact, the work may be done. > > > > > > Some i2c controllers have to work properly before interrupts are > > > available, to control things like PMIC chips that are required very > > > early in device configuration. Typically they have some sort of > > > > Ahh, yeah, forgot about PMICs... > > > > > polling mechanism that's used early, and revert to using interrupts > > > once they're available. The allwinner and rockchip drivers work that > > > way. > > > > So, sounds like any controller that is found to not be doing this, needs > > to be fixed to use the above function, and then the remaining ones that > > either poll, or use the hybrid approach can keep using > > bus_generic_attach... > > > > Back to original question, no, that additional logic should not be > > needed, and any controller that requires it needs to be fixed > > instead... > > Yeah, it was always my plan that after all controller drivers were > updated, the intrhook stuff could be removed from slave drivers that > still have it. > > I'd like to see the controllers that can do xfers without interrupts > have a comment that says so. Something like > > /* no need for bus_delayed_attach(), we xfer without interrupts */ > > Then you can grep -l for add_child.*iicbus and grep for > bus_delayed_attach and compare the two file lists to find drivers that > may not be doing the right thing. Using that technique now shows that > we may still have a dozen or so controller drivers to fix (or at least > examine for correctness). Just realized we should probably document this somewhere... iicbus(4) isn't the best place, but it's a place that exists... It's also woefully out of data, listing only a few device drivers, and 4 interfaces... Anyone want to submit a patch for this? > BTW, all of this tends to apply to SPI controller and slave drivers > too, but the problem is likely smaller there because we have fewer SPI > controller drivers. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-arm@freebsd.org Mon Aug 24 20:37:27 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70F0B3CCF06; Mon, 24 Aug 2020 20:37:27 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb3pD2kC7z4FDD; Mon, 24 Aug 2020 20:37:23 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id 07OKbX8N010378 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 24 Aug 2020 13:37:33 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id 07OKbW45010377; Mon, 24 Aug 2020 13:37:32 -0700 (PDT) (envelope-from fbsd) Date: Mon, 24 Aug 2020 13:37:32 -0700 From: bob prohaska To: "Bjoern A. Zeeb" Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org Subject: Re: Strange USB loop Message-ID: <20200824203732.GA10340@www.zefox.net> References: <20200824163736.GA9845@www.zefox.net> <9E59062A-865E-454C-8D1F-AB42F33EA020@lists.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9E59062A-865E-454C-8D1F-AB42F33EA020@lists.zabbadoz.net> X-Rspamd-Queue-Id: 4Bb3pD2kC7z4FDD X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net X-Spamd-Result: default: False [3.17 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; WWW_DOT_DOMAIN(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.50)[0.496]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.77)[0.772]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm,freebsd-current]; MID_RHS_WWW(0.50)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 20:37:27 -0000 On Mon, Aug 24, 2020 at 05:26:27PM +0000, Bjoern A. Zeeb wrote: > On 24 Aug 2020, at 16:37, bob prohaska wrote: > > > > > uhub_reattach_port: giving up port reset - device vanished > > uhub_reattach_port: giving up port reset - device vanished > > uhub_reattach_port: giving up port reset - device vanished > > uhub_reattach_port: giving up port reset - device vanished > > uhub_reattach_port: giving up port reset - device vanished > > > > I hit something like it last weekend and found this one: > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237666 > Hmm, rather discouraging. Same error message, different hardware. Considerable investigation without resolution. Over a year old. Thanks for writing 8=( bob prohaska From owner-freebsd-arm@freebsd.org Mon Aug 24 20:47:11 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B5A43CD27B for ; Mon, 24 Aug 2020 20:47:11 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb41V2TW0z4Ft9 for ; Mon, 24 Aug 2020 20:47:10 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id 07OKl89N083455 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 24 Aug 2020 13:47:08 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id 07OKl88F083454; Mon, 24 Aug 2020 13:47:08 -0700 (PDT) (envelope-from jmg) Date: Mon, 24 Aug 2020 13:47:08 -0700 From: John-Mark Gurney To: Alexander Mishin Cc: freebsd-arm@freebsd.org Subject: Re: Kmod driver at iicbus. attach() and config_intrhook(9) Message-ID: <20200824204708.GH4213@funkthat.com> Mail-Followup-To: Alexander Mishin , freebsd-arm@freebsd.org References: <7fabb65d99aaa74775c1daa91bffb873@mh.net.ru> <3249fa7e-554a-83ef-57b2-7c38aa0b4591@FreeBSD.org> <20200819072409.GA59949@bluezbox.com> <05145b71692af74b103bb226a2e93a15e1e851cb.camel@freebsd.org> <20200820223918.GC4213@funkthat.com> <496ed13afb2327d6416664b4dacfc346@mh.net.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <496ed13afb2327d6416664b4dacfc346@mh.net.ru> X-Operating-System: FreeBSD 11.3-STABLE amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Mon, 24 Aug 2020 13:47:08 -0700 (PDT) X-Rspamd-Queue-Id: 4Bb41V2TW0z4Ft9 X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of jmg@gold.funkthat.com has no SPF policy when checking 208.87.223.18) smtp.mailfrom=jmg@gold.funkthat.com X-Spamd-Result: default: False [2.29 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[jmg]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.23)[0.232]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[funkthat.com]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.86)[0.861]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[jmg@funkthat.com,jmg@gold.funkthat.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:32354, ipnet:208.87.216.0/21, country:US]; FROM_NEQ_ENVFROM(0.00)[jmg@funkthat.com,jmg@gold.funkthat.com]; MAILMAN_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 20:47:11 -0000 Alexander Mishin wrote this message on Sat, Aug 22, 2020 at 00:59 +0400: > Ian Lepore ?????????? 2020-08-21 02:51: > > On Thu, 2020-08-20 at 15:39 -0700, John-Mark Gurney wrote: > >> Alexander Mishin wrote this message on Thu, Aug 20, 2020 at 10:07 > >> +0400: > >> > Ian Lepore ?????????? 2020-08-19 19:39: > >> > > On Wed, 2020-08-19 at 00:24 -0700, Oleksandr Tymoshenko wrote: > >> > > > Andriy Gapon (avg@FreeBSD.org) wrote: > >> > > > > On 18/08/2020 22:05, Alexander Mishin wrote: > >> > > > > > Hi > >> > > > > > ... > >> > > > > > But I see that some other devices (from /usr/src/sys/dev) > >> > > > > > uses > >> > > > > > CONFIG_INTRHOOK(9) > >> > > > > > on attach() for initialize themselfs. > >> > > > > > I wonder if I need this too? ... > >> > > > > > >> > > > > This is usually needed when a driver needs to talk to its > >> > > > > device > >> > > > > while > >> > > > > attaching. E.g., to set some initial configuration or to > >> > > > > confirm > >> > > > > device's > >> > > > > identity, etc. > >> > > > > >> > > > To extend Andriy's explanation a bit: all these operations may > >> > > > perform > >> > > > I2C transfers and most I2C controllers use interrupts to get > >> > > > notified > >> > > > about tranfer status change (finished, error, etc...). There is > >> > > > no > >> > > > guarantee that when driver's attach method is called interrupts > >> > > > are > >> > > > globally enabled. What would happen in this case is: I2C > >> > > > controller > >> > > > is going to initiate I2C operation and wait for an interrupt > >> > > > that's > >> > > > never going to be delivered. CONFIG_INTRHOOK is a solution for > >> > > > this > >> > > > problem, if your attach method requires interrupts - just split > >> > > > it > >> > > > in two parts and postpone running interrupt-dependent part > >> > > > until > >> > > > after > >> > > > interrupts are globally enabled. > >> > > > > >> > > > >> > > A note about all this: It should never be necessary for an i2c > >> > > slave > >> > > device driver to do this. The reason it's needed is because many > >> > > i2c > >> > > controller drivers attach the iicbus from their attach() routine > >> > > even > >> > > though they can't actually do i2c IO until interrupts are > >> > > available. > >> > > It is these controller drivers that should have the intrhook > >> > > logic to > >> > > not call bus_generic_attach() until interrupts are available if > >> > > they > >> > > can't do IO until interrupts are available. > >> > > > >> > > It has long been my goal to fix all our i2c controller drivers to > >> > > behave correctly, so that i2c slave device drivers don't all need > >> > > the > >> > > intrhook logic. But somehow I never get around to it. > >> > > >> > I think, it would be helpful, as it would be possible to return an > >> > error > >> > on early stage, from attach(), if there is no connection with the > >> > configured device. > >> > >> Looks like there's a function bus_delayed_attach_children designed > >> exactly for this: > >> * Many buses can't run transactions on the bus which children need > >> to probe and > >> * attach until after interrupts and/or timers are running. This > >> function > >> * delays their attach until interrupts and timers are enabled. > >> > >> and it looks like a couple controllers are already using it, imx_i2c > >> and ti_i2c... > >> > >> It looks like maybe a simple replace of bus_generic_attach w/ > >> bus_delayed_attach_children should be enough on those w/ > >> interrupts... > >> > >> Is there any argument for doing it for ALL controllers instead of > >> just > >> some? > >> > >> Poking around some, and it looks like some (one) drivers "pretend" to > >> use interrupts, but just busy wait instead, e.g. exynos5... > >> > > > > Hmm, yeah, it looks like more has been done along these lines than I > > remembered. In fact, the work may be done. > > > > Some i2c controllers have to work properly before interrupts are > > available, to control things like PMIC chips that are required very > > early in device configuration. Typically they have some sort of > > polling mechanism that's used early, and revert to using interrupts > > once they're available. The allwinner and rockchip drivers work that > > way. > > > > -- Ian > Just to dot the i's, my SoC is allwinner (Orange PI PC). And the issue > at boot time really showed itself up until config_intrhook was used. > FreeBSD myhost.mh.net.ru 13.0-CURRENT FreeBSD 13.0-CURRENT #3 r364004 What driver is used for i2c on the Orange? I've tried to firgure it out from dts + source, but it isn't clear. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-arm@freebsd.org Mon Aug 24 22:46:40 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C10163CF9B3; Mon, 24 Aug 2020 22:46:40 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb6gM2fXdz4N2b; Mon, 24 Aug 2020 22:46:38 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A40922601C6; Tue, 25 Aug 2020 00:46:27 +0200 (CEST) Subject: Re: Strange USB loop To: bob prohaska , freebsd-arm@freebsd.org, freebsd-current@freebsd.org References: <20200824163736.GA9845@www.zefox.net> From: Hans Petter Selasky Message-ID: <42038cfd-425c-c5cd-d3de-d3cace1ecd89@selasky.org> Date: Tue, 25 Aug 2020 00:46:01 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200824163736.GA9845@www.zefox.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bb6gM2fXdz4N2b X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-0.68 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_MEDIUM(-0.44)[-0.439]; NEURAL_SPAM_SHORT(0.06)[0.059]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm,freebsd-current]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 22:46:40 -0000 On 2020-08-24 18:37, bob prohaska wrote: > After updating to > FreeBSD 13.0-CURRENT (GENERIC) #5 r364475: Mon Aug 24 06:47:29 PDT 2020 > on a Pi3 it was necessary to disconnect the mouse, keyboard and usb-serial You are after: https://svnweb.freebsd.org/changeset/base/364433 You may want to try a kernel before: r364379 --HPS From owner-freebsd-arm@freebsd.org Tue Aug 25 05:02:59 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CC5F3BE03F; Tue, 25 Aug 2020 05:02:59 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbH1W64Mrz3ZZQ; Tue, 25 Aug 2020 05:02:55 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id 07P534sW011509 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 24 Aug 2020 22:03:05 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id 07P534co011508; Mon, 24 Aug 2020 22:03:04 -0700 (PDT) (envelope-from fbsd) Date: Mon, 24 Aug 2020 22:03:04 -0700 From: bob prohaska To: bob prohaska Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org Subject: Re: Strange USB loop Message-ID: <20200825050304.GA11333@www.zefox.net> References: <20200824163736.GA9845@www.zefox.net> <42038cfd-425c-c5cd-d3de-d3cace1ecd89@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42038cfd-425c-c5cd-d3de-d3cace1ecd89@selasky.org> X-Rspamd-Queue-Id: 4BbH1W64Mrz3ZZQ X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net X-Spamd-Result: default: False [2.96 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; WWW_DOT_DOMAIN(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.28)[0.284]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.78)[0.776]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm,freebsd-current]; MID_RHS_WWW(0.50)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 05:02:59 -0000 On Tue, Aug 25, 2020 at 12:46:01AM +0200, Hans Petter Selasky wrote: > On 2020-08-24 18:37, bob prohaska wrote: > > After updating to > > FreeBSD 13.0-CURRENT (GENERIC) #5 r364475: Mon Aug 24 06:47:29 PDT 2020 > > on a Pi3 it was necessary to disconnect the mouse, keyboard and usb-serial > > You are after: > > https://svnweb.freebsd.org/changeset/base/364433 > > You may want to try a kernel before: > > r364379 A kernel for FreeBSD 13.0-CURRENT (GENERIC) #6 r364378: Tue Aug 25 00:46:27 PDT 2020 compiled and installed without incident, but the problem persists. This time I plugged the keyboard into the hub and got a stream of uhub_reattach_port: giving up port reset - device vanished which didn't stop when the keyboard was removed. If the keyboard is moved to the Pi's internal USB connectors the keyboard is recognized and works, but the once-per-second "...device vanished" messages continue. Attempts to repeat this behavior were frustrating. After a few iterations the error message was triggered by plugging in an FTDI usb-serial adapter, but the messages stopped when it was unplugged. The hub is Bus /dev/usb Device /dev/ugen1.4: ID 05e3:0610 Genesys Logic, Inc. 4-port hub The disk adapter is Bus /dev/usb Device /dev/ugen1.5: ID 152d:1561 JMicron Technology Corp. / JMicron USA Technology Corp. JMS561U two ports SATA 6Gb/s bridge Are either of these known troublmakers? Thanks for reading! bob prohaska From owner-freebsd-arm@freebsd.org Tue Aug 25 06:20:15 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D61463C029F for ; Tue, 25 Aug 2020 06:20:15 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-21.consmr.mail.gq1.yahoo.com (sonic314-21.consmr.mail.gq1.yahoo.com [98.137.69.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbJkk2zzDz3f6c for ; Tue, 25 Aug 2020 06:20:14 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: Bj_tMPAVM1mtIgdF.JtgZm5JariYPLze7JV.H8AtJ2_dz8BiAR6mTX31o0fjNVm lTmXW6bZ4F53OPeKJ2aoOBl_0g3NghOBrwHoti_YZBIneXDNW3xoV8epc5.uMEXwsnW9uuJOTQWX q.OZTU5vtSCsaSguj79uF1JhRZdX_YH4lyvS8fYqoU6YNmCbNBcBCYTcT_9qpz_rniABYRF6bUZJ TTg9iUkeRJXWCof9jw7PW1KwvfHAuNgcSTrHodVK2MxiG3x22f0brzzicuGBGg6P6j6Cx0FwpDwU sTAbTrXJzfeoTf.qFvPwQfY1.n0ZPGTS5VIgt0ZLD_oIXuHCRne0LLLe4f1sp3UDKZP66mw7FyEf ug2tJ0rjr5diHEEAvWxyNd4ER0XXWLqSPVyl3mpadavn0aHFIX7GEvyB8t49tPl4u27fUxGkk6W_ 0cMJ8.dGUbOWymGIc8rZdRqS16hvZC0x5gyrUk0ppgczeH6fQpQMmVY5qmOkWcfCRgBskHhAzAne d6FQUgSnp5pYnkvhbkW27xamdC9uBhxwDiYxpohwCL9ymojcP6L5L5Fu24F30.M1GOgL5gOfETlT W_OaUfndykD9DrbryjGNa5k18H3egCyz1SINyodHg3917FKfuppUeFWult_DZJ3VzFZmm5M.nWOn rm7mAsNM31SvSUbDNmPyWAofxWZH3r.y6FBO7BmyP8K3oQmXCsybGqMhS8swWdJKpyxFOk5DKMEn M92zGG4QZJCwVbIGpAVfM.3Do1tqaSimNMJ2eP.hHCQV49_DGdeaCWWU_pNKnKqGoYlJ7JhwpL4e oDlqI1PFDrthBaxRpow5CvSZzzEU4i3zO0yQR6QQ7cxcwMG9DFIf4V9L8MgSoz5DxR6pLeZmLl0E kEFYtHOWxTYH9qi4qu3EcEy.Dpq_2GyDNjrn7jybVlkn31awTXrisIe1iRTt2ostq0NcpQBqhGvU pjw2WgBQuTFWLuy2gwrh9cbrm0O4yB6.QbCL1MTRVbrSBlowGfJjnP_sJeB2_8CIrhPd.rcTivjg cMel3XVhZ2E3p0bKPE587r.bpHVt6nqelIn2Zc_Pr4GbnSJDr2dgbjDQZ17eN5poI3B5AUndFWbd CXm.Key0VlCeGdWuGKf5A4.TBOOBZoZ5jz_9Eg1xXkLW.d.5SnaHMdOFn4j4AJt4C3qfFNK942l5 ED9WJYofMV03k_v0MH9C9h4oAzR7tybYdUXRF5J7HEF1EwuMaQmlH8wTcjFq.nCfzMTzJ_P.QAUh x5Cm6kbiPphOczpcrV8N1_LMGZhQEnlp.g6qfrgeeO1Hv_zOZ79otVh71QvtJ7Wc67qapTBCdxy0 A.uHJhblgo_fjr6k_XgabjFeNlUS2s01vrDdFDjONRIIFK6319CPqyz.hF4OaveN6ZFqZFTvMPIZ 6ylGHQ41iW5P.GI7Od8YqHcFqp77LD2llmFnx5p2Rqxg7TTi1jR6P5BJbrUD9Ed4OrDbGTpIDRT2 Z_QoRZ219vvIGEJu7.wy8Ilzp2vKU.wgLrXr4Fqed.kdgrG7KLMCue6zeewOkiHbhzJJ3hilWH7G LjmjQO9Y- Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Tue, 25 Aug 2020 06:20:12 +0000 Received: by smtp415.mail.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a4a113839fe61b1f91e42df0fc241ed7; Tue, 25 Aug 2020 06:20:12 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: An aarch64 4-core-SBC FreeBSD performance oddity: Rock64 and RPi4B examples Message-Id: <255626A7-8731-4849-A5FD-50CBFB1AA6DC@yahoo.com> Date: Mon, 24 Aug 2020 23:20:10 -0700 To: freebsd-arm X-Mailer: Apple Mail (2.3608.120.23.2.1) References: <255626A7-8731-4849-A5FD-50CBFB1AA6DC.ref@yahoo.com> X-Rspamd-Queue-Id: 4BbJkk2zzDz3f6c X-Spamd-Bar: - X-Spamd-Result: default: False [-1.33 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.963]; RCPT_COUNT_ONE(0.00)[1]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.84:from]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.84:from]; NEURAL_SPAM_SHORT(0.14)[0.136]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 06:20:15 -0000 The point here is more the systematic bias that might not be expected and might indicate something is not working as expected. (The performance details that suggest such are not directly the point but are the suggestive-evidence of some sort of bias in the implementation.) I have found that, under at least FreeBSD head -r363590 , it turns out that what pair of cpus (cores) are used for a 2 thread activity in the program I'm using affects the performance measurably and systematically (but not necessarily by a large amount). Basically when the cpu-pair involves cpu2 it goes slower than otherwise when in a context where memory caches help with performance. (Otherwise RAM slowness or thread creation time dominates the measurement involved.) But there are 3 contexts for this: A) The cpu pair does not involve cpu2. These perform similar to each other [relative to (B) and (C) below]. B) cpu2 is in use with one of cpu1 or cpu3. These are different from (A) for performance: slower. But the two (B) cases are similar to each other [relative to (A) and (C)]. C) cpu2 is in use with cpu0. This slower than both (A) and (B). This case also seems to have somewhat more variability in the performance compared to (A) and (B). The Rock64 and RPi4B have very different memory-subsystem performance-related-behavior overall but the above still applies to both as a summary. I've not seen such differences for, say, a RPi4B ubuntu context. I've not tested other example contexts. I limit the cpus/cores via cpuset use on the command line. I can build the program involved with or without it locking down each thread in the test to a distinct cpu/core within what cpuset is told to allow vs. allowing migration to occur between those cpus/cores. (No cpuset use would be needed for 4 cores for the example SBCs.) The effect is measurable both ways. I test both at the boot -s command prompt and for normal login command prompts. (Variations in competing activity, including for RAM cache use.) The effect is measurable both ways. I have tested two distinct RPi4B's but only have access to one Rock64. All 3 contexts show the general structure reported. As for graphs showing examples . . . In the graphs for the results the colored curves are the cpu-pair curves (green, blue, red). I provide dark grey for single-threaded and 4-core as context for comparison. If I have any 3 thread examples included for comparison: light grey. green: cpu pair does not involve cpu2 (fastest) red: cpu pair is cpu0 and cpu2 (slowest) blue: cpu pair involved cpu2 but not cpu0 (between) (The single-threaded curve(s) are the most different from the others on each SBC so they stand out.) I'll note that for the x-axis and multi-threaded, being to the left means thread creation is a larger fraction of the overall time for the size and that limits the y-axis figure for the size. (For multi-threaded, thread creations are part of what is measured for each size problem.) x-axis: logarithmic for "kernel vectors: total Bytes", base 4 (a computer oriented indication of the size of the problem) y-axis: linear for the type of speed figure A rock64 .png image of an example context's graph is at: = https://github.com/markmi/acpphint/blob/master/acpphint_example_data/Rock6= 4-cpu-pairs-oddity.png A RPi4B .png image of an example context's graph is at: (The y-axis range is different from Rock64's y-range.) = https://github.com/markmi/acpphint/blob/master/acpphint_example_data/RPi4B= -cpu-pairs-oddity.png For the RPi4B graph, there is a peak for each color and both sides of the peak show the issue, but more so on the left side. Notes: The program is a c++17 variant of some of the old HINT benchmarks. For reference for the data types involved in the graphed data: ull: unsigned long long (64 bits here) ul: unsigned long (also 64 bits here) So variations between the two give some idea of the degree of other sources of variability in the measurements (ull and ul are essentially equivalent). Without the cpu lock down code being built, the program is not system-specific c++17 code. But building with the cpu lock down code does add system-specific code (FreeBSD specific here). I build with g++ (even when using the system libc++ and such instead of g++'s libraries). This is because the program resulting happens to be more performant in any case that I've compared. Being more performant makes things easier to notice when checking for oddities. Other than building for comparisons to Linux that uses g++'s libraries, I use the FreeBSD libc++ and such because they are more performant at creating threads under FreeBSD (for example). Being more performant . . . =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-arm@freebsd.org Tue Aug 25 07:21:12 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 023A63C1EA8 for ; Tue, 25 Aug 2020 07:21:12 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbL526KbMz404N for ; Tue, 25 Aug 2020 07:21:10 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f169.google.com with SMTP id y2so12617446ljc.1 for ; Tue, 25 Aug 2020 00:21:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=cEOxprS33sJ71cckMdJoSPix82KIoapn7SRmXKx+2js=; b=BxmFvpKHZ7WbtAAbC7h0Q/SvhLzF75GqnnQD3qwD5RTE54AE3nt0LUEq2hRFoJkXFY EHPAaf1LnDLzinmP3tRjU7oXF8r85ValtOkt+P5Hy17E06ijFPHaaZx9OnEpZQLNLayh 2P4wd+VPmE7gm9dgq6P4j1SxcmDBlQEWG/zHeQ8RKbtXoVstIGhh92Na6Jxmi7ET5i/7 KHgciVnq87U8b7MWHy9HFRj48oS0OIe/OWtzHwdh+Dcthc5x7nskWk9VA9WXf1ZDyLuG hF+htGvR/RixW0u8Lpx9tvxFIi3SLnu4fsQvjGZpwRP6HMHAlXy8q3Ez+KcTTR5rduKY iVAg== X-Gm-Message-State: AOAM530AmAlNOfaTULub3N+nwipjuCRsMz09eaAX1GQsGa+pNBkUC0JT Y+jHGnhvUW8WHMBB/g6tpHajqpVFJBw= X-Google-Smtp-Source: ABdhPJyYY9C6njqV7k0xYGpmglY5tqbnpEG/L6l0ZuIcvtC72TqARPspjHExSOgS4zzfcpURrq27Tg== X-Received: by 2002:a05:651c:233:: with SMTP id z19mr4464782ljn.347.1598340068746; Tue, 25 Aug 2020 00:21:08 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id h19sm52058lfp.39.2020.08.25.00.21.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Aug 2020 00:21:07 -0700 (PDT) Subject: Re: Kmod driver at iicbus. attach() and config_intrhook(9) To: freebsd-arm@freebsd.org References: <7fabb65d99aaa74775c1daa91bffb873@mh.net.ru> <3249fa7e-554a-83ef-57b2-7c38aa0b4591@FreeBSD.org> <20200819072409.GA59949@bluezbox.com> <05145b71692af74b103bb226a2e93a15e1e851cb.camel@freebsd.org> <20200820223918.GC4213@funkthat.com> <496ed13afb2327d6416664b4dacfc346@mh.net.ru> <20200824204708.GH4213@funkthat.com> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= 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 Message-ID: <6be8abd0-185c-dbbb-5964-1e2ad92ad213@FreeBSD.org> Date: Tue, 25 Aug 2020 10:21:06 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200824204708.GH4213@funkthat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BbL526KbMz404N X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.169 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [0.23 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TO_DOM_EQ_FROM_DOM(0.00)[]; NEURAL_HAM_MEDIUM(-0.11)[-0.109]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.34)[0.335]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[FreeBSD.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.169:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.169:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 07:21:12 -0000 On 24/08/2020 23:47, John-Mark Gurney wrote: > What driver is used for i2c on the Orange? I've tried to firgure it > out from dts + source, but it isn't clear. a10_twsi -- Andriy Gapon From owner-freebsd-arm@freebsd.org Tue Aug 25 07:42:19 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD0A23C23CF; Tue, 25 Aug 2020 07:42:19 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbLYQ4L80z418j; Tue, 25 Aug 2020 07:42:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 8761A260433; Tue, 25 Aug 2020 09:42:07 +0200 (CEST) Subject: Re: Strange USB loop To: bob prohaska Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org References: <20200824163736.GA9845@www.zefox.net> <42038cfd-425c-c5cd-d3de-d3cace1ecd89@selasky.org> <20200825050304.GA11333@www.zefox.net> From: Hans Petter Selasky Message-ID: <8be06d6f-9837-cde6-1878-a25e84656d84@selasky.org> Date: Tue, 25 Aug 2020 09:41:41 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200825050304.GA11333@www.zefox.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BbLYQ4L80z418j X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-0.44 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_MEDIUM(-0.43)[-0.430]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.29)[0.287]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm,freebsd-current] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 07:42:19 -0000 On 2020-08-25 07:03, bob prohaska wrote: > On Tue, Aug 25, 2020 at 12:46:01AM +0200, Hans Petter Selasky wrote: >> On 2020-08-24 18:37, bob prohaska wrote: >>> After updating to >>> FreeBSD 13.0-CURRENT (GENERIC) #5 r364475: Mon Aug 24 06:47:29 PDT 2020 >>> on a Pi3 it was necessary to disconnect the mouse, keyboard and usb-serial >> >> You are after: >> >> https://svnweb.freebsd.org/changeset/base/364433 >> >> You may want to try a kernel before: >> >> r364379 Can you try r364346 ? > A kernel for > FreeBSD 13.0-CURRENT (GENERIC) #6 r364378: Tue Aug 25 00:46:27 PDT 2020 > compiled and installed without incident, but the problem persists. This > time I plugged the keyboard into the hub and got a stream of > uhub_reattach_port: giving up port reset - device vanished > which didn't stop when the keyboard was removed. If the keyboard is > moved to the Pi's internal USB connectors the keyboard is recognized > and works, but the once-per-second "...device vanished" messages continue. > > Attempts to repeat this behavior were frustrating. After a few iterations > the error message was triggered by plugging in an FTDI usb-serial adapter, > but the messages stopped when it was unplugged. > > The hub is > Bus /dev/usb Device /dev/ugen1.4: ID 05e3:0610 Genesys Logic, Inc. 4-port hub > > The disk adapter is > Bus /dev/usb Device /dev/ugen1.5: ID 152d:1561 JMicron Technology Corp. / JMicron USA Technology Corp. JMS561U two ports SATA 6Gb/s bridge > > Are either of these known troublmakers? --HPS From owner-freebsd-arm@freebsd.org Tue Aug 25 17:37:33 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A607E3B3084 for ; Tue, 25 Aug 2020 17:37:33 +0000 (UTC) (envelope-from mishin@mh.net.ru) Received: from frog.mh.net.ru (mh.balakovo.san.ru [88.147.158.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbbmD1Jbyz3Vhd for ; Tue, 25 Aug 2020 17:37:30 +0000 (UTC) (envelope-from mishin@mh.net.ru) Received: from webmail.mh.net.ru (mouse.home [192.168.5.6]) by frog.mh.net.ru (Postfix) with ESMTPSA id E18C38E75 for ; Tue, 25 Aug 2020 21:37:21 +0400 (+04) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 25 Aug 2020 21:37:21 +0400 From: Alexander Mishin To: freebsd-arm@freebsd.org Subject: Boot issue with orange pi pc User-Agent: Roundcube Webmail/1.4.2 Message-ID: <52ea831ec34ebc0dc00292ac5e1c3894@mh.net.ru> X-Sender: mishin@mh.net.ru X-Rspamd-Queue-Id: 4BbbmD1Jbyz3Vhd X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=mh.net.ru (policy=none); spf=fail (mx1.freebsd.org: domain of mishin@mh.net.ru does not designate 88.147.158.22 as permitted sender) smtp.mailfrom=mishin@mh.net.ru X-Spamd-Result: default: False [1.79 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_FAIL(1.00)[-all]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.31)[0.305]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_MEDIUM(0.49)[0.486]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12389, ipnet:88.147.128.0/17, country:RU]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm]; DMARC_POLICY_SOFTFAIL(0.10)[mh.net.ru : No valid SPF, No valid DKIM,none] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 17:37:33 -0000 After a last friday's update my OrangePI-PC stop booting. Where to look? Fdt overlay to set the clock for mmc0? Here's how it ended in the console: ---- skipped ---- Trying to mount root from ufs:/dev/ufs/rootfs [rw,noatime]... uhub4 on usbus5 uhub5 on usbus1 uhub4: on usbus5 uhub5: on usbus1 Root mount waiting for:ugen6.1: at usbus6 ugen7.1: at usbus7 uhub6 usbus0 on usbus6 usbus1uhub7 usbus2 on usbus7 usbus3uhub6: on usbus6 usbus4uhub7: on usbus7 usbus5 usbus6 usbus7 uhub0: 1 port with 1 removable, self powered uhub4: 1 port with 1 removable, self powered uhub5: 1 port with 1 removable, self powered uhub7: 1 port with 1 removable, self powered mmc0: on aw_mmc0 Cannot set frequency for clk: mmc0, error: 34 aw_mmc0: failed to set frequency to 50000000 Hz: 34 uhub2: 1 port with 1 removable, self powered uhub1: 1 port with 1 removable, self powered uhub3: 1 port with 1 removable, self powered uhub6: 1 port with 1 removable, self powered mountroot: waiting for device /dev/ufs/rootfs... Mounting from ufs:/dev/ufs/rootfs failed with error 19. Loader variables: vfs.root.mountfrom=ufs:/dev/ufs/rootfs vfs.root.mountfrom.options=rw,noatime Manual root filesystem specification: : [options] Mount using filesystem and with the specified (optional) option list. eg. ufs:/dev/da0s1a zfs:zroot/ROOT/default cd9660:/dev/cd0 ro (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) ? List valid disk boot devices . Yield 1 second (for background tasks) Abort manual input mountroot> aw_mmc0: controller timeout aw_mmc0: timeout resetting DMA/FIFO aw_mmc0: timeout updating clock aw_mmc0: controller timeout aw_mmc0: timeout resetting DMA/FIFO aw_mmc0: timeout updating clock aw_mmc0: controller timeout aw_mmc0: timeout resetting DMA/FIFO From owner-freebsd-arm@freebsd.org Tue Aug 25 18:15:37 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 865DE3B5263 for ; Tue, 25 Aug 2020 18:15:37 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbcc76YV4z3ZRB for ; Tue, 25 Aug 2020 18:15:35 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1598379328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7eRjpKKlagUuwoy7P7poeVFne6++RS8nhJGoXp15aOU=; b=fV6eAu/L6v+bwzjaFkxC6s298CV2sJpTdTHn/7U1iLr6jr5pTZs0TSF8qLNxlABZdcphHk EU5RruKhIaXJuKJVTwGTyBoy5WFayeEoEfw2Kj7t8dJCGuyrYuMKTM4JrPc1pQoYWUCAoF +MBWTcNV9YXr6kNZYn1VuYuKFs3ZzI0= Received: from amy.home (lfbn-idf2-1-1138-237.w90-92.abo.wanadoo.fr [90.92.20.237]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 7d089a7c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 25 Aug 2020 18:15:27 +0000 (UTC) Date: Tue, 25 Aug 2020 20:15:27 +0200 From: Emmanuel Vadot To: Alexander Mishin Cc: freebsd-arm@freebsd.org Subject: Re: Boot issue with orange pi pc Message-Id: <20200825201527.66c8385ca691657038e425a9@bidouilliste.com> In-Reply-To: <52ea831ec34ebc0dc00292ac5e1c3894@mh.net.ru> References: <52ea831ec34ebc0dc00292ac5e1c3894@mh.net.ru> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bbcc76YV4z3ZRB X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=fV6eAu/L; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-1.58 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; FREEFALL_USER(0.00)[manu]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+mx]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-0.10)[-0.102]; NEURAL_HAM_MEDIUM(-0.98)[-0.979]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 18:15:37 -0000 On Tue, 25 Aug 2020 21:37:21 +0400 Alexander Mishin wrote: > After a last friday's update my OrangePI-PC stop booting. > Where to look? Fdt overlay to set the clock for mmc0? > > Here's how it ended in the console: > > ---- skipped ---- > Trying to mount root from ufs:/dev/ufs/rootfs [rw,noatime]... > uhub4 on usbus5 > uhub5 on usbus1 > uhub4: on > usbus5 > uhub5: on > usbus1 > Root mount waiting for:ugen6.1: at usbus6 > ugen7.1: at usbus7 > uhub6 usbus0 on usbus6 > usbus1uhub7 usbus2 on usbus7 > usbus3uhub6: > on usbus6 > usbus4uhub7: > on usbus7 > usbus5 usbus6 usbus7 > uhub0: 1 port with 1 removable, self powered > uhub4: 1 port with 1 removable, self powered > uhub5: 1 port with 1 removable, self powered > uhub7: 1 port with 1 removable, self powered > mmc0: on aw_mmc0 > Cannot set frequency for clk: mmc0, error: 34 > aw_mmc0: failed to set frequency to 50000000 Hz: 34 > uhub2: 1 port with 1 removable, self powered > uhub1: 1 port with 1 removable, self powered > uhub3: 1 port with 1 removable, self powered > uhub6: 1 port with 1 removable, self powered > mountroot: waiting for device /dev/ufs/rootfs... > Mounting from ufs:/dev/ufs/rootfs failed with error 19. > > Loader variables: > vfs.root.mountfrom=ufs:/dev/ufs/rootfs > vfs.root.mountfrom.options=rw,noatime > > Manual root filesystem specification: > : [options] > Mount using filesystem > and with the specified (optional) option list. > > eg. ufs:/dev/da0s1a > zfs:zroot/ROOT/default > cd9660:/dev/cd0 ro > (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) > > ? List valid disk boot devices > . Yield 1 second (for background tasks) > Abort manual input > > mountroot> aw_mmc0: controller timeout > aw_mmc0: timeout resetting DMA/FIFO > aw_mmc0: timeout updating clock > aw_mmc0: controller timeout > aw_mmc0: timeout resetting DMA/FIFO > aw_mmc0: timeout updating clock > aw_mmc0: controller timeout > aw_mmc0: timeout resetting DMA/FIFO What version of FreeBSD ? What revision ? Could you test the GENERICSD image (you just need to add your u-boot). I'll try to find time this week to test myself on H3 board. Thanks. > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" -- Emmanuel Vadot From owner-freebsd-arm@freebsd.org Tue Aug 25 18:29:16 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 152E93B5D74; Tue, 25 Aug 2020 18:29:16 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbcvv00Qkz3br0; Tue, 25 Aug 2020 18:29:14 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id 07PITHl3014175 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 25 Aug 2020 11:29:17 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id 07PITGqe014174; Tue, 25 Aug 2020 11:29:16 -0700 (PDT) (envelope-from fbsd) Date: Tue, 25 Aug 2020 11:29:16 -0700 From: bob prohaska To: Hans Petter Selasky , bob prohaska Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org Subject: Re: Strange USB loop Message-ID: <20200825182916.GA14015@www.zefox.net> References: <20200824163736.GA9845@www.zefox.net> <42038cfd-425c-c5cd-d3de-d3cace1ecd89@selasky.org> <20200825050304.GA11333@www.zefox.net> <8be06d6f-9837-cde6-1878-a25e84656d84@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8be06d6f-9837-cde6-1878-a25e84656d84@selasky.org> X-Rspamd-Queue-Id: 4Bbcvv00Qkz3br0 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net X-Spamd-Result: default: False [3.49 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; WWW_DOT_DOMAIN(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.71)[0.713]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.88)[0.875]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm,freebsd-current]; MID_RHS_WWW(0.50)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 18:29:16 -0000 On Tue, Aug 25, 2020 at 09:41:41AM +0200, Hans Petter Selasky wrote: > > Can you try r364346 ? > The kernel compiled and installed without trouble. After running run bootcmd_usb0 the machine loaded the kernel, but stopped at the loader prompt. The keyboard was connected direct to the Pi, the mouse was disconnected. It isn't obvious why it stopped at the loader prompt. lsdev reports disk devices: disk0: 250085377 X 512 blocks (removable) disk0s1: DOS/Windows disk0s2: FreeBSD disk0s2a: FreeBSD UFS disk0s2b: FreeBSD swap disk1: 1953525169 X 512 blocks disk1s1: DOS/Windows disk1s2: FreeBSD disk1s2a: FreeBSD UFS disk1s2b: FreeBSD swap http: (unknown) net devices: net0: OK Disk0 is the (bootable) microSD, disk1 is the hard drive. Boot -s came up single-user, with / mounted from /dev/da0s2a as desired. Fsck reported the filesystem clean. Exit to multi-user worked. The USB system keyboard (plugged into the Pi) worked. The mouse (plugged into the hub after boot) also worked. A second reboot with the mouse connected via the hub worked without pausing at the loader prompt. Plugging the FTDI FT232 adapter into the hub triggered a round of uhub_reattach_port: giving up port reset - device vanished messages, but this time they stopped when I pulled the FT232. Plugging the FT232 directly into the Pi caused normal recognition. It looks as if the FT232 somehow interferes with disk discovery. A reboot with USB disk & mouse in the hub but keyboard and FT232 in the Pi again resulted in a mountroot failure, along with a few other error messages: uhub2: MTT enabled Root mount waiting for: usbus1 CAM uhub2: 4 ports with 4 removable, self powered Root mount waiting for: usbus1 CAM usb_alloc_device: set address 7 failed (USB_ERR_IOERROR, ignored) Root mount waiting for: usbus1 CAM Root mount waiting for: usbus1 CAM usbd_setup_device_desc: getting device descriptor at addr 7 failed, USB_ERR_IOERROR usbd_req_re_enumerate: addr=7, set address failed! (USB_ERR_IOERROR, ignored) Root mount waiting for: usbus1 CAM Root mount waiting for: usbus1 CAM usbd_setup_device_desc: getting device descriptor at addr 7 failed, USB_ERR_IOERROR Root mount waiting for: usbus1 CAM usbd_req_re_enumerate: addr=7, port reset failed, USB_ERR_IOERROR usbd_req_re_enumerate: addr=7, port reset failed, USB_ERR_IOERROR Root mount waiting for: usbus1 CAM usbd_req_re_enumerate: addr=7, port reset failed, USB_ERR_IOERROR ugen1.7: at usbus1 (disconnected) uhub_reattach_port: could not allocate new device Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Mounting from ufs:/dev/da0s2a failed with error 2; retrying for 3 more seconds Mounting from ufs:/dev/da0s2a failed with error 2. Loader variables: vfs.root.mountfrom=ufs:/dev/da0s2a vfs.root.mountfrom.options=rw With the FT232 unplugged the machine came up normally. With a _different_ FT232 plugged in it also came up normally. Both are thought to be genuine, but they are of different age and produce different recognition messages: The FT232 that causes trouble reports ugen1.4: at usbus1 uftdi0 on uhub1 uftdi0: on usbus1 The one that seems to work is newer and reports ugen1.4: at usbus1 uftdi0 on uhub1 uftdi0: on usbus1 On balance I think the new kernel is better-behaved. Beyond that I'm at a loss. If you can suggest other things to try please do. Thanks for all your help, bob prohaska From owner-freebsd-arm@freebsd.org Tue Aug 25 18:37:30 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 992F63B6275 for ; Tue, 25 Aug 2020 18:37:30 +0000 (UTC) (envelope-from mishin@mh.net.ru) Received: from frog.mh.net.ru (mh.balakovo.san.ru [88.147.158.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbd5P4ZYWz3crn for ; Tue, 25 Aug 2020 18:37:29 +0000 (UTC) (envelope-from mishin@mh.net.ru) Received: from webmail.mh.net.ru (mouse.home [192.168.5.6]) by frog.mh.net.ru (Postfix) with ESMTPSA id 088548F88 for ; Tue, 25 Aug 2020 22:37:25 +0400 (+04) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 25 Aug 2020 22:37:25 +0400 From: Alexander Mishin To: freebsd-arm@freebsd.org Subject: Re: Boot issue with orange pi pc In-Reply-To: References: <52ea831ec34ebc0dc00292ac5e1c3894@mh.net.ru> <20200825201527.66c8385ca691657038e425a9@bidouilliste.com> User-Agent: Roundcube Webmail/1.4.2 Message-ID: X-Sender: mishin@mh.net.ru X-Rspamd-Queue-Id: 4Bbd5P4ZYWz3crn X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=mh.net.ru (policy=none); spf=fail (mx1.freebsd.org: domain of mishin@mh.net.ru does not designate 88.147.158.22 as permitted sender) smtp.mailfrom=mishin@mh.net.ru X-Spamd-Result: default: False [2.17 / 15.00]; ARC_NA(0.00)[]; R_SPF_FAIL(1.00)[-all:c]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_MEDIUM(0.45)[0.455]; RCPT_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_SPAM_SHORT(0.72)[0.718]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12389, ipnet:88.147.128.0/17, country:RU]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm]; DMARC_POLICY_SOFTFAIL(0.10)[mh.net.ru : No valid SPF, No valid DKIM,none] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 18:37:30 -0000 Emmanuel Vadot писал 2020-08-25 22:15: > On Tue, 25 Aug 2020 21:37:21 +0400 > Alexander Mishin wrote: > >> After a last friday's update my OrangePI-PC stop booting. >> Where to look? Fdt overlay to set the clock for mmc0? >> >> Here's how it ended in the console: >> >> ---- skipped ---- >> mountroot: waiting for device /dev/ufs/rootfs... >> Mounting from ufs:/dev/ufs/rootfs failed with error 19. >> >> Loader variables: >> vfs.root.mountfrom=ufs:/dev/ufs/rootfs >> vfs.root.mountfrom.options=rw,noatime >> >> Manual root filesystem specification: >> : [options] >> Mount using filesystem >> and with the specified (optional) option list. >> >> eg. ufs:/dev/da0s1a >> zfs:zroot/ROOT/default >> cd9660:/dev/cd0 ro >> (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) >> >> ? List valid disk boot devices >> . Yield 1 second (for background tasks) >> Abort manual input >> >> mountroot> aw_mmc0: controller timeout >> aw_mmc0: timeout resetting DMA/FIFO >> aw_mmc0: timeout updating clock >> aw_mmc0: controller timeout > > What version of FreeBSD ? > What revision ? > > Could you test the GENERICSD image (you just need to add your u-boot). > > I'll try to find time this week to test myself on H3 board. > Thank You I'll try GENERICSD right now. Here is some information about the version Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel].................. /boot/dtb/sun8i-h3-orangepi-pc.dtb size=0x74b2 Loaded DTB from file 'sun8i-h3-orangepi-pc.dtb'. Kernel entry at 0x42400200... Kernel args: (null) ---<>--- KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2020 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 13.0-CURRENT #3 r364756: Tue Aug 25 17:25:00 +04 2020 root@amd64host.mh.net.ru:/usr/obj/usr/src/arm.armv7/sys/OPI_PC arm FreeBSD clang version 11.0.0 (git@github.com:llvm/llvm-project.git llvmorg-11.0.0-rc1-47-gff47911ddfc) From owner-freebsd-arm@freebsd.org Tue Aug 25 19:39:57 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A56B3B8421 for ; Tue, 25 Aug 2020 19:39:57 +0000 (UTC) (envelope-from mishin@mh.net.ru) Received: from frog.mh.net.ru (mh.balakovo.san.ru [88.147.158.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbfTR0gWWz40pH for ; Tue, 25 Aug 2020 19:39:53 +0000 (UTC) (envelope-from mishin@mh.net.ru) Received: from webmail.mh.net.ru (mouse.home [192.168.5.6]) by frog.mh.net.ru (Postfix) with ESMTPSA id 0A99F8D7D for ; Tue, 25 Aug 2020 23:39:51 +0400 (+04) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 25 Aug 2020 23:39:50 +0400 From: Alexander Mishin To: freebsd-arm@freebsd.org Subject: Re: Boot issue with orange pi pc In-Reply-To: <20200825201527.66c8385ca691657038e425a9@bidouilliste.com> References: <52ea831ec34ebc0dc00292ac5e1c3894@mh.net.ru> <20200825201527.66c8385ca691657038e425a9@bidouilliste.com> User-Agent: Roundcube Webmail/1.4.2 Message-ID: <38a79281f5d1db3c804da2062623d18f@mh.net.ru> X-Sender: mishin@mh.net.ru X-Rspamd-Queue-Id: 4BbfTR0gWWz40pH X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=mh.net.ru (policy=none); spf=fail (mx1.freebsd.org: domain of mishin@mh.net.ru does not designate 88.147.158.22 as permitted sender) smtp.mailfrom=mishin@mh.net.ru X-Spamd-Result: default: False [1.80 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_FAIL(1.00)[-all]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.35)[0.351]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; NEURAL_SPAM_MEDIUM(0.45)[0.453]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12389, ipnet:88.147.128.0/17, country:RU]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm]; DMARC_POLICY_SOFTFAIL(0.10)[mh.net.ru : No valid SPF, No valid DKIM,none] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 19:39:57 -0000 Emmanuel Vadot писал 2020-08-25 22:15: > On Tue, 25 Aug 2020 21:37:21 +0400 > Alexander Mishin wrote: > >> After a last friday's update my OrangePI-PC stop booting. >> Where to look? Fdt overlay to set the clock for mmc0? >> >> Here's how it ended in the console: >> >> ---- skipped ---- >> Trying to mount root from ufs:/dev/ufs/rootfs [rw,noatime]... >> uhub4 on usbus5 >> uhub5 on usbus1 >> uhub4: on >> usbus5 >> uhub5: on >> usbus1 >> Root mount waiting for:ugen6.1: at usbus6 >> ugen7.1: at usbus7 >> uhub6 usbus0 on usbus6 >> usbus1uhub7 usbus2 on usbus7 >> usbus3uhub6: > 1> >> on usbus6 >> usbus4uhub7: > 1> >> on usbus7 >> usbus5 usbus6 usbus7 >> uhub0: 1 port with 1 removable, self powered >> uhub4: 1 port with 1 removable, self powered >> uhub5: 1 port with 1 removable, self powered >> uhub7: 1 port with 1 removable, self powered >> mmc0: on aw_mmc0 >> Cannot set frequency for clk: mmc0, error: 34 >> aw_mmc0: failed to set frequency to 50000000 Hz: 34 >> uhub2: 1 port with 1 removable, self powered >> uhub1: 1 port with 1 removable, self powered >> uhub3: 1 port with 1 removable, self powered >> uhub6: 1 port with 1 removable, self powered >> mountroot: waiting for device /dev/ufs/rootfs... >> Mounting from ufs:/dev/ufs/rootfs failed with error 19. >> >> Loader variables: >> vfs.root.mountfrom=ufs:/dev/ufs/rootfs >> vfs.root.mountfrom.options=rw,noatime >> >> Manual root filesystem specification: >> : [options] >> Mount using filesystem >> and with the specified (optional) option list. >> >> eg. ufs:/dev/da0s1a >> zfs:zroot/ROOT/default >> cd9660:/dev/cd0 ro >> (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) >> >> ? List valid disk boot devices >> . Yield 1 second (for background tasks) >> Abort manual input >> >> mountroot> aw_mmc0: controller timeout >> aw_mmc0: timeout resetting DMA/FIFO >> aw_mmc0: timeout updating clock >> aw_mmc0: controller timeout > > What version of FreeBSD ? > What revision ? > > Could you test the GENERICSD image (you just need to add your u-boot). > > I'll try to find time this week to test myself on H3 board. > I found only image from 13 Aug and it works just fine. It would be nice to try a new image. There is a result: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 13.0-CURRENT #0 r364182: Thu Aug 13 06:32:19 UTC 2020 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm.armv7/sys/GENERIC arm FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2) ---- skipped ----- Trying to mount root from ufs:/dev/ufs/rootfs [rw]... ugen4.1: at usbus4 uhub2Root mount waiting for: on usbus6 usbus0uhub3 usbus1 on usbus4 usbus2uhub2: on usbus6 usbus3uhub4 usbus4 on usbus2 usbus5uhub3: on usbus4 usbus6uhub4: on usbus2 usbus7ugen5.1: at usbus5 ugen3.1: at usbus3 uhub5 CAM on usbus5 uhub6 on usbus3 uhub5: on usbus5 uhub6: on usbus3 ugen7.1: at usbus7 uhub7 on usbus7 uhub7: on usbus7 uhub1: 1 port with 1 removable, self powered uhub6: 1 port with 1 removable, self powered uhub5: 1 port with 1 removable, self powered uhub7: 1 port with 1 removable, self powered mmc0: on aw_mmc0 mmcsd0: 31GB at mmc0 50.0MHz/4bit/32768-block mmc0: Failed to set VCCQ for card at relative address 4660 uhub0: 1 port with 1 removable, self powered uhub2: 1 port with 1 removable, self powered uhub3: 1 port with 1 removable, self powered uhub4: 1 port with 1 removable, self powered mountroot: waiting for device /dev/ufs/rootfs... Setting hostuuid: d006031e-f668-11de-bc76-6bb4fd8509a3. Setting hostid: 0xf64aaef0. No suitable dump device was found. Starting file system checks: /dev/ufs/rootfs: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ufs/rootfs: clean, 6795243 free (259 frags, 849373 blocks, 0.0% fragmentation) Mounting local filesystems:. ---- skipped ---- Thanks From owner-freebsd-arm@freebsd.org Tue Aug 25 20:33:22 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8DB103BB080 for ; Tue, 25 Aug 2020 20:33:22 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbgg54psqz45v9; Tue, 25 Aug 2020 20:33:21 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id 07PKXDwM085556 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 25 Aug 2020 13:33:13 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id 07PKXDKY085555; Tue, 25 Aug 2020 13:33:13 -0700 (PDT) (envelope-from jmg) Date: Tue, 25 Aug 2020 13:33:13 -0700 From: John-Mark Gurney To: Andriy Gapon Cc: freebsd-arm@freebsd.org Subject: Re: Kmod driver at iicbus. attach() and config_intrhook(9) Message-ID: <20200825203313.GJ4213@funkthat.com> Mail-Followup-To: Andriy Gapon , freebsd-arm@freebsd.org References: <7fabb65d99aaa74775c1daa91bffb873@mh.net.ru> <3249fa7e-554a-83ef-57b2-7c38aa0b4591@FreeBSD.org> <20200819072409.GA59949@bluezbox.com> <05145b71692af74b103bb226a2e93a15e1e851cb.camel@freebsd.org> <20200820223918.GC4213@funkthat.com> <496ed13afb2327d6416664b4dacfc346@mh.net.ru> <20200824204708.GH4213@funkthat.com> <6be8abd0-185c-dbbb-5964-1e2ad92ad213@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6be8abd0-185c-dbbb-5964-1e2ad92ad213@FreeBSD.org> X-Operating-System: FreeBSD 11.3-STABLE amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Tue, 25 Aug 2020 13:33:13 -0700 (PDT) X-Rspamd-Queue-Id: 4Bbgg54psqz45v9 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of jmg@gold.funkthat.com has no SPF policy when checking 208.87.223.18) smtp.mailfrom=jmg@gold.funkthat.com X-Spamd-Result: default: False [0.92 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[jmg]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[funkthat.com]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.74)[0.740]; NEURAL_HAM_SHORT(-1.02)[-1.023]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[jmg@funkthat.com,jmg@gold.funkthat.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:32354, ipnet:208.87.216.0/21, country:US]; FROM_NEQ_ENVFROM(0.00)[jmg@funkthat.com,jmg@gold.funkthat.com]; MAILMAN_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 20:33:22 -0000 Andriy Gapon wrote this message on Tue, Aug 25, 2020 at 10:21 +0300: > On 24/08/2020 23:47, John-Mark Gurney wrote: > > What driver is used for i2c on the Orange? I've tried to firgure it > > out from dts + source, but it isn't clear. > > a10_twsi Thanks. And this explains why I couldn't find it in arm/allwinner.. :) Yeah, this is using bus_generic_attach... But it looks like it supports interruptless operation. Is there a flag for when interrupts are enabled? Because the check in sys/dev/iicbus/twsi/twsi.c:twsi_transfer could be changed from: if (sc->have_intr == false) to: if (sc->have_intr == false || interrupts_not_enabled) And that could fix things. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-arm@freebsd.org Wed Aug 26 03:56:33 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC6913C7BFC for ; Wed, 26 Aug 2020 03:56:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-8.consmr.mail.gq1.yahoo.com (sonic308-8.consmr.mail.gq1.yahoo.com [98.137.68.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbsVS5kC0z4cBc for ; Wed, 26 Aug 2020 03:56:32 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 9JyyGisVM1mwA1dmmQ3lI4YHsQBSiXk5VVUevjA3wenF1GzYpl1WtuYIKH9Pca3 YnuKtKqqFiAMDmKidFmmjuC9lPbG6SfXoSsMwqLb.33NPrDz0FEZUg3gi2D5h.bQqb.W4MNiLUk3 Xb02P9lft8OVHSXONowk.tZfrpLS4AboTIvKPbxmuzGLuuEEW1BsfaqBJR.KZr0SwAiMrHgzx2lz Ya_.uIRM6OfwY5nJeFebvtazgNabXsfRi1LoWxn5fWtCygnnoP4Hq8CrkXCHwYCYAFokhG7AS0y3 S9Gjm2GWGegbz4UpXGAph7HKk.xKMzM8yn7Zp6zZpab6sXN2hFiqAGBTolK63teNf0p9UpuB0mz0 HpYeZom0vw_RXeLP2wd6Ef81tJYRJrQU5an.D0SR9vtdait5mUSX3Dz3aUTYhd76JsQvfxjEgkO3 pPsltgsaMEe0Mdfi3NZnxC8TpdsO2h7qzOwArLxbhGGiEeW9nSnVBph9mUYlbc0zEZhs6KDGZU8j e.mrVHdL9OtBYrGPc3iXXcrI_bsrN0VbKTpefIPxPNUFd2suCr91zdOX707F2aJrJkq_0iwE.Pzq azNPBm.X34U_GzyqSj2oxeyB5hB8w_Mzqyviaruihu0Icr7ys5OA6I.dQhsCMcArMskWoIZCw9Hw T29o7yPagk_Gj4ZFUY8Jp8ytShzbOOWvL1NpuBuzvVu4941YFb6DKqwK24BDj4JQUuyH.IrkAulb XhilWhm3H9qUujxokExKOE_SrLatZc7cssSsGtqVwo0VN3zFR2S3tC3Mbn9Pdxj_CgFs3H4xHKx9 6qwzo7oskSVU6PnhhyIXxu7ZIsl1bjTVXVXNnov04iwC.q3GyCQHWWX9LVAJARXRQ7R9g7v1jlM_ IjzlOfnljKK95DSfUQ7atucdpHdx2hn252NmnZqjf_CZzzMLRQEa2ge_WbAlZFBYpvoFsuzfoRHu RlHjMG4VvbxZOEUNdEmnSz10xC8o0YezgKVUWFnx9lSMecs2F3TkntX9UQA4KyItNlA8mRyLL4Sz S1lP.Lpb3U5.ZTBNqm9ZeFJJ.hJ.WHVoTAAcJV6SYeZJ6izauB6xG0Pwik.tMnIWykscYZ_FJfpQ 5kqssIsJckV6ANGr8PDcEXrEA66dWQ_iYEM_lrzMlVlwLvEDOOFq8oGARw4A3dhIBfekUdtYX4Nh 3bZagBlZWoeX4FppGNW638h1ZyoUXnvsYE0e4O0vZWxFOqEl6LIxPHzDjlrly60sLt3D8rSj8_y6 OpRyrmmlMlKU2fn8cuOqB2ZspgztrhjE223r74ESCLkmULjLCxNcjNZRI87ukimp1yNjamgLs2NR ncxT52kVZD2JkoQD4n1._OSwugcCa5Uj8Mmmc6LA0HamG6dF1JergFf8_EkcyJvNWaL8pX_gP2cx XwVvgvh9RjF9XbmDOkyfm5FSolbo_7uXcgLwSTPPXF3.TVZljoESqFEolNZWYJEve4.4zRQ4heLU zhcp7yqSxtuwrxLAus_CZ0Pvb_rueVXGDcffAKjBAedRaQwSVMO7Hu2Yy6MMTzNC2lZB9F64I_jo UBsEjjA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.gq1.yahoo.com with HTTP; Wed, 26 Aug 2020 03:56:31 +0000 Received: by smtp415.mail.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 180b242926136cb59f388711a948e363; Wed, 26 Aug 2020 03:56:16 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: An aarch64 4-core-SBC FreeBSD performance oddity: Rock64 and RPi4B examples Date: Tue, 25 Aug 2020 20:56:14 -0700 References: <255626A7-8731-4849-A5FD-50CBFB1AA6DC@yahoo.com> To: freebsd-arm In-Reply-To: <255626A7-8731-4849-A5FD-50CBFB1AA6DC@yahoo.com> Message-Id: <469834B7-6547-4BF4-B9A9-94D59DA3B289@yahoo.com> X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4BbsVS5kC0z4cBc X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.44 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.49)[-0.488]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.69)[-0.688]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.77)[-0.768]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.32:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.32:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2020 03:56:33 -0000 On 2020-Aug-24, at 23:20, Mark Millard wrote: > The point here is more the systematic bias that might not be > expected and might indicate something is not working as expected. > (The performance details that suggest such are not directly > the point but are the suggestive-evidence of some sort of > bias in the implementation.) >=20 > I have found that, under at least FreeBSD head -r363590 , it turns > out that what pair of cpus (cores) are used for a 2 thread activity > in the program I'm using affects the performance measurably and > systematically (but not necessarily by a large amount). >=20 > Basically when the cpu-pair involves cpu2 it goes slower than > otherwise when in a context where memory caches help with > performance. (Otherwise RAM slowness or thread creation time > dominates the measurement involved.) But there are 3 contexts > for this: >=20 > A) The cpu pair does not involve cpu2. These perform similar > to each other [relative to (B) and (C) below]. >=20 > B) cpu2 is in use with one of cpu1 or cpu3. These are different > from (A) for performance: slower. But the two (B) cases are > similar to each other [relative to (A) and (C)]. >=20 > C) cpu2 is in use with cpu0. This slower than both (A) and (B). > This case also seems to have somewhat more variability in the > performance compared to (A) and (B). >=20 > The Rock64 and RPi4B have very different memory-subsystem > performance-related-behavior overall but the above still applies > to both as a summary. I've not seen such differences for, say, > a RPi4B ubuntu context. I've not tested other example contexts. >=20 > I limit the cpus/cores via cpuset use on the command line. I can > build the program involved with or without it locking down each > thread in the test to a distinct cpu/core within what cpuset > is told to allow vs. allowing migration to occur between those > cpus/cores. (No cpuset use would be needed for 4 cores for the > example SBCs.) The effect is measurable both ways. Based on further experiments in a more general context, I retract that "locking down each thread in the test to a distinct cpu/core within what cpuset is told to allow" is not needed to observe (B) or (C): in general the lock down activity is needed to see such. Still using cpuset from the command line, but not doing the locking down to specific cores at all in the program, does not follow the described pattern generally. This leads me to guess that the cpuset_setaffinity used to do the lock-down contributes to (B) and (C) happening. The cpuset_setaffinity use looks like: if (0 !=3D cpuset_setaffinity( CPU_LEVEL_WHICH , CPU_WHICH_TID , id_t{-1} // current thread , sizeof(cpuset_t) , = &cpus_info.singleton_sets.at(c).cpu_set ) ) throw std::runtime_error("failed to set cpu"); It turns out that, for a cortex-a72 system with two 512 KiByte L2 caches (one per pair of cores) and an overall 1 MiByte L3 cache (exclusive), I was also able to see an ordering inside (A) for the cpu-lock-down based testing [as well as seeing (B) and (C)]. > I test both at the boot -s command prompt and for normal login > command prompts. (Variations in competing activity, including > for RAM cache use.) The effect is measurable both ways. >=20 > I have tested two distinct RPi4B's but only have access to > one Rock64. All 3 contexts show the general structure > reported. >=20 >=20 > As for graphs showing examples . . . >=20 > In the graphs for the results the colored curves are the > cpu-pair curves (green, blue, red). I provide dark grey > for single-threaded and 4-core as context for comparison. > If I have any 3 thread examples included for comparison: > light grey. >=20 > green: cpu pair does not involve cpu2 (fastest) > red: cpu pair is cpu0 and cpu2 (slowest) > blue: cpu pair involved cpu2 but not cpu0 (between) >=20 > (The single-threaded curve(s) are the most different > from the others on each SBC so they stand out.) >=20 > I'll note that for the x-axis and multi-threaded, being to > the left means thread creation is a larger fraction of the > overall time for the size and that limits the y-axis figure > for the size. (For multi-threaded, thread creations are part > of what is measured for each size problem.) >=20 > x-axis: logarithmic for "kernel vectors: total Bytes", base 4 > (a computer oriented indication of the size of the problem) >=20 > y-axis: linear for the type of speed figure >=20 >=20 > A rock64 .png image of an example context's graph is at: >=20 > = https://github.com/markmi/acpphint/blob/master/acpphint_example_data/Rock6= 4-cpu-pairs-oddity.png >=20 >=20 > A RPi4B .png image of an example context's graph is at: > (The y-axis range is different from Rock64's y-range.) >=20 > = https://github.com/markmi/acpphint/blob/master/acpphint_example_data/RPi4B= -cpu-pairs-oddity.png >=20 > For the RPi4B graph, there is a peak for each color and > both sides of the peak show the issue, but more so on > the left side. >=20 >=20 > Notes: >=20 > The program is a c++17 variant of some of the old > HINT benchmarks. For reference for the data types > involved in the graphed data: >=20 > ull: unsigned long long (64 bits here) > ul: unsigned long (also 64 bits here) >=20 > So variations between the two give some idea of > the degree of other sources of variability in the > measurements (ull and ul are essentially equivalent). >=20 > Without the cpu lock down code being built, the > program is not system-specific c++17 code. But > building with the cpu lock down code does add > system-specific code (FreeBSD specific here). >=20 > I build with g++ (even when using the system > libc++ and such instead of g++'s libraries). This > is because the program resulting happens to be more > performant in any case that I've compared. Being > more performant makes things easier to notice > when checking for oddities. >=20 > Other than building for comparisons to Linux that > uses g++'s libraries, I use the FreeBSD libc++ and > such because they are more performant at creating > threads under FreeBSD (for example). Being more > performant . . . >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-arm@freebsd.org Wed Aug 26 05:39:58 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D4013C9CE3 for ; Wed, 26 Aug 2020 05:39:58 +0000 (UTC) (envelope-from meloun.michal@gmail.com) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbvnn3VlMz4hkm for ; Wed, 26 Aug 2020 05:39:57 +0000 (UTC) (envelope-from meloun.michal@gmail.com) Received: by mail-wm1-x336.google.com with SMTP id z9so497200wmk.1 for ; Tue, 25 Aug 2020 22:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Sj8O5a7/BA9OLjKAge34jWTtopDEC0XGVm++WCdTTQI=; b=I680QvY8WihgUSIlHws2QqriIEelAgMejwApQyAZZYuggI7LtYwT0iX2WASNaFKnem +03eDqvAo7HmUJf8OLPdpalyrFsq/gX7jtABakH/W2T7RNRlJ0YRaGztMJbKA7Mh1d8Q D5Z0t6fxZsxAkpdzpn/Cdj1MLLM9e5+i/h6r/ZftZjC/j88pik+UdE4U2whHMNT3iQPz UfEm1uHuYkZG3f7TsjToCbeD5KH8B63U3OrToaW3MoDLJNFVDyN06quMo/R1I/WE+BaW MRytVgc8K4OqHqO85mBVDGHuum1u5UbFhX8l9Peqsx49rg29bTovNsm03Mo0NJs/pa9F tRhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Sj8O5a7/BA9OLjKAge34jWTtopDEC0XGVm++WCdTTQI=; b=STqvcieFxsXPUr50TkhilW3TTgmzmSY6oy9cWbC3AgpFMnLL8mv0Oq9pyWeDl4YVME 0NV3X5zWGbpLAK5YWSIx4qV/k04ZJaMV2qaSeXeguNhzm4OGIgpvTc9EKVBJD1SNym5I SHZVeoIcBdXRF3kjduIscr0QkqRQe8xCH0BqDI3wqx9F4xsETrM8yVfVzBqSArUju5tc 4gQq4qAqNHAI2vtZuCFByxiP2rYIXM+a7DrtHhDzLxZDb+0428/q6O5WXC3WTJHcJsNR mzM6Mr7hZdVzAl3SsLMimkGWSKyxqgteWbOHuQgVCrBO5BX9/O7rq8/3QGcjZAJyoCnO y4xg== X-Gm-Message-State: AOAM532i3VsBax21R6vIlGAkiSAU9sSMvkIJiLqQ2MCwlBVcSbr6OKBA sE45+8kcYK6xiJq+e5gVicG1wA7wkWE= X-Google-Smtp-Source: ABdhPJxYVzE0D+V3M9hWZdoc0CaxwbPSZi6ldHd4rDu9Mh5PM++lANRilCY7l2DNcijfoIixBfA++w== X-Received: by 2002:a1c:4944:: with SMTP id w65mr5023884wma.169.1598420395492; Tue, 25 Aug 2020 22:39:55 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id t14sm3467468wrg.38.2020.08.25.22.39.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Aug 2020 22:39:54 -0700 (PDT) Sender: Michal Meloun Reply-To: meloun.michal@gmail.com Subject: Re: Kmod driver at iicbus. attach() and config_intrhook(9) To: freebsd-arm@freebsd.org References: <7fabb65d99aaa74775c1daa91bffb873@mh.net.ru> <3249fa7e-554a-83ef-57b2-7c38aa0b4591@FreeBSD.org> <20200819072409.GA59949@bluezbox.com> <05145b71692af74b103bb226a2e93a15e1e851cb.camel@freebsd.org> <20200820223918.GC4213@funkthat.com> <496ed13afb2327d6416664b4dacfc346@mh.net.ru> <20200824204708.GH4213@funkthat.com> <6be8abd0-185c-dbbb-5964-1e2ad92ad213@FreeBSD.org> <20200825203313.GJ4213@funkthat.com> From: Michal Meloun Message-ID: Date: Wed, 26 Aug 2020 07:39:55 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200825203313.GJ4213@funkthat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bbvnn3VlMz4hkm X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=I680QvY8; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of melounmichal@gmail.com designates 2a00:1450:4864:20::336 as permitted sender) smtp.mailfrom=melounmichal@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; HAS_REPLYTO(0.00)[meloun.michal@gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.68)[-0.683]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.56)[-0.560]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.76)[-0.759]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[gmail.com]; REPLYTO_DOM_EQ_FROM_DOM(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::336:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2020 05:39:58 -0000 On 25.08.2020 22:33, John-Mark Gurney wrote: > Andriy Gapon wrote this message on Tue, Aug 25, 2020 at 10:21 +0300: >> On 24/08/2020 23:47, John-Mark Gurney wrote: >>> What driver is used for i2c on the Orange? I've tried to firgure it >>> out from dts + source, but it isn't clear. >> >> a10_twsi > > Thanks. And this explains why I couldn't find it in arm/allwinner.. :) > > Yeah, this is using bus_generic_attach... > > But it looks like it supports interruptless operation. Is there a flag > for when interrupts are enabled? > > Because the check in sys/dev/iicbus/twsi/twsi.c:twsi_transfer could be > changed from: > if (sc->have_intr == false) > > to: > if (sc->have_intr == false || interrupts_not_enabled) > > And that could fix things. See one of existing drivers for inspiration. For example: https://svnweb.freebsd.org/base/head/sys/arm64/rockchip/rk_i2c.c?revision=358278&view=markup&pathrev=364777#l528 Michal From owner-freebsd-arm@freebsd.org Wed Aug 26 19:53:47 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0152B3BAD3A for ; Wed, 26 Aug 2020 19:53:47 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcGkx3RYZz4Zrx for ; Wed, 26 Aug 2020 19:53:44 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id 07QJrgDt092675 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 26 Aug 2020 12:53:42 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id 07QJrgIK092674; Wed, 26 Aug 2020 12:53:42 -0700 (PDT) (envelope-from jmg) Date: Wed, 26 Aug 2020 12:53:42 -0700 From: John-Mark Gurney To: Michal Meloun Cc: freebsd-arm@freebsd.org Subject: Re: Kmod driver at iicbus. attach() and config_intrhook(9) Message-ID: <20200826195342.GQ4213@funkthat.com> Mail-Followup-To: Michal Meloun , freebsd-arm@freebsd.org References: <20200819072409.GA59949@bluezbox.com> <05145b71692af74b103bb226a2e93a15e1e851cb.camel@freebsd.org> <20200820223918.GC4213@funkthat.com> <496ed13afb2327d6416664b4dacfc346@mh.net.ru> <20200824204708.GH4213@funkthat.com> <6be8abd0-185c-dbbb-5964-1e2ad92ad213@FreeBSD.org> <20200825203313.GJ4213@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.3-STABLE amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Wed, 26 Aug 2020 12:53:42 -0700 (PDT) X-Rspamd-Queue-Id: 4BcGkx3RYZz4Zrx X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of jmg@gold.funkthat.com has no SPF policy when checking 208.87.223.18) smtp.mailfrom=jmg@gold.funkthat.com X-Spamd-Result: default: False [3.76 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[jmg]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.89)[0.889]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[funkthat.com]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.81)[0.806]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.87)[0.867]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[jmg@funkthat.com,jmg@gold.funkthat.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:32354, ipnet:208.87.216.0/21, country:US]; FROM_NEQ_ENVFROM(0.00)[jmg@funkthat.com,jmg@gold.funkthat.com]; MAILMAN_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2020 19:53:47 -0000 Michal Meloun wrote this message on Wed, Aug 26, 2020 at 07:39 +0200: > > > On 25.08.2020 22:33, John-Mark Gurney wrote: > > Andriy Gapon wrote this message on Tue, Aug 25, 2020 at 10:21 +0300: > >> On 24/08/2020 23:47, John-Mark Gurney wrote: > >>> What driver is used for i2c on the Orange? I've tried to firgure it > >>> out from dts + source, but it isn't clear. > >> > >> a10_twsi > > > > Thanks. And this explains why I couldn't find it in arm/allwinner.. :) > > > > Yeah, this is using bus_generic_attach... > > > > But it looks like it supports interruptless operation. Is there a flag > > for when interrupts are enabled? > > > > Because the check in sys/dev/iicbus/twsi/twsi.c:twsi_transfer could be > > changed from: > > if (sc->have_intr == false) > > > > to: > > if (sc->have_intr == false || interrupts_not_enabled) > > > > And that could fix things. > > See one of existing drivers for inspiration. > For example: > https://svnweb.freebsd.org/base/head/sys/arm64/rockchip/rk_i2c.c?revision=358278&view=markup&pathrev=364777#l528 Ahh, yes, cold. Forgot about that. yet another thing that should be documented. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-arm@freebsd.org Wed Aug 26 20:55:18 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF6A13BC363 for ; Wed, 26 Aug 2020 20:55:18 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcJ5x5fPyz4df0 for ; Wed, 26 Aug 2020 20:55:17 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f182.google.com with SMTP id v12so3934529ljc.10 for ; Wed, 26 Aug 2020 13:55:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=V6zRjTAwx+M7tliuZJHcbLscKNQY/FFYWvRQdwghVzo=; b=KT3bPZsbgFMF3V0l/4L7YtlAl7eCLR4lm7sGPLRkopu7Lf5wqAUcAYMrT5/fe8V7Q/ fmaf5TtoGxXJjmm6LVx0uZlYsFaEpvMvdSH74YeuvBpotUr+RtySDsGZuEhEQa29RwiX BbbLBFWTQ8wzXjK79QQu5l4/ZAycAs5scKnCkpn8kPuoRvsXkU9J+AB/3U21V2IzSsk5 UCflSLSkMbwh0Bb/zeu7zb0sqT7e1sqtj3E0D5zOpttIcoOfuPFShujnO/snnikePNkN gxNypA3BnK5OOGGBT+ooT5uE8W+Sh98toDaDVKemUyqvvinZh1CAQNuGpeK+Khkt6LLP J1nA== X-Gm-Message-State: AOAM533OgSODlFlt/hyGdaNLt8rOyf+wm4SESfS+oTI0Vp4pkWWidIv5 ppmOcWoRzAN3zJ6JwhoBAgV15dai3Xk= X-Google-Smtp-Source: ABdhPJyg3WMsdR1lFFmzoF0LIMPpWIrr8XCykzF8P3rAMFNOeGoBhN8BRCS6Nxjj0jODxbmAl35/sQ== X-Received: by 2002:a05:651c:88:: with SMTP id 8mr8484685ljq.277.1598475315223; Wed, 26 Aug 2020 13:55:15 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id x17sm751716ljm.0.2020.08.26.13.55.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Aug 2020 13:55:14 -0700 (PDT) Subject: Re: Kmod driver at iicbus. attach() and config_intrhook(9) To: freebsd-arm@freebsd.org References: <7fabb65d99aaa74775c1daa91bffb873@mh.net.ru> <3249fa7e-554a-83ef-57b2-7c38aa0b4591@FreeBSD.org> <20200819072409.GA59949@bluezbox.com> <05145b71692af74b103bb226a2e93a15e1e851cb.camel@freebsd.org> <20200820223918.GC4213@funkthat.com> <496ed13afb2327d6416664b4dacfc346@mh.net.ru> <20200824204708.GH4213@funkthat.com> <6be8abd0-185c-dbbb-5964-1e2ad92ad213@FreeBSD.org> <20200825203313.GJ4213@funkthat.com> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= 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 Message-ID: <41220fa2-0af3-22c2-0057-c7578f14d52b@FreeBSD.org> Date: Wed, 26 Aug 2020 23:55:13 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200825203313.GJ4213@funkthat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BcJ5x5fPyz4df0 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.182 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-0.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.88)[-0.881]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TO_DOM_EQ_FROM_DOM(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.59)[0.595]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_LONG(0.28)[0.285]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.182:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.182:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2020 20:55:18 -0000 On 25/08/2020 23:33, John-Mark Gurney wrote: > Andriy Gapon wrote this message on Tue, Aug 25, 2020 at 10:21 +0300: >> On 24/08/2020 23:47, John-Mark Gurney wrote: >>> What driver is used for i2c on the Orange? I've tried to firgure it >>> out from dts + source, but it isn't clear. >> >> a10_twsi > > Thanks. And this explains why I couldn't find it in arm/allwinner.. :) > > Yeah, this is using bus_generic_attach... > > But it looks like it supports interruptless operation. Is there a flag > for when interrupts are enabled? > > Because the check in sys/dev/iicbus/twsi/twsi.c:twsi_transfer could be > changed from: > if (sc->have_intr == false) > > to: > if (sc->have_intr == false || interrupts_not_enabled) > > And that could fix things. > sc->have_intr is already enabled from the interrupt enable hook. -- Andriy Gapon From owner-freebsd-arm@freebsd.org Wed Aug 26 21:33:52 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D72C3BD8A2 for ; Wed, 26 Aug 2020 21:33:52 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcJyR0ZMDz3SNM; Wed, 26 Aug 2020 21:33:50 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id 07QLXhc9001126 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 26 Aug 2020 14:33:43 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id 07QLXhnI001125; Wed, 26 Aug 2020 14:33:43 -0700 (PDT) (envelope-from jmg) Date: Wed, 26 Aug 2020 14:33:43 -0700 From: John-Mark Gurney To: Andriy Gapon Cc: freebsd-arm@freebsd.org Subject: Re: Kmod driver at iicbus. attach() and config_intrhook(9) Message-ID: <20200826213343.GR4213@funkthat.com> Mail-Followup-To: Andriy Gapon , freebsd-arm@freebsd.org References: <20200819072409.GA59949@bluezbox.com> <05145b71692af74b103bb226a2e93a15e1e851cb.camel@freebsd.org> <20200820223918.GC4213@funkthat.com> <496ed13afb2327d6416664b4dacfc346@mh.net.ru> <20200824204708.GH4213@funkthat.com> <6be8abd0-185c-dbbb-5964-1e2ad92ad213@FreeBSD.org> <20200825203313.GJ4213@funkthat.com> <41220fa2-0af3-22c2-0057-c7578f14d52b@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41220fa2-0af3-22c2-0057-c7578f14d52b@FreeBSD.org> X-Operating-System: FreeBSD 11.3-STABLE amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Wed, 26 Aug 2020 14:33:43 -0700 (PDT) X-Rspamd-Queue-Id: 4BcJyR0ZMDz3SNM X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of jmg@gold.funkthat.com has no SPF policy when checking 208.87.223.18) smtp.mailfrom=jmg@gold.funkthat.com X-Spamd-Result: default: False [2.40 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[jmg]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[funkthat.com]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.85)[0.849]; NEURAL_HAM_SHORT(-0.49)[-0.492]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.84)[0.844]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[jmg@funkthat.com,jmg@gold.funkthat.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:32354, ipnet:208.87.216.0/21, country:US]; FROM_NEQ_ENVFROM(0.00)[jmg@funkthat.com,jmg@gold.funkthat.com]; MAILMAN_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2020 21:33:52 -0000 Andriy Gapon wrote this message on Wed, Aug 26, 2020 at 23:55 +0300: > On 25/08/2020 23:33, John-Mark Gurney wrote: > > Andriy Gapon wrote this message on Tue, Aug 25, 2020 at 10:21 +0300: > >> On 24/08/2020 23:47, John-Mark Gurney wrote: > >>> What driver is used for i2c on the Orange? I've tried to firgure it > >>> out from dts + source, but it isn't clear. > >> > >> a10_twsi > > > > Thanks. And this explains why I couldn't find it in arm/allwinner.. :) > > > > Yeah, this is using bus_generic_attach... > > > > But it looks like it supports interruptless operation. Is there a flag > > for when interrupts are enabled? > > > > Because the check in sys/dev/iicbus/twsi/twsi.c:twsi_transfer could be > > changed from: > > if (sc->have_intr == false) > > > > to: > > if (sc->have_intr == false || interrupts_not_enabled) > > > > And that could fix things. > > > > sc->have_intr is already enabled from the interrupt enable hook. But that only detects if the interrupt are used, NOT that they are currently active and working which the "|| cold" would provide... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-arm@freebsd.org Thu Aug 27 05:35:07 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1AD3D3C7759 for ; Thu, 27 Aug 2020 05:35:07 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcWdk00hMz49qN for ; Thu, 27 Aug 2020 05:35:05 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f170.google.com with SMTP id t23so5012731ljc.3 for ; Wed, 26 Aug 2020 22:35:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=LmXq7qua44mneOUPwnHGEoGHnWigOwx8dPndmxSXehA=; b=Bn/YcaKVuiUpnE6d+XThmWqsP606KRlM5wLkESPjiyIRYZzgGxer+Rh+zOsyAN8FXB Un8GAsXZk9BxCEc+AsvmIRRKmHBoD7g3NQuEz5ICcWZ3LvB9oueh+lNgiManOTv6qUL6 1kICjjc0zRCoY7kbskzoN4WAMgiKpCW1yKbDSItXpXonru2L41M/po0Q5+Qglmf9AUAJ yOYLdlIzi+w7RYvrBPfjQQ1S4tiB+yCtcfe00WoAvGgJr1XC2zPENaWGwcAoV585Q+oM CwYB5LtKT5Hp1mdvam3R4b/c2vOfM2xJxQzSSUkug7MUFCZW64Jg5XmnadBMd17IF7o4 r+2g== X-Gm-Message-State: AOAM532R5MfkCv2kE6YipI/gVZYtxyWr5HujB9oHbf5HjyAwKN4G9c99 uq7B/U4Pgj2H5yuDPkDz0qs1RxVHZVA= X-Google-Smtp-Source: ABdhPJzqElFSmhDkREJtFpozS/ykkFKJZ/pRxS7qbAXM8FjaOQ9wfVSU/oU3tuW8bgFOzEYQwh7UZQ== X-Received: by 2002:a2e:9684:: with SMTP id q4mr8231984lji.1.1598506503824; Wed, 26 Aug 2020 22:35:03 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id 206sm236174lfl.87.2020.08.26.22.35.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Aug 2020 22:35:02 -0700 (PDT) Subject: Re: Kmod driver at iicbus. attach() and config_intrhook(9) To: freebsd-arm@freebsd.org References: <20200819072409.GA59949@bluezbox.com> <05145b71692af74b103bb226a2e93a15e1e851cb.camel@freebsd.org> <20200820223918.GC4213@funkthat.com> <496ed13afb2327d6416664b4dacfc346@mh.net.ru> <20200824204708.GH4213@funkthat.com> <6be8abd0-185c-dbbb-5964-1e2ad92ad213@FreeBSD.org> <20200825203313.GJ4213@funkthat.com> <41220fa2-0af3-22c2-0057-c7578f14d52b@FreeBSD.org> <20200826213343.GR4213@funkthat.com> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= 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 Message-ID: <2cd30277-0628-9a4c-56c0-4ab7d4debaf8@FreeBSD.org> Date: Thu, 27 Aug 2020 08:35:02 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200826213343.GR4213@funkthat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BcWdk00hMz49qN X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.170 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [0.76 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.12)[-0.118]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; TO_DOM_EQ_FROM_DOM(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.59)[0.595]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_LONG(0.29)[0.285]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.170:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.170:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 05:35:07 -0000 On 27/08/2020 00:33, John-Mark Gurney wrote: > Andriy Gapon wrote this message on Wed, Aug 26, 2020 at 23:55 +0300: >> On 25/08/2020 23:33, John-Mark Gurney wrote: >>> Andriy Gapon wrote this message on Tue, Aug 25, 2020 at 10:21 +0300: >>>> On 24/08/2020 23:47, John-Mark Gurney wrote: >>>>> What driver is used for i2c on the Orange? I've tried to firgure it >>>>> out from dts + source, but it isn't clear. >>>> >>>> a10_twsi >>> >>> Thanks. And this explains why I couldn't find it in arm/allwinner.. :) >>> >>> Yeah, this is using bus_generic_attach... >>> >>> But it looks like it supports interruptless operation. Is there a flag >>> for when interrupts are enabled? >>> >>> Because the check in sys/dev/iicbus/twsi/twsi.c:twsi_transfer could be >>> changed from: >>> if (sc->have_intr == false) >>> >>> to: >>> if (sc->have_intr == false || interrupts_not_enabled) >>> >>> And that could fix things. >>> >> >> sc->have_intr is already enabled from the interrupt enable hook. > > But that only detects if the interrupt are used, NOT that they are > currently active and working which the "|| cold" would provide... The interrupt hook is called after interrupts are enabled and usable. Specifically, I mean config_intrhook_oneshot(). -- Andriy Gapon From owner-freebsd-arm@freebsd.org Thu Aug 27 13:50:42 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C38C73B236D for ; Thu, 27 Aug 2020 13:50:42 +0000 (UTC) (envelope-from kamalpr@gmail.com) Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BckdY6lzGz4dm1 for ; Thu, 27 Aug 2020 13:50:41 +0000 (UTC) (envelope-from kamalpr@gmail.com) Received: by mail-io1-xd35.google.com with SMTP id h10so1368335ioq.6 for ; Thu, 27 Aug 2020 06:50:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=lDC/wtlE1irpY8pdR9aRZ6SrBEryODFawfUDTyADdWM=; b=Mc3BN1pCiyptDbfdoDLGGhGMZYkjcUKSFMGUeyCXWCS12uyfan8bes2dI6rlLvlyYz eLYbzDEAPIGCcV68DpjKjBfsOTIJ65yO3mJSUM/lZqP1xeYuDe7oiXcxfKmUyh+MvJ6q xbcTpt8+SWUXnegpop67h5V35EHPP+Ev0K9eZq1BuZuG1feVD3JHAIDD4cZSZpb4MPAb 0Oc5DJyIHoI1RLW6xzjW0FqkK/uaqY3hNJ/lWYOdXUp8cZrETySUzpJA+nDFqKTSiewu n7uEP9V/x+t20TLnF60LgKlxKFi0cBYtWiJgE59azqzFd2lNdNYEB+gCk1syMOaCHSyo MUZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=lDC/wtlE1irpY8pdR9aRZ6SrBEryODFawfUDTyADdWM=; b=rW+nRwKPAVna3Tkn1TfMtVe7O98b8Wf02wjLeIwIMUH3QxxNB8a1RRBxE8oVxdiXu2 HASxth0G/Ht1N22EzLTEY3Fq0aiIV2od3YRrlNCm9pfgcNKcodAKNSsYF3MwnIYS8BII R5WYAtUcuMbK8gN8fIA5XlOTsbvLYvgYZB3ZBSEbQmi5prmv0cY726oQUNO8Lce2iN8Z J67qYR5geoKYb+gQrEHG5jL1YPPsJHUdNb88QPStP8Ybn2RflfX449N/SsNFGcvjRnmk gzrW7dpUyvim/vj/ywKtmKTugB2zCBaUISj8odymcQj/rbznKVmwkcljmRKBYLIZyyYT R8IA== X-Gm-Message-State: AOAM530xHiEHqEjveFiJf1BqmVXxOGSAEJoGqnOzhlwiL6bE6Dl6UI6t KEBdpYmT+UIRhHs5oHPly1jTOu48+gG/CW8LjJxeZnJzmg== X-Google-Smtp-Source: ABdhPJzgtusAQj3kEAeyVGwOiizRCqtWPDKXh5kVt+JRfuO2nqfuOWRW58I7pi4zO3OoT49EgarL+f82g4bIRQ9jFEU= X-Received: by 2002:a5d:9344:: with SMTP id i4mr16955943ioo.106.1598536240306; Thu, 27 Aug 2020 06:50:40 -0700 (PDT) MIME-Version: 1.0 Reply-To: kamalp@acm.org From: "Kamal R. Prasad" Date: Thu, 27 Aug 2020 19:20:29 +0530 Message-ID: Subject: INTR_FAST To: freebsd-arm@freebsd.org X-Rspamd-Queue-Id: 4BckdY6lzGz4dm1 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Mc3BN1pC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of kamalpr@gmail.com designates 2607:f8b0:4864:20::d35 as permitted sender) smtp.mailfrom=kamalpr@gmail.com X-Spamd-Result: default: False [-1.19 / 15.00]; HAS_REPLYTO(0.00)[kamalp@acm.org]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; SUBJ_ALL_CAPS(0.68)[9]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.01)[-1.007]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.73)[-0.731]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_SHORT(0.88)[0.876]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d35:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 13:50:42 -0000 Hello, This page https://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/smp-design.= html says that "These interrupt handlers are currently misnamed =E2=80=9Cfast=E2=80=9D int= errupt handlers since the INTR_FAST flag used in earlier versions of the kernel is used to mark these handlers. The only interrupts which currently use these types of interrupt handlers are clock interrupts and serial I/O device interrupts." I want to use INTR_FAST for my spi controller, but i find that it is not defined on freebsd stable11. Is INTR_EXCL related in any way to INTR_FAST? if not, how do I setup a fast interrupt handler? thanks -kamal From owner-freebsd-arm@freebsd.org Thu Aug 27 13:53:46 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F31313B27FE for ; Thu, 27 Aug 2020 13:53:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bckj54RVdz4fMx for ; Thu, 27 Aug 2020 13:53:45 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 7F39026000F; Thu, 27 Aug 2020 15:53:38 +0200 (CEST) Subject: Re: INTR_FAST To: kamalp@acm.org, freebsd-arm@freebsd.org References: From: Hans Petter Selasky Message-ID: <7ed79c1d-2d66-5011-286f-8dcac058f7d5@selasky.org> Date: Thu, 27 Aug 2020 15:53:11 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Bckj54RVdz4fMx X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-0.44 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-0.40)[-0.401]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; DMARC_NA(0.00)[selasky.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.42)[0.419]; RCPT_COUNT_TWO(0.00)[2]; SUBJ_ALL_CAPS(0.68)[9]; NEURAL_HAM_MEDIUM(-0.83)[-0.830]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 13:53:47 -0000 On 2020-08-27 15:50, Kamal R. Prasad wrote: > "These interrupt handlers are currently misnamed “fast” interrupt handlers > since the INTR_FAST flag used in earlier versions of the kernel is used to > mark these handlers. The only interrupts which currently use these types of > interrupt handlers are clock interrupts and serial I/O device interrupts." > > I want to use INTR_FAST for my spi controller, but i find that it is not > defined on freebsd stable11. Is INTR_EXCL related in any way to INTR_FAST? > if not, how do I setup a fast interrupt handler? Hi, When you setup and interrupt, there are two function pointers. One is the so-called interrupt filter, which is running in the fast context, and the other is the regular interrupt handler which is running from a thread context. --HPS From owner-freebsd-arm@freebsd.org Thu Aug 27 14:02:00 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67D213B37CB for ; Thu, 27 Aug 2020 14:02:00 +0000 (UTC) (envelope-from kamalpr@gmail.com) Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcktb6pZzz3RWc for ; Thu, 27 Aug 2020 14:01:59 +0000 (UTC) (envelope-from kamalpr@gmail.com) Received: by mail-io1-xd42.google.com with SMTP id g14so5937028iom.0 for ; Thu, 27 Aug 2020 07:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=tawpsBM5Bl6Z4VWeAq/2gLwAlxtnBJl/mGVaXxKpjlk=; b=trYj1w5OaFp32B9RKq08vesiOdnU5gFmzmtj8qZG46LCxR/C9+SIY6745JPti2OXWx WF36CNNR7STuawD2IJ+2EFAPRLcwEG6CeR/LPvbn3f1XB3Hj+w5uMpvPxX5uFLpyIcFs FGu8stekq5NnYET9vNRFZ3YSFn0BUDVu/cM98xPMhVqhk3lEbrIq+RK7xudMofUMJQre 1332cu52MJ4NRiR/fyvnYhZzjCOSXXyA+pNk2EDO3so3Bt42EvNDi/Z49hMokKOn2izz 31OdzzG9pL3UFFMYq+Lcm2wA6DRL2SOqYiu/nG+9np8/+wEBPKJF47lFK0Elt0JSt47u jF8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=tawpsBM5Bl6Z4VWeAq/2gLwAlxtnBJl/mGVaXxKpjlk=; b=Gh0lfQinxUmsUDfgizG6yWtSMp4Ti2vmEtTe1o86o5SVXnkobJwJaB8UhU3pjqIL1i NQ6d2eenQr+ByqfXuFxLKM4V5VMajKyAvCbEQ2Rn55ti7rhteMZ5UmP7mNvc8+Irw/98 Xs02n2xNQUsgiVPUPEk3p7Vq43UbXrosbEXn7fwh+gVUiTTUNWAEhU/OcDb8EehSNnIz S3CZS1Ipv4RtvxbqS5QqyVXxFRMtrBhtgu3/ofPR0ZPNoqNs7UK0RKFx8bnSK7qu3U4Q l8bxBGUHzj8Qpwv5EMkTg+ifb9lCO/cOXZaNZFMsDdkoWuMbWxiLOWmKEw+J25FysuUp z8cg== X-Gm-Message-State: AOAM530UhepH+aOCABZJU68EBAFC5VxigCCnVe6b9DDXlrrs7LEb+xOH c1ZfU8e5DbdBvd0jQkpRFmkmyT9KPvjeSkB8ew== X-Google-Smtp-Source: ABdhPJxWhnaggC5HSFravP5EHnb1ARW5J0NT3d7VAfbhyufoxR7DzS94WR2KjMMkPjAl0aWIWBLCMfhejykvZ56P9mc= X-Received: by 2002:a5e:8f06:: with SMTP id c6mr16922870iok.119.1598536918968; Thu, 27 Aug 2020 07:01:58 -0700 (PDT) MIME-Version: 1.0 References: <7ed79c1d-2d66-5011-286f-8dcac058f7d5@selasky.org> In-Reply-To: <7ed79c1d-2d66-5011-286f-8dcac058f7d5@selasky.org> Reply-To: kamalp@acm.org From: "Kamal R. Prasad" Date: Thu, 27 Aug 2020 19:31:48 +0530 Message-ID: Subject: Re: INTR_FAST To: Hans Petter Selasky Cc: kamalp@acm.org, freebsd-arm@freebsd.org X-Rspamd-Queue-Id: 4Bcktb6pZzz3RWc X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=trYj1w5O; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of kamalpr@gmail.com designates 2607:f8b0:4864:20::d42 as permitted sender) smtp.mailfrom=kamalpr@gmail.com X-Spamd-Result: default: False [-1.81 / 15.00]; HAS_REPLYTO(0.00)[kamalp@acm.org]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; SUBJ_ALL_CAPS(0.68)[9]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.03)[-1.029]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.49)[0.492]; NEURAL_HAM_LONG(-0.95)[-0.949]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d42:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 14:02:00 -0000 ok i got the answer from the man page https://www.freebsd.org/cgi/man.cgi?query=3Dbus_setup_intr&apropos=3D0&sekt= ion=3D0&manpath=3DFreeBSD+8.1-RELEASE&format=3Dhtml is it common practice to move clock and serial io interrupt handlers to the filter handler? thanks -kamal On Thu, Aug 27, 2020 at 7:23 PM Hans Petter Selasky wrote= : > On 2020-08-27 15:50, Kamal R. Prasad wrote: > > "These interrupt handlers are currently misnamed =E2=80=9Cfast=E2=80=9D= interrupt > handlers > > since the INTR_FAST flag used in earlier versions of the kernel is used > to > > mark these handlers. The only interrupts which currently use these type= s > of > > interrupt handlers are clock interrupts and serial I/O device > interrupts." > > > > I want to use INTR_FAST for my spi controller, but i find that it is no= t > > defined on freebsd stable11. Is INTR_EXCL related in any way to > INTR_FAST? > > if not, how do I setup a fast interrupt handler? > > Hi, > > When you setup and interrupt, there are two function pointers. > > One is the so-called interrupt filter, which is running in the fast > context, and the other is the regular interrupt handler which is running > from a thread context. > > --HPS > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > From owner-freebsd-arm@freebsd.org Thu Aug 27 14:06:37 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F58E3B3E25 for ; Thu, 27 Aug 2020 14:06:37 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bckzw5949z3SRZ for ; Thu, 27 Aug 2020 14:06:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id EB4D726000F; Thu, 27 Aug 2020 16:06:32 +0200 (CEST) Subject: Re: INTR_FAST To: kamalp@acm.org Cc: freebsd-arm@freebsd.org References: <7ed79c1d-2d66-5011-286f-8dcac058f7d5@selasky.org> From: Hans Petter Selasky Message-ID: Date: Thu, 27 Aug 2020 16:06:06 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bckzw5949z3SRZ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-0.55 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[selasky.org]; NEURAL_SPAM_SHORT(0.32)[0.318]; NEURAL_HAM_LONG(-0.41)[-0.412]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; SUBJ_ALL_CAPS(0.68)[9]; NEURAL_HAM_MEDIUM(-0.83)[-0.835]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 14:06:37 -0000 On 2020-08-27 16:01, Kamal R. Prasad wrote: > is it common practice to move clock and serial io interrupt handlers to the > filter handler? Yes, but you have to be careful and use spin mutexes for synchronization. You are not allowed to lock regular blocking mutexes in there! --HPS From owner-freebsd-arm@freebsd.org Thu Aug 27 15:32:17 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 312253B627F for ; Thu, 27 Aug 2020 15:32:17 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcmtm5Gf1z3YbT for ; Thu, 27 Aug 2020 15:32:16 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1598542335; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=RXCdeutlC8JBC8CuuOmHHgoqEd8SacfgpCaf5pw4FUUClUMhtvMwCET+rkwT5z7RO8fhJlffeGJWJ EHNwg0e0cWdL4HNjq4RbgynB4ZGX8YxsQ3nYBbJn+piMh9kCtKuGvXEs3/k+s/UmozKZE61qvXKMrE gfXoMlKaQyBsoz67maIinNIeQoQmj5HcMbDM4dFmt5BY3AQIFO+GSaeh3QIvH1yV3KGIE6+J0uwsb9 V/TP7cZCz4YUEwEV0jU3dKgomQAE8lHAUpcQZgTIxKUJYxYU4ZaydS7JJa/b1uQwB11323KZspAFP1 qWmx2nBAz/RZZQIsEWcrPc8QU8d/NwA== 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:to:from:subject:message-id:dkim-signature:from; bh=RFeHDz08WCSAKWSbq7r9myBr6u8fBbtUTOG9HetSTKE=; b=Kg3CbqGKGqREeHGVAGow45aegyXpCZv2w3j8vTEio9GMXgnRl5Bo4m2iOuiY+KNKSZGhMU+r/OFEP O7Oy18MGwomEBS77GT4PXLLQ3wp1/CvYVqxywIz16S5NgtaPFb9E83CflgnSZ3HjfqrrXGM9dZOCA9 v6ZuLXtxZstPI1vTcnMxnhDEB41mD1dLweNbkzF3WqAMSSohsGAY7gRRWAxjI3gPZdZehNkmeQZucP NvS1HRC4fU79dk9vH29s/4QafQfUtN2+RjwTmXW3aPUxc7e8j5mIz7168/HJ7LjrXdZLZh5aJ82V8S b6E5sRt55f84wxIaD3gRCvNeB2WSITA== 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:to:from:subject:message-id:from; bh=RFeHDz08WCSAKWSbq7r9myBr6u8fBbtUTOG9HetSTKE=; b=FvdiLEZD+e+9DZQZRn+tJtpCnRR6nXTaTmPj12F4fe+BOOpWTBnbmR7GrKqP98a0+ye4zUSFGRwHw SyrCfmtZ5pF9OXg/it4mG9lqADe3d4lSD7tzPhS3lmpCAy/vtvcAqqKqQB/VAjsgzS5BTlFXptEuyZ frIF5eCvY3qRXXtiSM/6jlEBYjRWQd548PD8gXvob2VGJlyRx9HeWQOvhaOHLyBRkgZl02uqpwzU4h qR0h5c26wBXcjAhMKBkBTb4PsWV08ppazQqleXMMLtC9b5uolDwATyHbyumaMP6wn+F6lFF0qdVwuo Q0dWIM5sKJXYe4mZN/aalspJqYRGK1g== X-MHO-RoutePath: aGlwcGll X-MHO-User: 7a6dde34-e87a-11ea-b630-6b8aa7872eb8 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 (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 7a6dde34-e87a-11ea-b630-6b8aa7872eb8; Thu, 27 Aug 2020 15:32:13 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 07RFWCrh022010 for ; Thu, 27 Aug 2020 09:32:12 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <7e463a00ef89d7df0455656f51fe14f72c088a70.camel@freebsd.org> Subject: Re: INTR_FAST From: Ian Lepore To: freebsd-arm@freebsd.org Date: Thu, 27 Aug 2020 09:32:12 -0600 In-Reply-To: References: Content-Type: text/plain; charset="iso-8859-13" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Bcmtm5Gf1z3YbT X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; local_wl_from(0.00)[freebsd.org] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 15:32:17 -0000 On Thu, 2020-08-27 at 19:20 +0530, Kamal R. Prasad wrote: > Hello, > > This page > https://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/smp-design.html > > says that > "These interrupt handlers are currently misnamed fast interrupt handlers > since the INTR_FAST flag used in earlier versions of the kernel is used to > mark these handlers. The only interrupts which currently use these types of > interrupt handlers are clock interrupts and serial I/O device interrupts." > > I want to use INTR_FAST for my spi controller, but i find that it is not > defined on freebsd stable11. Is INTR_EXCL related in any way to INTR_FAST? > if not, how do I setup a fast interrupt handler? > > thanks > -kamal > An important question here is: Why do you want to use a filter handler (formerly called INTR_FAST) instead of a normal threaded handler? For something as slow as a SPI bus, I can't imagine you're going to see any noticible performance difference. -- Ian From owner-freebsd-arm@freebsd.org Thu Aug 27 15:44:00 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1E8D3B6C43 for ; Thu, 27 Aug 2020 15:44:00 +0000 (UTC) (envelope-from kamalpr@gmail.com) Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcn8J17Phz3Z8M; Thu, 27 Aug 2020 15:43:59 +0000 (UTC) (envelope-from kamalpr@gmail.com) Received: by mail-il1-x131.google.com with SMTP id j9so5238637ilc.11; Thu, 27 Aug 2020 08:43:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=Qw2aqAGDSmxSSoUWQtiO2LJpHPu1aS+wS1yCMm+v3FA=; b=kxvCy/LJO4W+/+3sM93r8FOHnC9UuGfVD6UgzDFR8x0HtnjqHSMVJooLgcbLMkPrQl 7+bjKbflQpZep3klDEznLi3lNyQYKsqa6cDTf5fKvkrIi7Eih0pmP4KirynF9honK/S1 1gweK8IkvIxnAQ+snO8XwPe3LdPH+j/Xmb8bOWY/98ibheleJyQr2kwHwB5pv3Y1byn4 5ke6RBETs56dYtCx0rvlKHe3kL/zZT7EIdcyv6djNyemmQOaYkQn6EnherBUccn/YMxs PgU/5vzu+88MHpfGMJmg9/rJ3IYtwLzcS4NIQ405oaWu8sBDwBaJflEJJKHTRmlffg5R BxYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=Qw2aqAGDSmxSSoUWQtiO2LJpHPu1aS+wS1yCMm+v3FA=; b=HPUZ1sYzi8e7FIl065ae5SOWiVPil2gITsqMsbZFRrfYsDSM6+iW/odVPhxiQihl+S 5xGtq53d5IWO9rAiiJRMXR02WRrAsgeDK7HzY0LCnBS6VpS2WcE6pJYccyDYPCYxVqbA hfgS8Z8b2lZ/iHRT+GuZM9RwhPMsra0i7/KlIwQjtPM61JQKgZu5JwJ+pHOLC5qrlkmO uV3UznFdrhibuAUvmg2SyeY8IPKoJ451QUI9Bkrko5cxcfN4ArIyquZln+KFvLP4Sy1p FJF3AI9GDlS7CTMc/WUouQyloA3LAfqRjzoaliWFUW1fV606suFvazhAuguMha994pcm /Afw== X-Gm-Message-State: AOAM5333c+ob9sRN5iXRrpilAgd57HVLEoTx/nZ5pXXRmPCP8ZKH3sTF qRV/4dIqY0yoMChu9HFnKdnizMOY+4bkKztarBVXgcc= X-Google-Smtp-Source: ABdhPJzD1fJgo7A0GSmj2+8P5/Z9JcUyoL4CmcUyvc4ZLs6U88DSL0c5r8IXOFOCKEARILjpC46P7uQ2MSh9AeJjuwo= X-Received: by 2002:a92:a119:: with SMTP id v25mr18468363ili.77.1598543038108; Thu, 27 Aug 2020 08:43:58 -0700 (PDT) MIME-Version: 1.0 References: <7e463a00ef89d7df0455656f51fe14f72c088a70.camel@freebsd.org> In-Reply-To: <7e463a00ef89d7df0455656f51fe14f72c088a70.camel@freebsd.org> Reply-To: kamalp@acm.org From: "Kamal R. Prasad" Date: Thu, 27 Aug 2020 21:13:47 +0530 Message-ID: Subject: Re: INTR_FAST To: Ian Lepore Cc: freebsd-arm@freebsd.org X-Rspamd-Queue-Id: 4Bcn8J17Phz3Z8M X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=kxvCy/LJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of kamalpr@gmail.com designates 2607:f8b0:4864:20::131 as permitted sender) smtp.mailfrom=kamalpr@gmail.com X-Spamd-Result: default: False [-2.43 / 15.00]; HAS_REPLYTO(0.00)[kamalp@acm.org]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; SUBJ_ALL_CAPS(0.68)[9]; NEURAL_HAM_SHORT(-0.13)[-0.135]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.01)[-1.009]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.96)[-0.960]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::131:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 15:44:00 -0000 because i hsve 3 spi slave devices attached to the pl022 controller and the drain of rx queue after i initiare spi transfer is showing some inconsistency. On Thu, Aug 27, 2020 at 9:02 PM Ian Lepore wrote: > On Thu, 2020-08-27 at 19:20 +0530, Kamal R. Prasad wrote: > > Hello, > > > > This page > > > https://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/smp-desig= n.html > > > > says that > > "These interrupt handlers are currently misnamed =E2=80=9Cfast=E2=80=9D= interrupt > handlers > > since the INTR_FAST flag used in earlier versions of the kernel is used > to > > mark these handlers. The only interrupts which currently use these type= s > of > > interrupt handlers are clock interrupts and serial I/O device > interrupts." > > > > I want to use INTR_FAST for my spi controller, but i find that it is no= t > > defined on freebsd stable11. Is INTR_EXCL related in any way to > INTR_FAST? > > if not, how do I setup a fast interrupt handler? > > > > thanks > > -kamal > > > > An important question here is: Why do you want to use a filter handler > (formerly called INTR_FAST) instead of a normal threaded handler? For > something as slow as a SPI bus, I can't imagine you're going to see any > noticible performance difference. > > -- Ian > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > From owner-freebsd-arm@freebsd.org Thu Aug 27 16:10:20 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 84D483B76A9 for ; Thu, 27 Aug 2020 16:10:20 +0000 (UTC) (envelope-from mishin@mh.net.ru) Received: from frog.mh.net.ru (mh.balakovo.san.ru [88.147.158.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcnkf5gXgz3blJ for ; Thu, 27 Aug 2020 16:10:17 +0000 (UTC) (envelope-from mishin@mh.net.ru) Received: from webmail.mh.net.ru (mouse.home [192.168.5.6]) by frog.mh.net.ru (Postfix) with ESMTPSA id C1CEDA009 for ; Thu, 27 Aug 2020 20:10:07 +0400 (+04) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 27 Aug 2020 20:10:07 +0400 From: Alexander Mishin To: freebsd-arm@freebsd.org Subject: Re: Boot issue with orange pi pc In-Reply-To: <20200825201527.66c8385ca691657038e425a9@bidouilliste.com> References: <52ea831ec34ebc0dc00292ac5e1c3894@mh.net.ru> <20200825201527.66c8385ca691657038e425a9@bidouilliste.com> User-Agent: Roundcube Webmail/1.4.2 Message-ID: <322599255ad284372e6dbab8253c2634@mh.net.ru> X-Sender: mishin@mh.net.ru X-Rspamd-Queue-Id: 4Bcnkf5gXgz3blJ X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=mh.net.ru (policy=none); spf=fail (mx1.freebsd.org: domain of mishin@mh.net.ru does not designate 88.147.158.22 as permitted sender) smtp.mailfrom=mishin@mh.net.ru X-Spamd-Result: default: False [2.60 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_FAIL(1.00)[-all]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.21)[0.214]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_MEDIUM(0.67)[0.675]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; NEURAL_SPAM_LONG(0.71)[0.710]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12389, ipnet:88.147.128.0/17, country:RU]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm]; DMARC_POLICY_SOFTFAIL(0.10)[mh.net.ru : No valid SPF, No valid DKIM,none] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 16:10:20 -0000 Emmanuel Vadot писал 2020-08-25 22:15: > On Tue, 25 Aug 2020 21:37:21 +0400 > Alexander Mishin wrote: > >> After a last friday's update my OrangePI-PC stop booting. >> Where to look? Fdt overlay to set the clock for mmc0? >> >> Here's how it ended in the console: >> >> ---- skipped ---- >> Trying to mount root from ufs:/dev/ufs/rootfs [rw,noatime]... >> uhub4 on usbus5 >> uhub5 on usbus1 >> uhub4: on >> usbus5 >> uhub5: on >> usbus1 >> Root mount waiting for:ugen6.1: at usbus6 >> ugen7.1: at usbus7 >> uhub6 usbus0 on usbus6 >> usbus1uhub7 usbus2 on usbus7 >> usbus3uhub6: > 1> >> on usbus6 >> usbus4uhub7: > 1> >> on usbus7 >> usbus5 usbus6 usbus7 >> uhub0: 1 port with 1 removable, self powered >> uhub4: 1 port with 1 removable, self powered >> uhub5: 1 port with 1 removable, self powered >> uhub7: 1 port with 1 removable, self powered >> mmc0: on aw_mmc0 >> Cannot set frequency for clk: mmc0, error: 34 >> aw_mmc0: failed to set frequency to 50000000 Hz: 34 >> uhub2: 1 port with 1 removable, self powered >> uhub1: 1 port with 1 removable, self powered >> uhub3: 1 port with 1 removable, self powered >> uhub6: 1 port with 1 removable, self powered >> mountroot: waiting for device /dev/ufs/rootfs... >> Mounting from ufs:/dev/ufs/rootfs failed with error 19. >> >> Loader variables: >> vfs.root.mountfrom=ufs:/dev/ufs/rootfs >> vfs.root.mountfrom.options=rw,noatime >> >> Manual root filesystem specification: >> : [options] >> Mount using filesystem >> and with the specified (optional) option list. >> >> eg. ufs:/dev/da0s1a >> zfs:zroot/ROOT/default >> cd9660:/dev/cd0 ro >> (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) >> >> ? List valid disk boot devices >> . Yield 1 second (for background tasks) >> Abort manual input >> >> mountroot> aw_mmc0: controller timeout >> aw_mmc0: timeout resetting DMA/FIFO >> aw_mmc0: timeout updating clock >> aw_mmc0: controller timeout >> aw_mmc0: timeout resetting DMA/FIFO >> aw_mmc0: timeout updating clock >> aw_mmc0: controller timeout >> aw_mmc0: timeout resetting DMA/FIFO > > What version of FreeBSD ? > What revision ? > > Could you test the GENERICSD image (you just need to add your u-boot). > > I'll try to find time this week to test myself on H3 board. > I just tried a new image from Aug 27 2020, but the result is still the same: Copyright (c) 1992-2020 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 13.0-CURRENT #0 r364846: Thu Aug 27 05:20:47 UTC 2020 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm.armv7/sys/GENERIC arm FreeBSD clang version 11.0.0 (git@github.com:llvm/llvm-project.git llvmorg-11.0.0-rc2-0-g414f32a9e86) WARNING: WITNESS option enabled, expect reduced performance. ---- skipped ---- Trying to mount root from ufs:/dev/ufs/rootfs [rw]... ugen6.1: at usbus6 uhub4ugen5.1: at usbus5 on usbus3 uhub4: on usbus3 uhub5 on usbus7 uhub6 on usbus5 uhub5: on usbus7 uhub6: on usbus5 uhub7 on usbus6 uhub7: on usbus6 Root mount waiting for: usbus0 usbus1 usbus2 usbus3 usbus4 usbus5 usbus6 usbus7 uhub3: 1 port with 1 removable, self powered uhub4: 1 port with 1 removable, self powered uhub6: 1 port with 1 removable, self powered uhub5: 1 port with 1 removable, self powered mmc0: on aw_mmc0 Cannot set frequency for clk: mmc0, error: 34 aw_mmc0: failed to set frequency to 50000000 Hz: 34 uhub1: 1 port with 1 removable, self powered uhub0: 1 port with 1 removable, self powered uhub2: 1 port with 1 removable, self powered uhub7: 1 port with 1 removable, self powered mountroot: waiting for device /dev/ufs/rootfs... Mounting from ufs:/dev/ufs/rootfs failed with error 19. Loader variables: vfs.root.mountfrom=ufs:/dev/ufs/rootfs vfs.root.mountfrom.options=rw Manual root filesystem specification: : [options] Mount using filesystem and with the specified (optional) option list. eg. ufs:/dev/da0s1a zfs:zroot/ROOT/default cd9660:/dev/cd0 ro (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) ? List valid disk boot devices . Yield 1 second (for background tasks) Abort manual input mountroot> aw_mmc0: controller timeout aw_mmc0: timeout resetting DMA/FIFO aw_mmc0: timeout updating clock random: unblocking device. aw_mmc0: controller timeout aw_mmc0: timeout resetting DMA/FIFO From owner-freebsd-arm@freebsd.org Thu Aug 27 17:02:19 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0217D3B8CC3; Thu, 27 Aug 2020 17:02:19 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcptd3pm2z3gq8; Thu, 27 Aug 2020 17:02:17 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id 07RH2LS9024400 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 27 Aug 2020 10:02:22 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id 07RH2LAU024399; Thu, 27 Aug 2020 10:02:21 -0700 (PDT) (envelope-from fbsd) Date: Thu, 27 Aug 2020 10:02:21 -0700 From: bob prohaska To: Hans Petter Selasky , bob prohaska Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org Subject: Re: Strange USB loop Message-ID: <20200827170221.GA24247@www.zefox.net> References: <20200824163736.GA9845@www.zefox.net> <42038cfd-425c-c5cd-d3de-d3cace1ecd89@selasky.org> <20200825050304.GA11333@www.zefox.net> <8be06d6f-9837-cde6-1878-a25e84656d84@selasky.org> <20200825182916.GA14015@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200825182916.GA14015@www.zefox.net> X-Rspamd-Queue-Id: 4Bcptd3pm2z3gq8 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net X-Spamd-Result: default: False [3.21 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; WWW_DOT_DOMAIN(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.26)[0.258]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.15)[0.146]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.91)[0.905]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm,freebsd-current]; MID_RHS_WWW(0.50)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 17:02:19 -0000 On Tue, Aug 25, 2020 at 11:29:16AM -0700, bob prohaska wrote: > With a _different_ FT232 plugged in it also came up normally. > > Both are thought to be genuine, but they are of different age > and produce different recognition messages: > > The FT232 that causes trouble reports > ugen1.4: at usbus1 > uftdi0 on uhub1 > uftdi0: on usbus1 > > The one that seems to work is newer and reports > ugen1.4: at usbus1 > uftdi0 on uhub1 > uftdi0: on usbus1 > > On balance I think the new kernel is better-behaved. Beyond that > I'm at a loss. If you can suggest other things to try please do. > > This morning I found on the console a message: uftdi0: at uhub1, port 3, addr 4 (disconnected) uftdi0: detached but, usbconfig -a repored ugen1.4: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (90mA) and lsusb says Bus /dev/usb Device /dev/ugen1.4: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC The FT232 is plugged directly into the Pi. This the newer, supposedly functional, ft232... Unplugging and replugging put on the console ugen1.4: at usbus1 (disconnected) uftdi0: at uhub1, port 3, addr 4 (disconnected) uftdi0: detached ugen1.4: at usbus1 uftdi0 on uhub1 uftdi0: on usbus1 But it still can't connect to the serial port of the correspondent host, which is up and running. Meanwhile, the FT232 which appeared faulty is working fine overnight on RaspiOS Buster. Thanks for reading, and any suggestions.... bob prohaska From owner-freebsd-arm@freebsd.org Fri Aug 28 02:29:25 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D01DB3CA6FE; Fri, 28 Aug 2020 02:29:25 +0000 (UTC) (envelope-from kiri@truefc.org) Received: from kx.truefc.org (1.212.52.36.ap.yournet.ne.jp [36.52.212.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp", Issuer "smtp" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bd3T02N8Hz3br2; Fri, 28 Aug 2020 02:29:23 +0000 (UTC) (envelope-from kiri@truefc.org) Received: from kx.truefc.org (kx.truefc.org [36.52.212.1]) by kx.truefc.org (8.15.2/8.15.2) with ESMTP id 07S2TD6K098319; Fri, 28 Aug 2020 11:29:13 +0900 (JST) (envelope-from kiri@kx.truefc.org) Message-Id: <202008280229.07S2TD6K098319@kx.truefc.org> Date: Fri, 28 Aug 2020 11:29:13 +0900 From: KIRIYAMA Kazuhiko To: freebsd-ports@freebsd.org Cc: freebsd-arm@freebsd.org, freebsd-virtualization@freebsd.org, kiri@truefc.org Subject: To late to build packages in arm64/aarch64 on qemu User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 MULE XEmacs/21.4 (patch 24) (Standard C) (amd64--freebsd) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4Bd3T02N8Hz3br2 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of kiri@truefc.org has no SPF policy when checking 36.52.212.1) smtp.mailfrom=kiri@truefc.org X-Spamd-Result: default: False [0.86 / 15.00]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[kiri]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.28)[0.283]; NEURAL_HAM_LONG(-0.59)[-0.591]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[truefc.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.07)[0.065]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; R_SPF_NA(0.00)[no SPF record]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:10013, ipnet:36.52.208.0/21, country:JP]; MAILMAN_DEST(0.00)[freebsd-virtualization,freebsd-arm,freebsd-ports]; ONCE_RECEIVED(0.10)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2020 02:29:25 -0000 Hi, all I'm tring to build packages in arm64/aarch64 on qemu-system-aarch64. But it's too late in comparision to amd64 on bhyve. For example, `make package-recursive' of devel/binutils on qemu takes 67 times of bhyve [1]. I found that it's difference caused from disk geometry factors such as stripesize, cylinders according to firmware and heads according to firmware [2]. I also try to test in qcow2 format with cache-size 4 GB, but nothing progress: root@vm:/vm/test # qemu-system-aarch64 -machine virt -cpu cortex-a57 -smp 4 -m 8G,maxmem=8G -name test -blockdev driver=file,node-name=hd0,filename=FreeBSD-13.0-CURRENT-arm64-aarch64.qcow2 -blockdev driver=qcow2,node-name=hda,file=hd0,overlap-check=none,cache-size=4294967296 -device virtio-blk-device,drive=hda -nographic -monitor telnet::5045,server,nowait,nodelay -serial telnet::5044,server,nowait,nodelay -bios QEMU_EFI.fd root@vm:~ # telnet localhost 5044 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. FreeBSD/arm64 (freebsd) (ttyu0) login: root Aug 28 02:25:30 freebsd login[865]: ROOT LOGIN (root) ON ttyu0 Last login: Fri Aug 28 01:14:36 on ttyu0 FreeBSD 13.0-CURRENT (GENERIC) #0 r364182: Thu Aug 13 05:44:54 UTC 2020 Welcome to FreeBSD! Release Notes, Errata: https://www.FreeBSD.org/releases/ Security Advisories: https://www.FreeBSD.org/security/ FreeBSD Handbook: https://www.FreeBSD.org/handbook/ FreeBSD FAQ: https://www.FreeBSD.org/faq/ Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc For other languages, replace "en" with a language code like de or fr. Show the version of FreeBSD installed: freebsd-version ; uname -a Please include that output and any error messages when posting questions. Introduction to manual pages: man man FreeBSD directory layout: man hier Edit /etc/motd.template to change this login announcement. root@freebsd:~ # df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ufs/rootfs 4053356 2727620 1001468 73% / devfs 1 1 0 100% /dev root@freebsd:~ # diskinfo -tv /dev/ufs/rootfs /dev/ufs/rootfs 512 # sectorsize 4295020032 # mediasize in bytes (4.0G) 8388711 # mediasize in sectors 0 # stripesize 34091520 # stripeoffset 8322 # Cylinders according to firmware. 16 # Heads according to firmware. 63 # Sectors according to firmware. # Disk descr. # Disk ident. # Attachment Yes # TRIM/UNMAP support Unknown # Rotation rate in RPM Seek times: Full stroke: 250 iter in 0.133557 sec = 0.534 msec Half stroke: 250 iter in 0.136215 sec = 0.545 msec Quarter stroke: 500 iter in 0.290992 sec = 0.582 msec Short forward: 400 iter in 0.204633 sec = 0.512 msec Short backward: 400 iter in 0.246820 sec = 0.617 msec Seq outer: 2048 iter in 1.149787 sec = 0.561 msec Seq inner: 2048 iter in 1.162127 sec = 0.567 msec Transfer rates: outside: 102400 kbytes in 0.499821 sec = 204873 kbytes/sec middle: 102400 kbytes in 0.498121 sec = 205573 kbytes/sec inside: 102400 kbytes in 0.488791 sec = 209496 kbytes/sec root@freebsd:~ # Is there any suggetions? Best regards [1] https://lists.freebsd.org/pipermail/freebsd-virtualization/2020-August/008753.html [2] https://lists.freebsd.org/pipermail/freebsd-virtualization/2020-August/008785.html --- Kazuhiko Kiriyama From owner-freebsd-arm@freebsd.org Sat Aug 29 20:57:10 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A3AE3BC492; Sat, 29 Aug 2020 20:57:10 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (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 4Bf80j2Hxhz42rh; Sat, 29 Aug 2020 20:57:09 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from localhost ([127.0.0.1] helo=id.bluezbox.com) by id.bluezbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94 (FreeBSD)) (envelope-from ) id 1kC7uN-000MD8-IY; Sat, 29 Aug 2020 13:57:07 -0700 Received: (from gonzo@localhost) by id.bluezbox.com (8.15.2/8.15.2/Submit) id 07TKv7Dn085381; Sat, 29 Aug 2020 13:57:07 -0700 (PDT) (envelope-from gonzo@bluezbox.com) X-Authentication-Warning: id.bluezbox.com: gonzo set sender to gonzo@bluezbox.com using -f Date: Sat, 29 Aug 2020 13:57:06 -0700 From: Oleksandr Tymoshenko To: KIRIYAMA Kazuhiko Cc: freebsd-ports@freebsd.org, freebsd-arm@freebsd.org, freebsd-virtualization@freebsd.org Subject: Re: To late to build packages in arm64/aarch64 on qemu Message-ID: <20200829205706.GA85254@bluezbox.com> References: <202008280229.07S2TD6K098319@kx.truefc.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202008280229.07S2TD6K098319@kx.truefc.org> X-Operating-System: FreeBSD/11.2-RELEASE-p10 (amd64) X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: KIRIYAMA Kazuhiko (kiri@truefc.org) wrote: > Hi, all > > I'm tring to build packages in arm64/aarch64 on > qemu-system-aarch64. But it's too late in comparision to > amd64 on bhyve. For example, `make [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Rspamd-Queue-Id: 4Bf80j2Hxhz42rh X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of gonzo@bluezbox.com designates 45.55.20.155 as permitted sender) smtp.mailfrom=gonzo@bluezbox.com X-Spamd-Result: default: False [-2.61 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[gonzo]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; DMARC_NA(0.00)[bluezbox.com]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-0.97)[-0.970]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.38)[-0.378]; NEURAL_HAM_MEDIUM(-0.97)[-0.966]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14061, ipnet:45.55.0.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-virtualization,freebsd-arm,freebsd-ports] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Aug 2020 20:57:10 -0000 KIRIYAMA Kazuhiko (kiri@truefc.org) wrote: > Hi, all > > I'm tring to build packages in arm64/aarch64 on > qemu-system-aarch64. But it's too late in comparision to > amd64 on bhyve. For example, `make package-recursive' of > devel/binutils on qemu takes 67 times of bhyve [1]. I found > that it's difference caused from disk geometry factors such > as stripesize, cylinders according to firmware and heads > according to firmware [2]. This is to be expected. bhyve is a hypervisor, which means that code runs on a real CPU with the performance more or less comparable with non-virtualized system. qemu-system-aarch64 is an emulator, it emulates CPU in software. There is no way to get the same level of performance from the software CPU implementation as from the native code. -- gonzo