From owner-freebsd-arm@freebsd.org Sun Nov 22 14:29:02 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 4FEA646A07B for ; Sun, 22 Nov 2020 14:29:02 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (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 4CfCMd4H8Xz3Jmp for ; Sun, 22 Nov 2020 14:29:01 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1F4605C00D5 for ; Sun, 22 Nov 2020 09:29:01 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 22 Nov 2020 09:29:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zyxst.net; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=ubdFpChfIa0m7e6iopbfG8d/SHh CRn7BvXvQL4k+/Nw=; b=MkjQrrD9DfEcwbTvefHIeKIY5DlTUKxDsNzKU2vh8/U b9iBe/f6UN5CVhuPNPVg0FopOMr+ZmBoNQwgmydEPwwfDws6wyh0Zt0+I4VhxpN9 2HSZsNS1sEQ1zCON5DfJ/iuCyjBfzqupdWAztSSEapcjealVKRFwm7Lp2eCOdYmC jls6wDiJywqRevbwNbWcFmS2Z+Lvps3WgFduPqzDDA22sFpUc01GM2fkV5iqF4it +ey8ZzG5ZwTr42/YBqbamBps8ZysUUlbj3EF1OfxyrUjpiti1iEZmm2q6QUKU5c2 /MAiRBJ8nLhXK98QELTs5FX7AuLgwdBfoosBWf/rNgw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=ubdFpC hfIa0m7e6iopbfG8d/SHhCRn7BvXvQL4k+/Nw=; b=mORksmRXN9Bqsm6/hRjNVz E724pPbjyE5+XHTmrZSJ8yxd/DFfJOML0QpAQmCRESdENRk1gD4IWQ1ju7GlfCqS KkkK2ye2U5t97Tb82RNFs3FaGuo7+XkAswf+/6Tq60WJJAkdFf7oSCuGXWNF5ydd xcTOitBqsGjuxbuW5ppoKMCiqtXr1+7FLh+Lwr9VT+2nhT9OBJn3Nde4GAtaMsPK 5j90YURG22JfLiXKpjv2yw47aDqPwwEVP9wUbh4ExPMcl90zeeIZzeEgzp9iFow+ MmOQA0++YF37h6c486y4ZUsR3iW0OB+TGrWDKhoYpF1NzWGmsvq2pdT2gGjwjgsw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeggedgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomhepthgvtghhqdhlihhsthhsuceothgvtghhqdhlihhsthhsseii hiigshhtrdhnvghtqeenucggtffrrghtthgvrhhnpedtheeigfdvudefkeekvddtfedvte dttdekuddvgeevlefftdekffdujedvhfduteenucfkphepkedvrdejtddrledurddutddu necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthgvtg hhqdhlihhsthhsseiihiigshhtrdhnvght X-ME-Proxy: Received: from rpi4.local (fws.zyxst.net [82.70.91.101]) by mail.messagingengine.com (Postfix) with ESMTPA id A34663280059 for ; Sun, 22 Nov 2020 09:29:00 -0500 (EST) Date: Sun, 22 Nov 2020 14:28:59 +0000 From: tech-lists To: freebsd-arm@freebsd.org Subject: Re: RPI4 boot with ZFS supported? (was: Re: rpi4 no boot 20201112 snapshot (success with 20201105)) Message-ID: Mail-Followup-To: freebsd-arm@freebsd.org References: <52C8B73F-05F1-4FD5-AA21-73D2ABC90E0A@googlemail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="V/MFld1UcYMwEs3s" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4CfCMd4H8Xz3Jmp X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=zyxst.net header.s=fm1 header.b=MkjQrrD9; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=mORksmRX; dmarc=none; spf=pass (mx1.freebsd.org: domain of tech-lists@zyxst.net designates 66.111.4.28 as permitted sender) smtp.mailfrom=tech-lists@zyxst.net X-Spamd-Result: default: False [-5.70 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[66.111.4.28:from]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.28:c]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[zyxst.net:+,messagingengine.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; SIGNED_PGP(-2.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.28:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[66.111.4.28:from]; RCVD_TLS_LAST(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[zyxst.net:s=fm1,messagingengine.com:s=fm1]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[zyxst.net]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[66.111.4.28:from:127.0.2.255]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2020 14:29:02 -0000 --V/MFld1UcYMwEs3s Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 21, 2020 at 03:07:27PM +0100, Ronald Klop wrote: >I suppose it does support ZFS: It does. I run poudriere on mine, building ports for itself and other rpi3s and rpi2s. Would it be helpful if I wrote up a config somewhere and posted it here? I'm not booting to ssd/external though. I keep almost all data on a zfs-usb3 external hd, in case the sdcard goes bad. --=20 J. --V/MFld1UcYMwEs3s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE8n3tWhxW11Ccvv9/s8o7QhFzNAUFAl+6daoACgkQs8o7QhFz NAUSkA//cw7w1rVjAQtat0MBPm+OwubHpSDTXgqojH8tygKW6gcgeuK2pWKwSN4p UezQvletMKMVRZW5TnwkyYMF8cr5mtw2wgeegl5gOwGXntyP9RDnu7quS+V6HSu1 wbRet2PdDarpEfZJcwIn9S72oEuupzQj3/DVEvfsiMoHNjd3P5aDlec9htkrYm3D dAtlhhTbk0lf1AmcHH7mi9FfDSgQ7sbgwaD9cMR5IKbYJBPLgd4xjKpJ4V/eQlKL ST+7wxZ1DS569nl1gMuALRh9+NZcB0bPxrkZDaKKUj4J4B86XJmhq+S/zlwUH/Ik NJ5G/LQRfKhlh2yPAIlc/YRkzdMMVd4HU1aORlvDNsi+T7BCg1JWFPAg+gItYsoG V6VPShxMR3RPsnMYfYD6nvMgObJQ6InfG+VVaYZoJedDfIoSdWfBivDfpGIAS6ji RRmhHzNYU2ViPExwalxeHzuHmCW+BKv1prAKGgu3nJD2ZOmVq6qAbHupdVs04g8L NX94oZiZQnGNfeO4v55ToxRzvH8OwbbDikHlNJFOwa7FH5SqapwBtn7qWbbT7Kip uMwiCNyeBQPU481rTx2lvjejROeFxfAP8YUtI7GF7WilrCXgFeEbtPHHjNM3dR7P stUSrpY1qMYubCL4V73oWTiz1R1FTGNpr3ZmnB923gaXKRdmqqk= =ity1 -----END PGP SIGNATURE----- --V/MFld1UcYMwEs3s-- From owner-freebsd-arm@freebsd.org Sun Nov 22 20:03: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 75F06472DCF for ; Sun, 22 Nov 2020 20:03:47 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (phouka1.phouka.net [107.170.196.116]) (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 "phouka.net", Issuer "Go Daddy Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CfLnt24nqz3vJh for ; Sun, 22 Nov 2020 20:03:46 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (localhost [127.0.0.1]) by phouka1.phouka.net (8.16.1/8.16.1) with ESMTPS id 0AMK2NXh077641 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Sun, 22 Nov 2020 12:02:23 -0800 (PST) (envelope-from warlock@phouka1.phouka.net) Received: (from warlock@localhost) by phouka1.phouka.net (8.16.1/8.16.1/Submit) id 0AMK2Nkr077640 for freebsd-arm@freebsd.org; Sun, 22 Nov 2020 12:02:23 -0800 (PST) (envelope-from warlock) Date: Sun, 22 Nov 2020 12:02:23 -0800 From: John Kennedy To: freebsd-arm@freebsd.org Subject: Re: tmp and tmpfs Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4CfLnt24nqz3vJh X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of warlock@phouka1.phouka.net has no SPF policy when checking 107.170.196.116) smtp.mailfrom=warlock@phouka1.phouka.net X-Spamd-Result: default: False [-1.80 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[107.170.196.116:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[107.170.196.116:from:127.0.2.255]; DMARC_NA(0.00)[phouka.net]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[warlock@phouka.net,warlock@phouka1.phouka.net]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14061, ipnet:107.170.192.0/18, country:US]; FROM_NEQ_ENVFROM(0.00)[warlock@phouka.net,warlock@phouka1.phouka.net]; MAILMAN_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2020 20:03:47 -0000 I found that my choke point was relinking the kernel during the build. On Wed, Nov 18, 2020 at 11:22:33PM +0000, tech-lists wrote: > On Wed, Nov 18, 2020 at 07:25:19AM +0000, Robert Crowston wrote: > >It?ll be significantly faster in memory, it depends if you want to > >spare the ram. > > > >How many temporary files do you have? > > Hi, > > I'm not sure ;) > > I'm not even sure how much space I'll need. Think I'll just have > to test and see. The pi4 isn't used for xorg at all, though things > like mutt and imapsync might use tmp a lot. On a desktop running > kf5-plasma/firefox and all the trimmings, tmp stands at 8.1GB > and the system was rebooted only a couple days ago. The pi4 > has just finished building world/kernel and tmp is 282k. > > Maybe set it to 1GB. I was wondering really if memory pressure > pushes this to swap, if there would be slowdown more significant > overall than if /tmp was just on zfs From owner-freebsd-arm@freebsd.org Mon Nov 23 22:50: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 F131946E08B for ; Mon, 23 Nov 2020 22:50:47 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.88]) (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 4Cg2S66n4vz4rH8 for ; Mon, 23 Nov 2020 22:50:46 +0000 (UTC) (envelope-from ronald-lists@klop.ws) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=klop.ws; s=mail; h=In-Reply-To:Message-ID:From:Content-Transfer-Encoding:MIME-Version: Date:References:Subject:To:Content-Type:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ncExc0pRK1IAtokRMph+KCW1PiDCBsKUq+JC7OZT8ms=; b=axlq4yD+C1YT0poVGD4mdua0WB v7I5w7yi3xhurdwsEmzk6EjHP8W1bzd44meU2OXlE/ijn4z0J0fZ4z10AcgTZEnOS+vmHcnhAW3pT 60lxg5uCtaxfuktl/7YZXsXww0yRTENjQa9yKZXDivjdozIve7aTWLXbd6dw4Y/v9aA0=; Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-arm@freebsd.org, tech-lists Subject: Re: RPI4 boot with ZFS supported? (was: Re: rpi4 no boot 20201112 snapshot (success with 20201105)) References: <52C8B73F-05F1-4FD5-AA21-73D2ABC90E0A@googlemail.com> Date: Mon, 23 Nov 2020 23:50:43 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.greenhost.nl X-Spam-Level: --- X-Spam-Score: -3.1 X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF autolearn=disabled version=3.4.2 X-Scan-Signature: 5a1627636b35b65657045ef62631cd80 X-Rspamd-Queue-Id: 4Cg2S66n4vz4rH8 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=mail header.b=axlq4yD+; dmarc=pass (policy=none) header.from=klop.ws; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 195.190.28.88 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-3.49 / 15.00]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[195.190.28.88:from]; R_DKIM_ALLOW(-0.20)[klop.ws:s=mail]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[195.190.28.88:from]; R_SPF_ALLOW(-0.20)[+ip4:195.190.28.64/27]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; SPAMHAUS_ZRD(0.00)[195.190.28.88:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[klop.ws:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[195.190.28.88:from]; NEURAL_HAM_SHORT(-0.99)[-0.992]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,none]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:47172, ipnet:195.190.28.0/24, country:NL]; SUBJECT_HAS_QUESTION(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2020 22:50:48 -0000 On Sun, 22 Nov 2020 15:28:59 +0100, tech-lists wrote: > On Sat, Nov 21, 2020 at 03:07:27PM +0100, Ronald Klop wrote: > >> I suppose it does support ZFS: > > It does. I run poudriere on mine, building ports for itself and other > rpi3s and rpi2s. > > Would it be helpful if I wrote up a config somewhere and posted > it here? > > I'm not booting to ssd/external though. I keep almost all data > on a zfs-usb3 external hd, in case the sdcard goes bad. I succeeded in running the rpi4 booted from ZFS on USB. root@generic:/var/log # gpart show => 40 1953458096 da0 GPT (931G) 40 102400 1 efi (50M) 102440 8388608 2 freebsd-swap (4.0G) 8491048 1944967088 3 freebsd-zfs (927G) root@generic:/var/log # bectl list BE Active Mountpoint Space Created default NR / 2.54G 2020-11-23 22:10 I like it a lot. Will run some makeworld stuff tomorrow. Thanks to everybody who makes this stuff possible. Regards, Ronald. From owner-freebsd-arm@freebsd.org Tue Nov 24 20:14:49 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 CEA1E4685CE for ; Tue, 24 Nov 2020 20:14:49 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.20]) (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.rzone.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CgZxh5JBZz58mW for ; Tue, 24 Nov 2020 20:14:48 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606248886; s=strato-dkim-0002; d=obsigna.com; h=To:Date:Message-Id:Subject:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=ZS8RLGE4wA3SHRYVDo3epq+YMJLLLOhfREcrRDgEfWM=; b=hD5sSteAt4WUBrTG77xra2MBv6tucPQvIL7ykZViJ1DZKm6vKQVe4gsfplPH2XwTIf 2cyngxBf52dpmBu0ygwfE0XAjhpmMnorW+MiNORkazud76Hy0sadZEDJVjUSAhxkbl+y Xoy1NvznjMmGBfpO0YzO9Gw5UxnFtujheSCUlJQir0T3GWcH8nZcbLDytwE2CiS1GR6a XP44RqTqxkv4bUIH9YfMyE0BIS8es2WWhzfhgash7QhR95pti9hI0jacoZB54VLbQGMN Uzy15plVyqunXh0ADqnT1YD/3r4nQPO9S3+pIeTozdth+JPjt9XRQMFXsKpzWOyW7Q3o fjlw== X-RZG-AUTH: ":O2kGeEG7b/pS1F2rRHW2isrKl4DV03XBEi+I6ZuztdvN9wS3wFGySS4Lw+ldTBio0dVbInGjc9RnD7rYRqs=" X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com by smtp.strato.de (RZmta 47.3.3 DYNA|AUTH) with ESMTPSA id U0af7bwAOKEj4jE (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Tue, 24 Nov 2020 21:14:45 +0100 (CET) Received: from rolf-mini.obsigna.com (rolf-mini.obsigna.com [192.168.222.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 3C4851350F91D for ; Tue, 24 Nov 2020 17:14:41 -0300 (-03) From: "Dr. Rolf Jansen" Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: User Space GPIO Interrupt programming - GSoC-2018 Message-Id: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> Date: Tue, 24 Nov 2020 17:14:40 -0300 To: freebsd-arm@freebsd.org X-Mailer: Apple Mail (2.3445.104.15) X-Rspamd-Queue-Id: 4CgZxh5JBZz58mW X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=obsigna.com header.s=strato-dkim-0002 header.b=hD5sSteA; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-rj@obsigna.com designates 85.215.255.20 as permitted sender) smtp.mailfrom=freebsd-rj@obsigna.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[85.215.255.20:from]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:85.215.255.0/24]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[obsigna.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[85.215.255.20:from]; ASN(0.00)[asn:6724, ipnet:85.215.255.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[obsigna.com:s=strato-dkim-0002]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[obsigna.com]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[85.215.255.20:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[85.215.255.20:from]; FROM_NAME_HAS_TITLE(1.00)[dr]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 20:14:49 -0000 Hello Has anything of the GSoC-2018 efforts made it into the current code = base? = https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a = BeagleBone Black which was one of the implementation targets of said = project, but when running the test tools, I either see cannot = read/kevent/poll/aio_read - Operation not supported by device or = Inappropriate ioctl for device. Perhaps I need to pull the project=E2=80=99s changes into the kernel by = myself. However, before this I would like to ask whether it is worth the = effort. Please, can anyone shed some light on this. Best regards Rolf= From owner-freebsd-arm@freebsd.org Tue Nov 24 20:29: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 391A046866C for ; Tue, 24 Nov 2020 20:29:20 +0000 (UTC) (envelope-from freebsd@viruzzz.org) Received: from mail.viruzzz.org (mail.viruzzz.org [IPv6:2001:67c:380:124::3]) (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 4CgbGR2s55z3BqZ for ; Tue, 24 Nov 2020 20:29:19 +0000 (UTC) (envelope-from freebsd@viruzzz.org) Received: from [192.168.252.63] (helo=ohm.local) by mail.viruzzz.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1khew1-000HnL-FX for freebsd-arm@freebsd.org; Tue, 24 Nov 2020 23:29:09 +0300 Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 To: freebsd-arm@freebsd.org References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> From: Vladimir Message-ID: <4ab92d6f-6a59-6ace-de47-68c5833e017a@viruzzz.org> Date: Tue, 24 Nov 2020 23:29:08 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> Content-Type: text/plain; charset=utf-8 Content-Language: ru Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4CgbGR2s55z3BqZ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@viruzzz.org has no SPF policy when checking 2001:67c:380:124::3) smtp.mailfrom=freebsd@viruzzz.org X-Spamd-Result: default: False [-2.09 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:67c:380:124::3:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[viruzzz.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2001:67c:380:124::3:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.989]; 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:41599, ipnet:2001:67c:380::/48, country:RU]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 20:29:20 -0000 Hi. I doing same thing right now. I going to try build 12.2 with patches from git. 2020-11-24 23:14, Dr. Rolf Jansen пишет: > Hello > > Has anything of the GSoC-2018 efforts made it into the current code base? > > https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts > > I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a BeagleBone Black which was one of the implementation targets of said project, but when running the test tools, I either see cannot read/kevent/poll/aio_read - Operation not supported by device or Inappropriate ioctl for device. > > Perhaps I need to pull the project’s changes into the kernel by myself. However, before this I would like to ask whether it is worth the effort. > > Please, can anyone shed some light on this. > > Best regards > > Rolf > _______________________________________________ > 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" > -- With best regards, Vladimir Goncharov From owner-freebsd-arm@freebsd.org Tue Nov 24 20:32:09 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 503104689D5 for ; Tue, 24 Nov 2020 20:32:09 +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 4CgbKh5vQ8z3CGy for ; Tue, 24 Nov 2020 20:32:08 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1606249927; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=KJg6P1keN9MKTK+46wu4JpnzqYDrOI68SGNT0YICBnqVAlFFQ9wLMJRsSC01q0AavIMSj07F4QpCR KzYR6lZk9mfqJqARrB0Nme46pYSiDtW019KsSlr+aToTOVnD3DoJapfpo0RhPQR6nvMTGSBfAhskJ4 xeGogcPSGJ7fMzug5VpDar/+eS3481eZ9O8lCqYdxsM3Hxf0/4Fh1y1O8EHniOO+YaJe6/vFGzWAm9 V3kZjkFGod0jwgLg3P8mSoX0C6ReG0LgD8NIJMvWCnZxeDByKo6a+tyAo9gwUmN9GMigsy69iZXC/e XWjbwN2rMmQ63hQCI6OGhKvzscxO/0g== 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=+2l3JtcRZvzOAW5cEsLiY1e2U/Bk2uUtz3ozC87n9Co=; b=v83o64r0W1RBsK6jJtsS+StM1VaWYEeH1dPM/5dhcaHLYMfj3bmfUNdxX0zjmaYVhG5y4B/PpcGzd lbqwTf1tVp1EFnlET7eSU+tQ2BlVPmesZIP7aF4+byJVxNzXzuJsVG4SACuj8LYmoTeCW9x6901oUX nouGMJH1JiIGHIoxg4PkyVXxifzDMY9G1qlRueM/whUZGBh5GzFe0h8YWFV2Lu/+9mYOx2KekJIYwC TcLcvkpy5POqjAjf5qX7H+W8Gngq9jiHZnV8HDM3NCFUBys6/woDEMSn9tgje6RD1Nrzd8is7ly/is 0wQSPdjSBYdCGB5Dl+cY97/uTyoDoLQ== 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=+2l3JtcRZvzOAW5cEsLiY1e2U/Bk2uUtz3ozC87n9Co=; b=tzBBhK2re3JOhmhs4KkEXbyp1LGu0JDzyNu8i5yY9d7Kkc1G3aVDMOHTtSPRPUzNhpBiqMZJnFbjj AyrYG8XfFZYzeHFuTIgtvGbRKKdK7QmvT7bIQnb68mYDsV4levyysRLV0AD/NyzQnRQj6G9913V05l 9x4GAtj+9rz0A21hfyEWKeatUSKtjIXDxNq/wZhWReib3dFjFcTItegUcjbN5vy1Z3/CyJ1KHhWVu5 GFwbm3HCtS1yQmqoSOERQ+CJ4jH4FfRB896kVMTfaW8qwy8yBEaXXve2hauKdYRQdXwAZlRRMjti69 5b1FtQSGeuPY7vcI6n2YIkoVzWT2zsA== X-MHO-RoutePath: aGlwcGll X-MHO-User: 1d37f13e-2e94-11eb-9e12-df46ed8f892f 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 1d37f13e-2e94-11eb-9e12-df46ed8f892f; Tue, 24 Nov 2020 20:32:06 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 0AOKW4Hi069451; Tue, 24 Nov 2020 13:32:04 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: Ian Lepore To: "Dr. Rolf Jansen" , freebsd-arm@freebsd.org Date: Tue, 24 Nov 2020 13:32:04 -0700 In-Reply-To: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> Content-Type: text/plain; charset="iso-8859-7" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4CgbKh5vQ8z3CGy 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.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 20:32:09 -0000 On Tue, 2020-11-24 at 17:14 -0300, Dr. Rolf Jansen wrote: > Hello > > Has anything of the GSoC-2018 efforts made it into the current code > base? > > https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts > > I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a > BeagleBone Black which was one of the implementation targets of said > project, but when running the test tools, I either see cannot > read/kevent/poll/aio_read - Operation not supported by device or > Inappropriate ioctl for device. > > Perhaps I need to pull the project¢s changes into the kernel by > myself. However, before this I would like to ask whether it is worth > the effort. > > Please, can anyone shed some light on this. > > Best regards > > Rolf > I have had that webpage open (but docked) for literally a year, eternally hoping that I can find time to get to it and somehow get it committed, or maybe use it as the basis for something to be committed (I haven't even looked at it close enough to see if it's commit-quality code or what). I'm curious: What particular need do you have for userspace gpio interrupts? What would you like the API to look like (do you like the things listed at that page, or would you prefer something else)? Interrupts is probably not a good name, because it isn't really going to act like an interrupt does for kernel code. It's really just pin- change notifications delivered to userland. -- Ian From owner-freebsd-arm@freebsd.org Tue Nov 24 20:45:51 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 98CAC469044 for ; Tue, 24 Nov 2020 20:45:51 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.21]) (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.rzone.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CgbdV3kWlz3Cs9; Tue, 24 Nov 2020 20:45:49 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606250748; s=strato-dkim-0002; d=obsigna.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=IDVvhAJt5qqmbNK1hEs4WF0NRWx/4/ww20Js7TpKjFs=; b=NAKA7O8FlsD8utDzZlgzSE17u2q8DFrp/sQc7399e0HA1M1HyYf7nJk+3ksKMtFeVu CoijKpZwsHusJXpTCFK4+95NlT8sWWn4aDy214JNyxfYmtuiuWIB9IZJ9jZbShfT6f2D t7W6PmYRG318t/7793l+Ycy41DcZXPeE/mSgs9rFzLFS7Iq7fZmz6LTl0e7TLZeIXC5v U2nbqrBIqP9RNLTQDVmNYYtwybqr8rZ8VcGq1GgyQupbVZjTycEo9JRjFT5N7bpH07SM RtVDHQqVufIby5etfQ0Q2CGVs1Sp/wbF58IQplpXRUoRj4/ENJCAUFPZSauk0MF24eAY f5Yw== X-RZG-AUTH: ":O2kGeEG7b/pS1F2rRHW2isrKl4DV03XBEi+I6ZuztdvN9wS3wFGySS4Lw+ldTBio0dVbInGjc9RnD7rYRqs=" X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com by smtp.strato.de (RZmta 47.3.3 DYNA|AUTH) with ESMTPSA id U0af7bwAOKjm4lw (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 24 Nov 2020 21:45:48 +0100 (CET) Received: from rolf-mini.obsigna.com (rolf-mini.obsigna.com [192.168.222.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 6091B1350F91D; Tue, 24 Nov 2020 17:45:45 -0300 (-03) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: "Dr. Rolf Jansen" In-Reply-To: Date: Tue, 24 Nov 2020 17:45:44 -0300 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <2126F3C0-D877-4483-9041-9FC84B9C8D3E@obsigna.com> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> To: Ian Lepore X-Mailer: Apple Mail (2.3445.104.15) X-Rspamd-Queue-Id: 4CgbdV3kWlz3Cs9 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=obsigna.com header.s=strato-dkim-0002 header.b=NAKA7O8F; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-rj@obsigna.com designates 85.215.255.21 as permitted sender) smtp.mailfrom=freebsd-rj@obsigna.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:85.215.255.0/24]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[obsigna.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[85.215.255.21:from]; ASN(0.00)[asn:6724, ipnet:85.215.255.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[obsigna.com:s=strato-dkim-0002]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[obsigna.com]; SPAMHAUS_ZRD(0.00)[85.215.255.21:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[85.215.255.21:from]; FROM_NAME_HAS_TITLE(1.00)[dr]; RWL_MAILSPIKE_POSSIBLE(0.00)[85.215.255.21:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 20:45:51 -0000 > Am 24.11.2020 um 17:32 schrieb Ian Lepore : >=20 > On Tue, 2020-11-24 at 17:14 -0300, Dr. Rolf Jansen wrote: >> Hello >>=20 >> Has anything of the GSoC-2018 efforts made it into the current code >> base? >>=20 >>=20 > = https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts >>=20 >> I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a >> BeagleBone Black which was one of the implementation targets of said >> project, but when running the test tools, I either see cannot >> read/kevent/poll/aio_read - Operation not supported by device or >> Inappropriate ioctl for device. >>=20 >> Perhaps I need to pull the project=E2=80=99s changes into the kernel = by >> myself. However, before this I would like to ask whether it is worth >> the effort. >>=20 >> Please, can anyone shed some light on this. >>=20 >> Best regards >>=20 >> Rolf >>=20 >=20 > I have had that webpage open (but docked) for literally a year, > eternally hoping that I can find time to get to it and somehow get it > committed, or maybe use it as the basis for something to be committed > (I haven't even looked at it close enough to see if it's = commit-quality=20 > code or what). >=20 > I'm curious: What particular need do you have for userspace gpio > interrupts? What would you like the API to look like (do you like the > things listed at that page, or would you prefer something else)? >=20 > Interrupts is probably not a good name, because it isn't really going > to act like an interrupt does for kernel code. It's really just pin- > change notifications delivered to userland. I was asked to jump into a project where push buttons and pulses from a = rotary encoder (all connected to GPIO's) would invoke some programmed = actions. Polling the GPIO's would be too faulty. To me "pin-change = notifications delivered to userland" sounds not too bad for my purpose. = However, I won't say no for a real threaded GPIO interrupt handler = facility, which presumably would serve perfectly as well. Thank you for answering Best regards Rolf= From owner-freebsd-arm@freebsd.org Tue Nov 24 20:57:01 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 4A5E8469C94 for ; Tue, 24 Nov 2020 20:57:01 +0000 (UTC) (envelope-from oskar.holmlund@yahoo.com) Received: from sonic307-54.consmr.mail.ir2.yahoo.com (sonic307-54.consmr.mail.ir2.yahoo.com [87.248.110.31]) (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 4CgbtN1vpDz3HbH for ; Tue, 24 Nov 2020 20:57:00 +0000 (UTC) (envelope-from oskar.holmlund@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1606251417; bh=83PmVS988p+3VzfFpUh+qVH2lBmsB4OhoY0rlTN3Mfw=; h=Date:From:To:Subject:From:Subject; b=R/e8OvTyA05vB22i8VTSFlRXxbL72AOKuu9Uil0rfY+c2ldLU7QJMixT2YB5hRx+5gGEXaY/KGpdNHxvKKy6FHH+FcPSPVuOYkk38yTKiRcE1RV9usC1F+spMu2NZuK463B3q0ZM9AD/c5o1qcMig8nEtsO7J1j46pJDazv8M532zcGwr6zulqPGp1VVZIzRVw18Fnm9zr6PDI2bKM2t8q9D7qcAY13yap6tvfOegQp3WZeZovxMYCu10zf5Rnjpkkq/CnP2WEL2kjAb5vDYPVXIJ+w1b78cO050XO6yWkBHIbWoD+o8Duqt+LKUoPuInVwY0z6lDcr6SOOjSOcuAg== X-YMail-OSG: TSFXCcAVM1m_8xVbt2lMHU9rxF4RxPA81wxNfz1FNmqhhdT7JAUzOAmESCtLw3w C.drF0oyWyT.ueqEUdE4fGAUNNXJd_E4g24pfh7lnUn0KxFIBdaTqLLRytBYhmCbbvxM56jX2C.Z cWuVmAleIgZQShz7p4nnawVz_W4se5ifzqITAHRIvkyI9Ro4GW2pva2DgLjpi3lSI_U5BWwtif9j bKdY4JYlrJDigr9_u9YdjA9PojCfNHT00R6PcxMoHxOCuheABfujMCDvM6yvaa605s1sQYBnbvQh C0v3FGY4PiEsUkvAuTmO9_UZbEwGWbRdNCtF9o5UynkBOhB3Nnxov_1Vh7h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24 Nov 2020 20:56:55 +0000 (UTC) From: Oskar Holmlund To: freebsd-arm@freebsd.org, "Dr. Rolf Jansen" Message-ID: <756100520.1642116.1606251415012@mail.yahoo.com> In-Reply-To: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 MIME-Version: 1.0 X-Mailer: WebService/1.1.17111 YMailNodin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0 X-Rspamd-Queue-Id: 4CgbtN1vpDz3HbH X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.04 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:34010, ipnet:87.248.110.0/24, country:GB]; RBL_DBL_DONT_QUERY_IPS(0.00)[87.248.110.31:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.96)[0.960]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; SPAMHAUS_ZRD(0.00)[87.248.110.31:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[87.248.110.31:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[87.248.110.31:from]; RCVD_COUNT_TWO(0.00)[2]; 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.34 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 20:57:01 -0000 =20 > Den tisdag 24 november 2020 21:14:58 CET, Dr. Rolf Jansen skrev: >=20 >=20 > Hello >=20 > Has anything of the GSoC-2018 efforts made it into the current code base? > > https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts >=20 > I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a BeagleBone= Black which was one of the implementation targets of said=20 > project, but when running the test tools, I either see cannot read/kevent= /poll/aio_read - Operation not supported by device or Inappropriate=20 > ioctl for device. > > Perhaps I need to pull the project=E2=80=99s changes into the kernel by m= yself. However, before this I would like to ask whether it is worth the eff= ort. >=20 > Please, can anyone shed some light on this. > > Best regards > > Rolf > _______________________________________________ > 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" Hi Rolf, I dont have any details about the GSOC. But the code is not in base. I have written a similar driver for my needs. It is much simpler and provid= es a notification to userland through kqueue events in the event of a chang= e and counts the number of changes that have taken place over time. I can share the code if you want. //Oskar =20 From owner-freebsd-arm@freebsd.org Tue Nov 24 21:01:23 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 E9FC6469E30 for ; Tue, 24 Nov 2020 21:01:23 +0000 (UTC) (envelope-from freebsd@viruzzz.org) Received: from mail.viruzzz.org (mail.viruzzz.org [IPv6:2001:67c:380:124::3]) (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 4CgbzR1mHfz3Hst for ; Tue, 24 Nov 2020 21:01:22 +0000 (UTC) (envelope-from freebsd@viruzzz.org) Received: from [192.168.252.63] (helo=ohm.local) by mail.viruzzz.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1khfRA-000Iyf-Vj for freebsd-arm@freebsd.org; Wed, 25 Nov 2020 00:01:21 +0300 Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 To: freebsd-arm@freebsd.org References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <756100520.1642116.1606251415012@mail.yahoo.com> From: Vladimir Message-ID: <2afbc400-d8f9-2d46-0136-9b66140ee466@viruzzz.org> Date: Wed, 25 Nov 2020 00:01:20 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <756100520.1642116.1606251415012@mail.yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Language: ru Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4CgbzR1mHfz3Hst X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@viruzzz.org has no SPF policy when checking 2001:67c:380:124::3) smtp.mailfrom=freebsd@viruzzz.org X-Spamd-Result: default: False [-2.10 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:67c:380:124::3:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[viruzzz.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2001:67c:380:124::3:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; 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:41599, ipnet:2001:67c:380::/48, country:RU]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 21:01:24 -0000 It would be nice if you share you code, especially if it simpler. 2020-11-24 23:56, Oskar Holmlund via freebsd-arm пишет: > >> Den tisdag 24 november 2020 21:14:58 CET, Dr. Rolf Jansen skrev: >> >> >> Hello >> >> Has anything of the GSoC-2018 efforts made it into the current code base? >> >> https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts >> >> I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a BeagleBone Black which was one of the implementation targets of said >> project, but when running the test tools, I either see cannot read/kevent/poll/aio_read - Operation not supported by device or Inappropriate >> ioctl for device. >> >> Perhaps I need to pull the project’s changes into the kernel by myself. However, before this I would like to ask whether it is worth the effort. >> >> Please, can anyone shed some light on this. >> >> Best regards >> >> Rolf >> _______________________________________________ >> 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" > > Hi Rolf, > > I dont have any details about the GSOC. > But the code is not in base. > > I have written a similar driver for my needs. It is much simpler and provides a notification to userland through kqueue events in the event of a change and counts the number of changes that have taken place over time. > I can share the code if you want. > > //Oskar > _______________________________________________ > 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" > -- With best regards, Vladimir Goncharov From owner-freebsd-arm@freebsd.org Tue Nov 24 21:04:53 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 16AC946A040 for ; Tue, 24 Nov 2020 21:04:53 +0000 (UTC) (envelope-from freebsd@viruzzz.org) Received: from mail.viruzzz.org (mail.viruzzz.org [IPv6:2001:67c:380:124::3]) (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 4Cgc3S3TPRz3J6b for ; Tue, 24 Nov 2020 21:04:52 +0000 (UTC) (envelope-from freebsd@viruzzz.org) Received: from [192.168.252.63] (helo=ohm.local) by mail.viruzzz.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1khfUY-000J0a-LH for freebsd-arm@freebsd.org; Wed, 25 Nov 2020 00:04:50 +0300 Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 To: freebsd-arm@freebsd.org References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <2126F3C0-D877-4483-9041-9FC84B9C8D3E@obsigna.com> From: Vladimir Message-ID: <4bdd8fe1-7b4c-6186-3ce3-f85c67c0b805@viruzzz.org> Date: Wed, 25 Nov 2020 00:04:49 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <2126F3C0-D877-4483-9041-9FC84B9C8D3E@obsigna.com> Content-Type: text/plain; charset=utf-8 Content-Language: ru Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Cgc3S3TPRz3J6b X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@viruzzz.org has no SPF policy when checking 2001:67c:380:124::3) smtp.mailfrom=freebsd@viruzzz.org X-Spamd-Result: default: False [-2.10 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:67c:380:124::3:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[viruzzz.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2001:67c:380:124::3:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; 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:41599, ipnet:2001:67c:380::/48, country:RU]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 21:04:53 -0000 Are you going to poll encoders same way? I need interface encoders too. BBB has dedicated eQEP hardware, but it seems to be difficult to run eQEP under freebsd. So I thinking about PRU for handling encoders. 2020-11-24 23:45, Dr. Rolf Jansen пишет: >> Am 24.11.2020 um 17:32 schrieb Ian Lepore : >> >> On Tue, 2020-11-24 at 17:14 -0300, Dr. Rolf Jansen wrote: >>> Hello >>> >>> Has anything of the GSoC-2018 efforts made it into the current code >>> base? >>> >>> >> https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts >>> >>> I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a >>> BeagleBone Black which was one of the implementation targets of said >>> project, but when running the test tools, I either see cannot >>> read/kevent/poll/aio_read - Operation not supported by device or >>> Inappropriate ioctl for device. >>> >>> Perhaps I need to pull the project’s changes into the kernel by >>> myself. However, before this I would like to ask whether it is worth >>> the effort. >>> >>> Please, can anyone shed some light on this. >>> >>> Best regards >>> >>> Rolf >>> >> >> I have had that webpage open (but docked) for literally a year, >> eternally hoping that I can find time to get to it and somehow get it >> committed, or maybe use it as the basis for something to be committed >> (I haven't even looked at it close enough to see if it's commit-quality >> code or what). >> >> I'm curious: What particular need do you have for userspace gpio >> interrupts? What would you like the API to look like (do you like the >> things listed at that page, or would you prefer something else)? >> >> Interrupts is probably not a good name, because it isn't really going >> to act like an interrupt does for kernel code. It's really just pin- >> change notifications delivered to userland. > > I was asked to jump into a project where push buttons and pulses from a rotary encoder (all connected to GPIO's) would invoke some programmed actions. Polling the GPIO's would be too faulty. To me "pin-change notifications delivered to userland" sounds not too bad for my purpose. However, I won't say no for a real threaded GPIO interrupt handler facility, which presumably would serve perfectly as well. > > Thank you for answering > > Best regards > > Rolf > _______________________________________________ > 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" > -- With best regards, Vladimir Goncharov From owner-freebsd-arm@freebsd.org Tue Nov 24 21:26:48 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 121AF46B394 for ; Tue, 24 Nov 2020 21:26:48 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.221]) (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.rzone.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CgcXl03zjz3L47 for ; Tue, 24 Nov 2020 21:26:46 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606253205; s=strato-dkim-0002; d=obsigna.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=11EKE9Vs9jRq/NEKJAmtOxnisDRtf+R+0fuGBCaK5Go=; b=oO3VJe4QxO4PN9kaSlBNG4utdKCHTRpFRlsDJdGu2Ih3n1RdRNM294tTKv4PZeUp2p Nt4JM/LTXigs1tLc347B3TUJ3z1zl7qG/wXf7cIJp+mACR5vXyvmcTwVlwDzdZkeI4C0 CQPm2OInu1IxEWP3USc+nA6/wNlurhqGh979a3ARVdeS3dlsjB3gxEHZrBJfYE91ppMV 4KL7R/bRjzeDxDiQUDH4Pz6Udrvx0VL2Il4VdUN54RkdrJ1AjyXQ5dp7KkzAxjtthsMF 3Ym+71qo9z8ajZqxC6cWOtDiOcTZeIRAZcPcCUhjNAo97qNPKHol4w34LsrQ0U7spb7Z iCQQ== X-RZG-AUTH: ":O2kGeEG7b/pS1F2rRHW2isrKl4DV03XBEi+I6ZuztdvN9wS3wFGySS4Lw+ldTBio0dVbInGjc9RnD7rYRqs=" X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com by smtp.strato.de (RZmta 47.3.3 DYNA|AUTH) with ESMTPSA id U0af7bwAOLQg4pN (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 24 Nov 2020 22:26:42 +0100 (CET) Received: from rolf-mini.obsigna.com (rolf-mini.obsigna.com [192.168.222.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 7F9D91350F91D; Tue, 24 Nov 2020 18:26:39 -0300 (-03) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: "Dr. Rolf Jansen" In-Reply-To: <756100520.1642116.1606251415012@mail.yahoo.com> Date: Tue, 24 Nov 2020 18:26:38 -0300 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <61B0CE7A-8F57-48BD-98D4-BE6E880E7707@obsigna.com> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <756100520.1642116.1606251415012@mail.yahoo.com> To: Oskar Holmlund X-Mailer: Apple Mail (2.3445.104.15) X-Rspamd-Queue-Id: 4CgcXl03zjz3L47 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=obsigna.com header.s=strato-dkim-0002 header.b=oO3VJe4Q; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-rj@obsigna.com designates 81.169.146.221 as permitted sender) smtp.mailfrom=freebsd-rj@obsigna.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:81.169.146.128/25:c]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[obsigna.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[81.169.146.221:from]; ASN(0.00)[asn:6724, ipnet:81.169.144.0/22, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[obsigna.com:s=strato-dkim-0002]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[obsigna.com]; SPAMHAUS_ZRD(0.00)[81.169.146.221:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[81.169.146.221:from]; FROM_NAME_HAS_TITLE(1.00)[dr]; RWL_MAILSPIKE_POSSIBLE(0.00)[81.169.146.221:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 21:26:48 -0000 > Am 24.11.2020 um 17:56 schrieb Oskar Holmlund = : >=20 > > Den tisdag 24 november 2020 21:14:58 CET, Dr. Rolf Jansen = skrev: > >=20 > >=20 > > Hello > >=20 > > Has anything of the GSoC-2018 efforts made it into the current code = base? > > > > = https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts > >=20 > > I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a = BeagleBone Black which was one of the implementation targets of said=20 > > project, but when running the test tools, I either see cannot = read/kevent/poll/aio_read - Operation not supported by device or = Inappropriate=20 > > ioctl for device. > > > > Perhaps I need to pull the project=E2=80=99s changes into the kernel = by myself. However, before this I would like to ask whether it is worth = the effort. > >=20 > > Please, can anyone shed some light on this. > > > > Best regards > > > > Rolf > > _______________________________________________ > > 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" >=20 > Hi Rolf, >=20 > I dont have any details about the GSOC. > But the code is not in base. >=20 > I have written a similar driver for my needs. It is much simpler and = provides a notification to userland through kqueue events in the event = of a change and counts the number of changes that have taken place over = time. > I can share the code if you want. Hello Oskar, Yes, please, I would be very interested to get hands on your code. And = some usage instructions would be great as well. I guess, this would give me a jump start with said project. Best regards Rolf= From owner-freebsd-arm@freebsd.org Tue Nov 24 22:35: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 D192446CBCD for ; Tue, 24 Nov 2020 22:35:16 +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 4Cgf3m0Kxfz3PxY for ; Tue, 24 Nov 2020 22:35:15 +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 0AOMZ7ng092804 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 24 Nov 2020 14:35:07 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id 0AOMZ7uW092803; Tue, 24 Nov 2020 14:35:07 -0800 (PST) (envelope-from jmg) Date: Tue, 24 Nov 2020 14:35:07 -0800 From: John-Mark Gurney To: Vladimir Cc: freebsd-arm@freebsd.org Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 Message-ID: <20201124223506.GW31099@funkthat.com> Mail-Followup-To: Vladimir , freebsd-arm@freebsd.org References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <2126F3C0-D877-4483-9041-9FC84B9C8D3E@obsigna.com> <4bdd8fe1-7b4c-6186-3ce3-f85c67c0b805@viruzzz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4bdd8fe1-7b4c-6186-3ce3-f85c67c0b805@viruzzz.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, 24 Nov 2020 14:35:07 -0800 (PST) X-Rspamd-Queue-Id: 4Cgf3m0Kxfz3PxY 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.20 / 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_HAM_MEDIUM(-1.00)[-1.000]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[funkthat.com]; RBL_DBL_DONT_QUERY_IPS(0.00)[208.87.223.18:from]; AUTH_NA(1.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[208.87.223.18:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; 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:+]; RCVD_COUNT_TWO(0.00)[2]; 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] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 22:35:16 -0000 Vladimir wrote this message on Wed, Nov 25, 2020 at 00:04 +0300: > Are you going to poll encoders same way? I need interface encoders too. > BBB has dedicated eQEP hardware, but it seems to be difficult to run > eQEP under freebsd. So I thinking about PRU for handling encoders. Seems like an encoder kernel driver would be useful... Expecting a userland program to catch all the changes would be a bit tricky... > 2020-11-24 23:45, Dr. Rolf Jansen ??????????: > >> Am 24.11.2020 um 17:32 schrieb Ian Lepore : > >> > >> On Tue, 2020-11-24 at 17:14 -0300, Dr. Rolf Jansen wrote: > >>> Hello > >>> > >>> Has anything of the GSoC-2018 efforts made it into the current code > >>> base? > >>> > >>> > >> https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts > >>> > >>> I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a > >>> BeagleBone Black which was one of the implementation targets of said > >>> project, but when running the test tools, I either see cannot > >>> read/kevent/poll/aio_read - Operation not supported by device or > >>> Inappropriate ioctl for device. > >>> > >>> Perhaps I need to pull the project???s changes into the kernel by > >>> myself. However, before this I would like to ask whether it is worth > >>> the effort. > >>> > >>> Please, can anyone shed some light on this. > >>> > >>> Best regards > >>> > >>> Rolf > >>> > >> > >> I have had that webpage open (but docked) for literally a year, > >> eternally hoping that I can find time to get to it and somehow get it > >> committed, or maybe use it as the basis for something to be committed > >> (I haven't even looked at it close enough to see if it's commit-quality > >> code or what). > >> > >> I'm curious: What particular need do you have for userspace gpio > >> interrupts? What would you like the API to look like (do you like the > >> things listed at that page, or would you prefer something else)? > >> > >> Interrupts is probably not a good name, because it isn't really going > >> to act like an interrupt does for kernel code. It's really just pin- > >> change notifications delivered to userland. > > > > I was asked to jump into a project where push buttons and pulses from a rotary encoder (all connected to GPIO's) would invoke some programmed actions. Polling the GPIO's would be too faulty. To me "pin-change notifications delivered to userland" sounds not too bad for my purpose. However, I won't say no for a real threaded GPIO interrupt handler facility, which presumably would serve perfectly as well. -- 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 Nov 25 02:21:28 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 535ED471B0C for ; Wed, 25 Nov 2020 02:21:28 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.20]) (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.rzone.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cgl4l037pz3sFr; Wed, 25 Nov 2020 02:21:26 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606270884; s=strato-dkim-0002; d=obsigna.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=M3+otxdt32c+Yi1TkdZq3i4XwDP4t9Rp+BPb1gAG01E=; b=NL90+Ne4fhoeyf92VEg7+7Y2dSsK8QfudduiMW7lf/hS2VTXLsm6+p5MI4+E0/nWUM HsiXq7LKL9A/W2BtNGLRqzb6sPTU9hotRHsw6yU35BSHvZ2+nHl55NWS3Yt/aEmpeFhi 7Xg+OvK8gZLV8OqPJmlszs3Fm994cxVvF9nB/IcF8H3Q/0B83GBCoqiuyJF7Hk5EXDNE ZrK9m1nqep0g6F1ToYzhNYGDvdCtJ6InQQt8I/OAz+bXInoEPWRzkLeheGKpYM8okLnR AxYyDs8lqRKtwLnFeLthPTJrY/6iHCIZpfgAd6U9xwn95mjfWb+RTwq1N+f/LmWpTZ3A MTjw== X-RZG-AUTH: ":O2kGeEG7b/pS1F2rRHW2isrKl4DV03XBEi+I6ZuztdvN9wS3wFGySS4Lw+ldTBio0dVbInGjc9RnD7rYRqs=" X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com by smtp.strato.de (RZmta 47.3.3 DYNA|AUTH) with ESMTPSA id U0af7bwAP2LN52b (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 25 Nov 2020 03:21:23 +0100 (CET) Received: from rolf-mini.obsigna.com (rolf-mini.obsigna.com [192.168.222.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 520941350F91D; Tue, 24 Nov 2020 23:21:19 -0300 (-03) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: "Dr. Rolf Jansen" In-Reply-To: Date: Tue, 24 Nov 2020 23:21:18 -0300 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <467828F4-E653-415C-9AE3-542274EA1951@obsigna.com> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> To: Ian Lepore X-Mailer: Apple Mail (2.3445.104.15) X-Rspamd-Queue-Id: 4Cgl4l037pz3sFr X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=obsigna.com header.s=strato-dkim-0002 header.b=NL90+Ne4; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-rj@obsigna.com designates 85.215.255.20 as permitted sender) smtp.mailfrom=freebsd-rj@obsigna.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:85.215.255.0/24]; RWL_MAILSPIKE_GOOD(0.00)[85.215.255.20:from]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[obsigna.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[85.215.255.20:from]; ASN(0.00)[asn:6724, ipnet:85.215.255.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[obsigna.com:s=strato-dkim-0002]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[obsigna.com]; SPAMHAUS_ZRD(0.00)[85.215.255.20:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[85.215.255.20:from]; FROM_NAME_HAS_TITLE(1.00)[dr]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2020 02:21:28 -0000 > Am 24.11.2020 um 17:32 schrieb Ian Lepore : >=20 > On Tue, 2020-11-24 at 17:14 -0300, Dr. Rolf Jansen wrote: >> Hello >>=20 >> Has anything of the GSoC-2018 efforts made it into the current code >> base? >>=20 >>=20 > = https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts >>=20 >> I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a >> BeagleBone Black which was one of the implementation targets of said >> project, but when running the test tools, I either see cannot >> read/kevent/poll/aio_read - Operation not supported by device or >> Inappropriate ioctl for device. >>=20 >> Perhaps I need to pull the project=E2=80=99s changes into the kernel = by >> myself. However, before this I would like to ask whether it is worth >> the effort. >>=20 >> Please, can anyone shed some light on this. >>=20 >> Best regards >>=20 >> Rolf >>=20 >=20 > I have had that webpage open (but docked) for literally a year, > eternally hoping that I can find time to get to it and somehow get it > committed, or maybe use it as the basis for something to be committed > (I haven't even looked at it close enough to see if it's = commit-quality=20 > code or what). >=20 > I'm curious: What particular need do you have for userspace gpio > interrupts? What would you like the API to look like (do you like the > things listed at that page, or would you prefer something else)? >=20 > Interrupts is probably not a good name, because it isn't really going > to act like an interrupt does for kernel code. It's really just pin- > change notifications delivered to userland. On the Forums somebody reported already success after patching his = kernel with the GSoC-2018 diff's = https://forums.freebsd.org/threads/user-space-interface-for-gpio-interrupt= s.71005/post-428661 He even provided a patch file, and I simply applied this to the = /base/head sources which I updated right before by svn update. Then I = recompiled the kernel for the BBB, and guess what, it works. For testing, I connected a push button to p8.2 and p8.14, and then on = the command line: # gpioctl -f /dev/gpioc0 -c 26 IN PU # ./gpio_intr_test -f /dev/gpioc0 26 ll Then every time when I push the button I see one line: gpio_intr_test: read() interrupt on pin 26 of /dev/gpioc0 This looks quite promising. I would need to examine this test tool which = is provided on the GSoC-2018 GitHub-repository, and then build the = read() handler into my code.=20 However, for as long as the button is pushed I see also ton's of the = following warning messages in the serial console: gpioc0: Unhandled interrupt on pin 26. gpioc0: Unhandled interrupt on pin 26. gpioc0: Unhandled interrupt on pin 26. gpioc0: Unhandled interrupt on pin 26. gpioc0: Unhandled interrupt on pin 26. gpioc0: Unhandled interrupt on pin 26. gpioc0: Unhandled interrupt on pin 26. gpioc0: Unhandled interrupt on pin 26. gpioc0: Unhandled interrupt on pin 26. gpioc0: Unhandled interrupt on pin 26. gpioc0: Unhandled interrupt on pin 26. ... When I run the test tool in er mode (edge rising), then I see only 2 = warnings for each push in the serial console, but because the button is = not debounced, I see a multitude of event messages by the test tool. The = latter behaviour is actually great, since this means that the interrupts = are handled very quick. Anyway, how would I suppress the warning messages in the serial console? Best regards Rolf From owner-freebsd-arm@freebsd.org Wed Nov 25 13:24:03 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 8C0D1469FA2 for ; Wed, 25 Nov 2020 13:24:03 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4Ch1nH1JqWz3J7Q for ; Wed, 25 Nov 2020 13:24:03 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 2B489469FA1; Wed, 25 Nov 2020 13:24:03 +0000 (UTC) Delivered-To: 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 2AFF2469CE3 for ; Wed, 25 Nov 2020 13:24:03 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (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 4Ch1nG1Tlbz3HsH for ; Wed, 25 Nov 2020 13:24:01 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: by mail-ej1-x62f.google.com with SMTP id o9so3017933ejg.1 for ; Wed, 25 Nov 2020 05:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=SI1N8MgzTBuhgGTVOMBD/1RP1JpPTMrWX7VbCkUzuP0=; b=A3aWjOrxucerMrkDAGnXfGSZgeoYCF/8oDGxEdsWV29mX7QNykq0Pz46zE/jAut7eo LQQ5nVk3lTjL+RBIkB1ijeO5VpqHTPIX6smsu0XXEmggNCzHccvJpgSUW0Umxt0MUdKs 8LksckroTfUpQqF2lyqNO/hN1oVXsuKcrr/mP+Qle4vXcg9d3yT+YIvx25QTe5CO87sH SGK00WDAF3rCwvOkMaBG45jZOr7oLjWgXDa7fJrLRYr3yHeD7BmUA8R0riABYzDG2zQ9 PKmteTrIPLGQBO+aChZIjzINVYDdHhreLBfl04ni/h1DQ4Tlx1hgPky+qjou7nuUXAMp JEVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=SI1N8MgzTBuhgGTVOMBD/1RP1JpPTMrWX7VbCkUzuP0=; b=kaFb0fOQsL4m8Im5FPnprSszF/GCaJUjEZurhMi02UNT2pw+tH8IpqxppVmd3POO1I z2a9qSuvlE7bHg/m8F5lZZH0CjiWSR8/nVv442WmM2egVziCtXXlBLKRhMqlikSQ0Hug NemL6c02EmimevUuJHtZ88p4TwT/l8aKesfq6E1VjvTeld/qSgrUoPcHJUzkK3qbXyR8 Pi/dLtJZ2kAjP5NHQet8hco5MSWqocwqiIRH3hbap+PTkjEwTydjfgpLAFdHphTXmrvU sS+uZ480SV6NJiq+KrgI2v89NT0p6T9XuMyw9C5fDkc9v1b86HWDlu2BjqyFAate1gLe hSOg== X-Gm-Message-State: AOAM530Udi/1Rn90NlhBDiVPnoCh+vj1ifmGfR5w5aroYyvSZojuMl6Q 56Nuo1ZctPhVHJjwjMBzPeWI0hLIcJw= X-Google-Smtp-Source: ABdhPJzSTsP5D1if4PBuNyiNqNVtAUCgtPc2pPSCiKZXtg2TU7lxt7DXX9ki4T0+z85/1eCBoxtIjw== X-Received: by 2002:a17:906:b291:: with SMTP id q17mr3023354ejz.455.1606310640342; Wed, 25 Nov 2020 05:24:00 -0800 (PST) Received: from mac.deepcore.dk ([85.27.186.9]) by smtp.gmail.com with ESMTPSA id d10sm902651ejc.39.2020.11.25.05.23.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2020 05:23:59 -0800 (PST) From: =?utf-8?Q?S=C3=B8ren_Schmidt?= Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: EspressoBin PCI express driver Message-Id: Date: Wed, 25 Nov 2020 14:23:58 +0100 To: "freebsd-arm@freebsd.org" X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4Ch1nG1Tlbz3HsH X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=A3aWjOrx; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of sorenschmidt@gmail.com designates 2a00:1450:4864:20::62f as permitted sender) smtp.mailfrom=sorenschmidt@gmail.com X-Spamd-Result: default: False [-1.07 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; HAS_ATTACHMENT(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~,4:~,5:~]; R_MIXED_CHARSET(0.83)[subject]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::62f:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain,multipart/mixed]; MIME_BAD_ATTACHMENT(1.60)[c]; PREVIOUSLY_DELIVERED(0.00)[arm@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::62f:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62f:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[arm] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2020 13:24:03 -0000 Hi gang I=E2=80=99ve been looking at that empty PCI-express slot on my = EspressonBin=E2=80=99s for some time, and decided that it could be handy = to either add a a SATA controller for NAS purposes or a Wifi card for = routers. I=E2=80=99ve hacked together a simple driver that allows that, grantet = its crude but it works :) pcib0: mem = 0xd0070000-0xd008ffff irq 5 on simplebus0 pci0: on pcib0 ath0: at device 1.0 on pci0 ath0: AR9287 mac 384.2 RF5133 phy 15.15 ath0: 2GHz radio: 0x0000; 5GHz radio: 0x00c0 pcib0: mem = 0xd0070000-0xd008ffff irq 5 on simplebus0 pci0: on pcib0 atactlr1: irq 46 at device 1.0 on pci0 atactlr1: AHCI v1.00 64bit controller, 4 6.0Gb/s ports, PM supported, = NCQ supported w/FBS ata2: on atactlr1 ata3: on atactlr1 ata4: on atactlr1 ata5: on atactlr1 It has only been used on my own hacked up version of 12-stable but = should work on -current as well, YMMV.. Enjoy! PS: I do have a cpufreq driver for it as well if anyone=E2=80=99s = interested, but there is not much point in it since power savings are = next to nothing=E2=80=A6. -- S=C3=B8ren Schmidt sos@deepcore.dk / sos@freebsd.org "So much code to hack, so little time" From owner-freebsd-arm@freebsd.org Wed Nov 25 14:17:35 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 73ABC46AB58 for ; Wed, 25 Nov 2020 14:17:35 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4Ch2z30JyYz3L44 for ; Wed, 25 Nov 2020 14:17:35 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: by mailman.nyi.freebsd.org (Postfix) id 088E846AB57; Wed, 25 Nov 2020 14:17:35 +0000 (UTC) Delivered-To: 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 0737C46AE7A for ; Wed, 25 Nov 2020 14:17:35 +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 4Ch2z24nckz3KnL for ; Wed, 25 Nov 2020 14:17:33 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1606313850; 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=ae3orc23czSF3hzBw4WwbBiyybxJzxIHc52fUA4b08g=; b=gn5/iEEr0a50ejL6s0pqV5F2+4iS6p++c+zYLK1sq0Lr13B4ij0XUfLpe9HYfnQ0lAsl8/ 83jHlcQmYItipykkUx2BRrffvyFchjkMbKGDZRMG8FxTr9tqsHg4/Ooc6lMeirbUXsTXy/ S2jyoz71QS0W8KwFm5xBq8m/ZSIRp8Q= Received: from skull.home.blih.net (lfbn-idf2-1-288-247.w82-123.abo.wanadoo.fr [82.123.126.247]) by mx.blih.net (OpenSMTPD) with ESMTPSA id d66c4242 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 25 Nov 2020 14:17:30 +0000 (UTC) Date: Wed, 25 Nov 2020 15:17:30 +0100 From: Emmanuel Vadot To: =?ISO-8859-1?Q?S=F8ren?= Schmidt Cc: "freebsd-arm@freebsd.org" Subject: Re: EspressoBin PCI express driver Message-Id: <20201125151730.b3882737e4d20831e056136b@bidouilliste.com> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Ch2z24nckz3KnL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_RCPT(0.00)[]; REPLY(-4.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2020 14:17:35 -0000 Hi S=F8ren, On Wed, 25 Nov 2020 14:23:58 +0100 S=F8ren Schmidt wrote: > Hi gang >=20 > I?ve been looking at that empty PCI-express slot on my EspressonBin?s for= some time, and decided that it could be handy to either add a a SATA contr= oller for NAS purposes or a Wifi card for routers. >=20 > I?ve hacked together a simple driver that allows that, grantet its crude = but it works :) >=20 > pcib0: mem 0xd0070000-0xd008= ffff irq 5 on simplebus0 > pci0: on pcib0 > ath0: at device 1.0 on pci0 > ath0: AR9287 mac 384.2 RF5133 phy 15.15 > ath0: 2GHz radio: 0x0000; 5GHz radio: 0x00c0 >=20 > pcib0: mem 0xd0070000-0xd008= ffff irq 5 on simplebus0 > pci0: on pcib0 > atactlr1: irq 46 at device 1.0 on pci0 > atactlr1: AHCI v1.00 64bit controller, 4 6.0Gb/s ports, PM supported, NCQ= supported w/FBS > ata2: on atactlr1 > ata3: on atactlr1 > ata4: on atactlr1 > ata5: on atactlr1 >=20 > It has only been used on my own hacked up version of 12-stable but should= work on -current as well, YMMV.. >=20 >=20 >=20 > Enjoy! >=20 > PS: I do have a cpufreq driver for it as well if anyone?s interested, but= there is not much point in it since power savings are next to nothing?. You might want to host the code somewhere and send a link, ML is removing attachment (or even better put it on phab and add the arm64 group). Thanks, --=20 Emmanuel Vadot From owner-freebsd-arm@freebsd.org Wed Nov 25 14:57:51 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 B31D346B8FF for ; Wed, 25 Nov 2020 14:57:51 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4Ch3sW1dX4z3N2C for ; Wed, 25 Nov 2020 14:57:51 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 3653946BEE2; Wed, 25 Nov 2020 14:57:51 +0000 (UTC) Delivered-To: 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 3615A46BF20 for ; Wed, 25 Nov 2020 14:57:51 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (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 4Ch3sW0sYSz3N4w for ; Wed, 25 Nov 2020 14:57:50 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: by mail-ej1-x631.google.com with SMTP id f23so3437628ejk.2 for ; Wed, 25 Nov 2020 06:57:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=HDAOnb25UsChyODy9YYpPFm0OnM8mT/bNq/4PUt74+0=; b=CAXM/Wh/Nckpg7WRECYjEvYyGezLDcE0AgC/9vMlc4i7zC/a9Z8VRwEJ4yt7simvB2 OVnJx7NRq5BArUJ63PX5lpaFHKGpbkGyJKWq/0NAU77AJXVCxi4ptgzileOc3N0CgQZi uT/m4sA9pr/4UpLoBn0tLhc2q04vYI3LV/k/vpZdvL3z8n+dR/FkpwuRsXTfQcc7WY8e SXQVdWbEOBJRAbifbWbZGeI771rOpLFB+eKpDOTHg7Mamx9i2cZJWGoOlJ/HeV9pSlrb 5GHNi35qMk/Fy4kuHRe1VmrkLZjNoQUVdv09KXAe4gTNW6nPCqWdfCghPE9wz2uG7r4F rL1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=HDAOnb25UsChyODy9YYpPFm0OnM8mT/bNq/4PUt74+0=; b=ZTsp4tY+yPAdymPHwZDpehPJBXXcXizFNgz2kCWCcM4Tgro+gEsYp33wNM8PwCd2AE 0aNU2WgVXK76hzR//S4/Jwdm6M7TkGiQDqkmOzRES2ZIt9exbBGDcajkGDw3zWai9yLE 39AeHfWJSxmywiYgNp1QPmsXhz+fPOM4AJWdZxca+yhDuRE8ZqodvC+djDBwMY+hEAh3 o8fYOZPl6Ve5JDWHsWp3meC+I/iFk8A+RwguvN1gRv9vdNvMfrd6M5KrRtJ7FAHhsldX d5Q97Y2eAdEmnvCUj3UxGyfr3KJ6VEHDX8bKSr3/ePXTX9fvj2jDXvkcy4HuYzqZOpmL eJjA== X-Gm-Message-State: AOAM532MF3zzgR/KF0NSQE24wFCvT46zzQ5ivr0oUOnvLklJxkm/DfkY U63MWkfFT7GqZcNY9VR9vuxvJWLXDok= X-Google-Smtp-Source: ABdhPJwSTmGGBdadr0OsMAxI3wjWxVNHfGHZfzc5RIu0Txbr3mrGWTuw4T3hvaN3Jq103tnHBOzOMw== X-Received: by 2002:a17:906:892:: with SMTP id n18mr3464731eje.1.1606316269275; Wed, 25 Nov 2020 06:57:49 -0800 (PST) Received: from mac.deepcore.dk ([85.27.186.9]) by smtp.gmail.com with ESMTPSA id f7sm1402593ejd.13.2020.11.25.06.57.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2020 06:57:48 -0800 (PST) From: =?utf-8?Q?S=C3=B8ren_Schmidt?= Message-Id: Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: EspressoBin PCI express driver Date: Wed, 25 Nov 2020 15:57:47 +0100 In-Reply-To: <20201125151730.b3882737e4d20831e056136b@bidouilliste.com> Cc: "freebsd-arm@freebsd.org" To: Emmanuel Vadot References: <20201125151730.b3882737e4d20831e056136b@bidouilliste.com> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4Ch3sW0sYSz3N4w X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2020 14:57:51 -0000 On 25 Nov 2020, at 15.17, Emmanuel Vadot wrote: >=20 >=20 > Hi S=C3=B8ren, >=20 > You might want to host the code somewhere and send a link, ML is > removing attachment (or even better put it on phab and add the arm64 > group). > Thanks, >=20 > --=20 > Emmanuel Vadot > = > Ahh sorry =E2=80=98bout that=E2=80=A6 I should figure out about = fabricator sometime=E2=80=A6 For now you can grab it here: http://colo.deepcore.dk/a37x0_pcie.c -- S=C3=B8ren Schmidt sos@deepcore.dk / sos@freebsd.org "So much code to hack, so little time" From owner-freebsd-arm@freebsd.org Thu Nov 26 02:08:01 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 4093647CC0B for ; Thu, 26 Nov 2020 02:08:01 +0000 (UTC) (envelope-from oskar.holmlund@yahoo.com) Received: from sonic305-21.consmr.mail.ir2.yahoo.com (sonic305-21.consmr.mail.ir2.yahoo.com [77.238.177.83]) (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 4ChLkk5LCJz4nP4 for ; Thu, 26 Nov 2020 02:07:58 +0000 (UTC) (envelope-from oskar.holmlund@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1606356475; bh=op7Zm1xVheDUWN/wOs2PnQ41z83YCL0O9H+Wlab2shS=; h=Date:From:To:Subject:From:Subject; b=ZFp+MhJEUbsQNvmR7XqBn+ayOuStxcaas+6oGlb3igZ4L9/3aheWS3IAhuKYosk1icorPngVjlE7YkV93q8JFoj46TYBk6d3YLVdn6lrwZrHdOLPsz4MlFfwRdnv15iyzd1hGFtOifC3ORAItbO2/ttf7ihKSSlp2T/Lx9k363wmtIk/Ds0oChOQMp+X+dVFHMcCWrd+X6NoQzIodyk3H3ZYOijf3lSaTZ6gyKvUYmGOgWlfJiOwIIhb9SPS4sRCY70tE1ZBBRdC/ZTKar14ALZRFTLJf2/I1bxTu71bGt96reu4v2k1BP/napXPnjGi84DlT870T/6iLKJdShXKuw== X-YMail-OSG: rkOyca4VM1kQHZmOq85xeVTcRG5YlfVni0NQGsy0y0s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ulzKyAkKlkFEMUw9XTrJzy7G9O HTZ7YU54c6.0GB4VLCUoRyfUVev96TgC.n2t.o1QX6.EEInFVbtnHykcgCGBmlF158ekzAf5lO52 RcFqh4cgckkvR5BPkOJE_k4P9n25El35K4IddfgshRVR2eiUGAnT9.t9AB02O0gkbtiJ.IrCZb2H QJmB75tIpJJF23YQ35hcqI8cjURMZn6a7I84y9FKkrDulfw-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ir2.yahoo.com with HTTP; Thu, 26 Nov 2020 02:07:55 +0000 Date: Thu, 26 Nov 2020 02:07:54 +0000 (UTC) From: Oskar Holmlund To: "Dr. Rolf Jansen" Cc: freebsd-arm@freebsd.org Message-ID: <1128996050.3062382.1606356474061@mail.yahoo.com> In-Reply-To: <61B0CE7A-8F57-48BD-98D4-BE6E880E7707@obsigna.com> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <756100520.1642116.1606251415012@mail.yahoo.com> <61B0CE7A-8F57-48BD-98D4-BE6E880E7707@obsigna.com> Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 MIME-Version: 1.0 X-Mailer: WebService/1.1.17111 YMailNodin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0 X-Rspamd-Queue-Id: 4ChLkk5LCJz4nP4 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.98 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; RWL_MAILSPIKE_GOOD(0.00)[77.238.177.83:from]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.98)[-0.982]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:34010, ipnet:77.238.176.0/22, country:GB]; RBL_DBL_DONT_QUERY_IPS(0.00)[77.238.177.83:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; SPAMHAUS_ZRD(0.00)[77.238.177.83:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[77.238.177.83:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2020 02:08:01 -0000 > > Hello Oskar, > > Yes, please, I would be very interested to get hands on your code. And some usage instructions would be great as well. > > I guess, this would give me a jump start with said project. > > > Best regards > > Rolf Hi Rolf and Vladimir, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251390 //Oskar From owner-freebsd-arm@freebsd.org Thu Nov 26 10:11:51 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 C667A4A7FC1 for ; Thu, 26 Nov 2020 10:11:51 +0000 (UTC) (envelope-from freebsd@viruzzz.org) Received: from mail.viruzzz.org (mail.viruzzz.org [IPv6:2001:67c:380:124::3]) (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 4ChYT26v1Mz3mMj for ; Thu, 26 Nov 2020 10:11:50 +0000 (UTC) (envelope-from freebsd@viruzzz.org) Received: from [192.168.252.63] (helo=ohm.local) by mail.viruzzz.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1kiEFg-000HI4-Vq for freebsd-arm@freebsd.org; Thu, 26 Nov 2020 13:11:49 +0300 Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 To: freebsd-arm@freebsd.org References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <756100520.1642116.1606251415012@mail.yahoo.com> <61B0CE7A-8F57-48BD-98D4-BE6E880E7707@obsigna.com> <1128996050.3062382.1606356474061@mail.yahoo.com> From: Vladimir Goncharov Message-ID: <5258599a-2deb-e2b0-cf45-ead21ab4be2b@viruzzz.org> Date: Thu, 26 Nov 2020 13:11:48 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <1128996050.3062382.1606356474061@mail.yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Language: ru Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4ChYT26v1Mz3mMj X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@viruzzz.org has no SPF policy when checking 2001:67c:380:124::3) smtp.mailfrom=freebsd@viruzzz.org X-Spamd-Result: default: False [-2.10 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:67c:380:124::3:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[viruzzz.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2001:67c:380:124::3:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; 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:41599, ipnet:2001:67c:380::/48, country:RU]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2020 10:11:51 -0000 Hello Oskar, Thank you, I will try it and feedback you soon. 2020-11-26 05:07, Oskar Holmlund via freebsd-arm пишет: > > >> Hello Oskar, >> >> Yes, please, I would be very interested to get hands on your code. And some usage instructions would be great as well. >> >> I guess, this would give me a jump start with said project. >> >> >> Best regards >> >> Rolf > > Hi Rolf and Vladimir, > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251390 > > //Oskar > > _______________________________________________ > 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 Nov 26 19:56: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 64D2B46EBBE for ; Thu, 26 Nov 2020 19:56:40 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound5a.ore.mailhop.org (outbound5a.ore.mailhop.org [44.233.67.66]) (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 4ChpRq6lc5z3F9F for ; Thu, 26 Nov 2020 19:56:39 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1606420592; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=pmekxssqFMSbqutgQ3oefBR1795zQ3GeXXUOv1gEBDIJCwuw0/QFjsKGSW+xYR6mRRb6gPAA/j50m 5IHfhcFAkphMnwZIlkhXX46KbuEHwJ+ZIDEbKxHpwcri3RmSvTYHgz3/BvpU2BCMepqCbdsIvuhBQO zt4bkh/nrwx1hbelwHqH5hDj4/uFtW1HU4Ah+RqN3mY95YsKP8P6XeBQlqXkY8INCrj0THi6Hw5Ere YfaRbmW7SZig/UoRvTaP1l3ah+MHFiVTT2JIXsG8U4dY/xD9wCbFZAaJlPgnC2siczwgV496S5veHn 7Twcax8LH5xpv0Ax8RNcJXNWx0U0TWQ== 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=38J47AFKNw6YDuz/GRBSOrjLXTyFhwzaVQHq+9Uyzgs=; b=lrhiQ+Fc6euYcBeR6Fiip7rdZRW1cSuPVmXciLiUmoFLgwBh/qBq7t7khmmZtB0wDoqVRFbBPgEHG owB10S0Da652Zzz7Ug4y6HFb4sqaQzj3Def+v7MUwSo8EycswyJ5+XM1qIfPzzjEmEpNmH1jFNjx3p UilF3E7azvvH33XWjQggijo81ZB3hUGCx/liDdRV+4XzySceWYF2FyE52UIBZUZ5Xx7DMWbB2ZFJqo rKawaGzB6XWDPPzT2pZA8v+t9sallTnjCMv5KZjYOnN2trp01aOlqUNZgIE8HULrtP9sFzUqUUhiHs +gW0UOpGf6zOAadKilR9SvZp2hFRydA== ARC-Authentication-Results: i=1; outbound3.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=38J47AFKNw6YDuz/GRBSOrjLXTyFhwzaVQHq+9Uyzgs=; b=ZBTYQxULr3VVPSGsjg5M1Vmc1X/tKZ6Y4NLDnj+xYnQZSmuLab4Lev8clP0eUlzYzeVNp9WyblZ0k EhXePKqLynqEExoLpYD2zzOZC0T24tWQJdF3jeNJH0W4cJjOisVT9JqnZSeceQ+pk/qe87uMBsQgGG mS0rhmNOsMH1E6V95QFS1koaNS52kpJwRF1TzvSby47KvOLfRbdgp1uu+U5fstJXtsUbea9pIp2DvG cET648PoumpYPhSyfOKxWYC3I4avKCCNFa/4cGLGwCz26zUugI9S3dHDFG7tpYA2jFATVbhfvyoOka ZzX7MJVzd/vlXnZJi7Bg28FKjQdwIFg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 7911ea84-3021-11eb-8b39-614106969e8d 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 outbound3.ore.mailhop.org (Halon) with ESMTPSA id 7911ea84-3021-11eb-8b39-614106969e8d; Thu, 26 Nov 2020 19:56:30 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 0AQJuSip077139; Thu, 26 Nov 2020 12:56:28 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: Ian Lepore To: "Dr. Rolf Jansen" , freebsd-arm@freebsd.org Date: Thu, 26 Nov 2020 12:56:28 -0700 In-Reply-To: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> 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: 4ChpRq6lc5z3F9F X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:16509, ipnet:44.224.0.0/11, country:US]; local_wl_from(0.00)[freebsd.org] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2020 19:56:40 -0000 On Tue, 2020-11-24 at 17:14 -0300, Dr. Rolf Jansen wrote: > Hello > > Has anything of the GSoC-2018 efforts made it into the current code > base? > > https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts > > I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a > BeagleBone Black which was one of the implementation targets of said > project, but when running the test tools, I either see cannot > read/kevent/poll/aio_read - Operation not supported by device or > Inappropriate ioctl for device. > > Perhaps I need to pull the projectÿs changes into the kernel by > myself. However, before this I would like to ask whether it is worth > the effort. > > Please, can anyone shed some light on this. > > Best regards > > Rolf > I made some time this morning to review the gsoc2018 code. It turns out this code is very high quality, nearly ready to commit as-is. The main thing it needs is some style cleanup in its comment blocks, and documentation. I'd be inclined to commit the code first and write the documentation over the next little while and commit it separately. If you'd like to give it a try, here's a diff that should apply and build cleanly on freebsd 12 or 13: https://people.freebsd.org/~ian/gpio_gsoc2018.diff While there isn't any documentation yet, there is a test program (I haven't run it yet) that demonstrates all the features: https://github.com/ckraemer/gsoc2018-utils/blob/master/src/gpioc_intr_test.c Right now the code will let you block waiting for a pin-change event using select(), poll() or kevents, or to be notified via SIGIO, but after being notified that something happened, you still have to call read() to see which pin changed. I think if the pin changes state multiple times between calls to read(), you'll lose track of some changes (I'm not positive of that, I don't understand the kevent stuff well). I'd like to add some features so that you can configure it to track pin changes in counting-mode and timestamping-mode. In counting mode, when you do a read() you would get back a pair of values, the pin number and how many times its interrupt fired since the last read. In timestamping mode, every read would return a pin number and an associated timespec giving the exact time the interrupt happened (there would need to be a way to configure how many events it could buffer, but I think even allowing a thousand buffered events would only use a few kbytes of memory). -- Ian From owner-freebsd-arm@freebsd.org Fri Nov 27 01:08:24 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 EBE5547721C for ; Fri, 27 Nov 2020 01:08:24 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.219]) (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.rzone.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ChxMW6m70z3t0Q for ; Fri, 27 Nov 2020 01:08:23 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606439300; s=strato-dkim-0002; d=obsigna.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=3O4yg9pYmjAtkxqa9YDBmAHHAwuowQIqdfQrVg7NQew=; b=sIbxMP93YVPfaXXZhEXx2lBxSEiRgGYs5iPa9qjHmUe10nBJ5WO+LgBJQOWT6NTBDe c5T15ZJ4fQq8qYB4dI+DTg5RVDsNpTa+xlIsnN+xsfqdbNwLR3lr+t4/ak2seWbZ/oqB CjAK/K8ynNCQXDGt2tIgvHmKm6tdM52LC2jnAT7p9XEaZANuELrMDMciHurP+gO/3Cx2 K7T/thtNINCtOT1/n6//fdLgpx75z9tOlGtA/4JEIJ9/x/JbnVUHBmmZiqaYIdkYX3to VEWAKqDGlgwu93NQMIBA2slZXopraPiMXHLFri8NEO0MDn4ih8COlVtGcohvpSB3QfW2 FgnA== X-RZG-AUTH: ":O2kGeEG7b/pS1F2rRHW2isrKl4DV03XBEi+I6ZuztdvN9wS3wFGySS4Lw+ldTBio0dVbInGjc9RnD7rYRqs=" X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com by smtp.strato.de (RZmta 47.3.3 DYNA|AUTH) with ESMTPSA id U0af7bwAR18IKZn (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 27 Nov 2020 02:08:18 +0100 (CET) Received: from rolf-mini.obsigna.com (rolf-mini.obsigna.com [192.168.222.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id C1B441350F91D; Thu, 26 Nov 2020 22:08:13 -0300 (-03) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: "Dr. Rolf Jansen" In-Reply-To: <1128996050.3062382.1606356474061@mail.yahoo.com> Date: Thu, 26 Nov 2020 22:08:13 -0300 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <756100520.1642116.1606251415012@mail.yahoo.com> <61B0CE7A-8F57-48BD-98D4-BE6E880E7707@obsigna.com> <1128996050.3062382.1606356474061@mail.yahoo.com> To: Oskar Holmlund X-Mailer: Apple Mail (2.3445.104.15) X-Rspamd-Queue-Id: 4ChxMW6m70z3t0Q X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=obsigna.com header.s=strato-dkim-0002 header.b=sIbxMP93; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-rj@obsigna.com designates 81.169.146.219 as permitted sender) smtp.mailfrom=freebsd-rj@obsigna.com X-Spamd-Result: default: False [-2.10 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:81.169.146.128/25]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[obsigna.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[81.169.146.219:from]; ASN(0.00)[asn:6724, ipnet:81.169.144.0/22, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[81.169.146.219:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[obsigna.com:s=strato-dkim-0002]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[obsigna.com]; SPAMHAUS_ZRD(0.00)[81.169.146.219:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NAME_HAS_TITLE(1.00)[dr]; RWL_MAILSPIKE_POSSIBLE(0.00)[81.169.146.219:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 01:08:25 -0000 > Am 25.11.2020 um 23:07 schrieb Oskar Holmlund = : >=20 > >=20 > > Hello Oskar, > >=20 > > Yes, please, I would be very interested to get hands on your code. = And some usage instructions would be great as well. > > > > I guess, this would give me a jump start with said project. > >=20 > >=20 > > Best regards > > > > Rolf >=20 > Hi Rolf and Vladimir, >=20 > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251390 Hello Oskar, I got it working. Thank you very much. At the head of the kernel module source you noted that this has been = inspired by the GSoC-2018 work. That one I got working as well. Only when using the original GSoC-2018 = code built-in to the kernel, I see hundreds of warnings "gpioc2: = Unhandled interrupt on pin 3.=E2=80=9C, while your kernel module works = without warnings. Please may I ask you for some more details what is the actual difference = between the GSoC-2018 work and your work - besides the obvious one that = your builds a module. Many Thanks and best regards Rolf= From owner-freebsd-arm@freebsd.org Fri Nov 27 01:18:29 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 867B0477611 for ; Fri, 27 Nov 2020 01:18:29 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.20]) (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.rzone.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Chxb81zWFz3tjq; Fri, 27 Nov 2020 01:18:27 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606439905; s=strato-dkim-0002; d=obsigna.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=pmTSEB62gZ02zhyngwx8MIQfI5mL0QpL61AyB7+j130=; b=VcjI1lUtqXLv/72dUOeMtSwzG8yO8cFwT01ezOftUzkvp8moKNZD7jv0adK6AxnT/d STQaXJQAQUDKnCb8WcBbs9XVzCr2j8TNJ1BzimPQFAFGAgenbNLM7NaPqd4JhalZ7B/r dgi/23AVykPRfdz7HtzYFQudKhcZJJ8uK0yBuPIGcDewMvwfuy2LxOHk7WF70rBVvWOm u+LwAZos/mWagXPpeJSR73PK5eevwR7lIPdns0j7mAOr6b3N8H5LxZjrqFI8q2AH6kY7 ey1lQ+Eejr81Izk/NmzH0LFfFd0HDp1ZF+XS0VwKqJ1DmUeDP3KtL4kLnFRphPvp6ALr R/3A== X-RZG-AUTH: ":O2kGeEG7b/pS1F2rRHW2isrKl4DV03XBEi+I6ZuztdvN9wS3wFGySS4Lw+ldTBio0dVbInGjc9RnD7rYRqs=" X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com by smtp.strato.de (RZmta 47.3.3 DYNA|AUTH) with ESMTPSA id U0af7bwAR1IPKa1 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 27 Nov 2020 02:18:25 +0100 (CET) Received: from rolf-mini.obsigna.com (rolf-mini.obsigna.com [192.168.222.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id C07DA1350F91D; Thu, 26 Nov 2020 22:18:22 -0300 (-03) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: "Dr. Rolf Jansen" In-Reply-To: Date: Thu, 26 Nov 2020 22:18:22 -0300 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> To: Ian Lepore X-Mailer: Apple Mail (2.3445.104.15) X-Rspamd-Queue-Id: 4Chxb81zWFz3tjq X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=obsigna.com header.s=strato-dkim-0002 header.b=VcjI1lUt; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-rj@obsigna.com designates 85.215.255.20 as permitted sender) smtp.mailfrom=freebsd-rj@obsigna.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:85.215.255.0/24]; RWL_MAILSPIKE_GOOD(0.00)[85.215.255.20:from]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[obsigna.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[85.215.255.20:from]; ASN(0.00)[asn:6724, ipnet:85.215.255.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[obsigna.com:s=strato-dkim-0002]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[obsigna.com]; SPAMHAUS_ZRD(0.00)[85.215.255.20:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[85.215.255.20:from]; FROM_NAME_HAS_TITLE(1.00)[dr]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 01:18:29 -0000 > Am 26.11.2020 um 16:56 schrieb Ian Lepore : >=20 > On Tue, 2020-11-24 at 17:14 -0300, Dr. Rolf Jansen wrote: >> Hello >>=20 >> Has anything of the GSoC-2018 efforts made it into the current code >> base? >>=20 >>=20 > = https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts >>=20 >> I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a >> BeagleBone Black which was one of the implementation targets of said >> project, but when running the test tools, I either see cannot >> read/kevent/poll/aio_read - Operation not supported by device or >> Inappropriate ioctl for device. >>=20 >> Perhaps I need to pull the project=C2=B4s changes into the kernel by >> myself. However, before this I would like to ask whether it is worth >> the effort. >>=20 >> Please, can anyone shed some light on this. >>=20 >> Best regards >>=20 >> Rolf >>=20 >=20 > I made some time this morning to review the gsoc2018 code. It turns > out this code is very high quality, nearly ready to commit as-is. The > main thing it needs is some style cleanup in its comment blocks, and > documentation. I'd be inclined to commit the code first and write the > documentation over the next little while and commit it separately. >=20 > If you'd like to give it a try, here's a diff that should apply and > build cleanly on freebsd 12 or 13: >=20 > https://people.freebsd.org/~ian/gpio_gsoc2018.diff >=20 > While there isn't any documentation yet, there is a test program (I > haven't run it yet) that demonstrates all the features: >=20 > = https://github.com/ckraemer/gsoc2018-utils/blob/master/src/gpioc_intr_test= .c >=20 > Right now the code will let you block waiting for a pin-change event > using select(), poll() or kevents, or to be notified via SIGIO, but > after being notified that something happened, you still have to call > read() to see which pin changed. I think if the pin changes state > multiple times between calls to read(), you'll lose track of some > changes (I'm not positive of that, I don't understand the kevent stuff > well). >=20 > I'd like to add some features so that you can configure it to track = pin > changes in counting-mode and timestamping-mode. In counting mode, = when > you do a read() you would get back a pair of values, the pin number = and > how many times its interrupt fired since the last read. In > timestamping mode, every read would return a pin number and an > associated timespec giving the exact time the interrupt happened = (there > would need to be a way to configure how many events it could buffer, > but I think even allowing a thousand buffered events would only use a > few kbytes of memory). I got it working as well, please see my other post from yesterday. I = used gpioc_intr_test.c. I see hundreds of warning messages when I press the test button a few = times. May these warnings be safely ignored. The kernel module of Oskar = Holmund works quite nice as well (for what I need), and with that one, I = don=E2=80=99t see warnings. The counting- and timestamping-mode for sure would be very useful. = Perhaps by implementing this, there won=E2=80=99t be no unhandled = interrupts anymore, and hence there won=E2=80=99t be any warnings = either. Best regards Rolf From owner-freebsd-arm@freebsd.org Fri Nov 27 08:03:04 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 204F24A1496 for ; Fri, 27 Nov 2020 08:03:04 +0000 (UTC) (envelope-from freebsd@viruzzz.org) Received: from mail.viruzzz.org (mail.viruzzz.org [IPv6:2001:67c:380:124::3]) (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 4Cj6Yz24qkz4k3F for ; Fri, 27 Nov 2020 08:03:02 +0000 (UTC) (envelope-from freebsd@viruzzz.org) Received: from [192.168.252.63] (helo=ohm.local) by mail.viruzzz.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1kiYiY-0005oI-2j for freebsd-arm@freebsd.org; Fri, 27 Nov 2020 11:02:58 +0300 Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 To: freebsd-arm@freebsd.org References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> From: Vladimir Goncharov Message-ID: <8d806302-479c-ca34-3fdb-96d27f40e212@viruzzz.org> Date: Fri, 27 Nov 2020 11:02:56 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: ru Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Cj6Yz24qkz4k3F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@viruzzz.org has no SPF policy when checking 2001:67c:380:124::3) smtp.mailfrom=freebsd@viruzzz.org X-Spamd-Result: default: False [-2.09 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:67c:380:124::3:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2001:67c:380:124::3:from:127.0.2.255]; DMARC_NA(0.00)[viruzzz.org]; NEURAL_HAM_SHORT(-0.99)[-0.991]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; 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:41599, ipnet:2001:67c:380::/48, country:RU]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 08:03:04 -0000 Hello Rolf, I have implemented in kernel queue for generated GPIO interrupts with timestamps, so now it's possible to catch all events even on busy system. It's all for gpio_gsoc2018 code. In result I have no more warnings in dmesg. Unfortunately it requires allocating memory on each event to store pin number and timestamp. In case of unability allocating memory it falls back to gpio_gsoc2018 method. Does anybody interested in such patches? 2020-11-27 04:18, Dr. Rolf Jansen пишет: >> Am 26.11.2020 um 16:56 schrieb Ian Lepore : >> >> On Tue, 2020-11-24 at 17:14 -0300, Dr. Rolf Jansen wrote: >>> Hello >>> >>> Has anything of the GSoC-2018 efforts made it into the current code >>> base? >>> >>> >> https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts >>> >>> I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a >>> BeagleBone Black which was one of the implementation targets of said >>> project, but when running the test tools, I either see cannot >>> read/kevent/poll/aio_read - Operation not supported by device or >>> Inappropriate ioctl for device. >>> >>> Perhaps I need to pull the project´s changes into the kernel by >>> myself. However, before this I would like to ask whether it is worth >>> the effort. >>> >>> Please, can anyone shed some light on this. >>> >>> Best regards >>> >>> Rolf >>> >> >> I made some time this morning to review the gsoc2018 code. It turns >> out this code is very high quality, nearly ready to commit as-is. The >> main thing it needs is some style cleanup in its comment blocks, and >> documentation. I'd be inclined to commit the code first and write the >> documentation over the next little while and commit it separately. >> >> If you'd like to give it a try, here's a diff that should apply and >> build cleanly on freebsd 12 or 13: >> >> https://people.freebsd.org/~ian/gpio_gsoc2018.diff >> >> While there isn't any documentation yet, there is a test program (I >> haven't run it yet) that demonstrates all the features: >> >> https://github.com/ckraemer/gsoc2018-utils/blob/master/src/gpioc_intr_test.c >> >> Right now the code will let you block waiting for a pin-change event >> using select(), poll() or kevents, or to be notified via SIGIO, but >> after being notified that something happened, you still have to call >> read() to see which pin changed. I think if the pin changes state >> multiple times between calls to read(), you'll lose track of some >> changes (I'm not positive of that, I don't understand the kevent stuff >> well). >> >> I'd like to add some features so that you can configure it to track pin >> changes in counting-mode and timestamping-mode. In counting mode, when >> you do a read() you would get back a pair of values, the pin number and >> how many times its interrupt fired since the last read. In >> timestamping mode, every read would return a pin number and an >> associated timespec giving the exact time the interrupt happened (there >> would need to be a way to configure how many events it could buffer, >> but I think even allowing a thousand buffered events would only use a >> few kbytes of memory). > > I got it working as well, please see my other post from yesterday. I used gpioc_intr_test.c. > > I see hundreds of warning messages when I press the test button a few times. May these warnings be safely ignored. The kernel module of Oskar Holmund works quite nice as well (for what I need), and with that one, I don’t see warnings. > > The counting- and timestamping-mode for sure would be very useful. Perhaps by implementing this, there won’t be no unhandled interrupts anymore, and hence there won’t be any warnings either. > > Best regards > > Rolf > > From owner-freebsd-arm@freebsd.org Fri Nov 27 11:09:54 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 C3ABA4A4BAF for ; Fri, 27 Nov 2020 11:09:54 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CjBjY4Jdlz4v6G for ; Fri, 27 Nov 2020 11:09:53 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606475391; s=strato-dkim-0002; d=obsigna.com; h=References:To:Cc:In-Reply-To:Date:Subject:Message-Id:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=BWTjaQqdeJkmT7WUybdk/Evt5CflEliOAPlE6unkf9A=; b=XEFPc5FinUwEVuUbfTSocI31RdLk2zhL2k7DATSrP/w2XmBK82+ie5W0SGus6Z1Avz hvbcfWuFt0qd5S/fLZSHOYKgJ08h8YkzTcEsPm2WCj8z9bQXbn0AKzdRKhYv/HZ1/L8H QhwGIvpAvIUHYD2X04UIh7BxKHyLFBqrczir2Srvx6la9KYsfOduJvF/XU8pnndRAnCn pnOL20WJZJOAxTkBesDncRMFlDteaSXTShJYJA+OpkmKwoEXYN7GIFK7LsQU0ciFaiLh B5kIuneEdVr/8af3WApPWoNw3EEcKaCsHjr7/LslAKg4W82Q++qXFig49P7HH8k60mXH sYrQ== X-RZG-AUTH: ":O2kGeEG7b/pS1F2rRHW2isrKl4DV03XBEi+I6ZuztdvN9wS3wFGySS4Lw+ldTBio0dVbInGjc9RnD7rYRqs=" X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com by smtp.strato.de (RZmta 47.3.3 DYNA|AUTH) with ESMTPSA id U0af7bwARB9fPP0 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 27 Nov 2020 12:09:41 +0100 (CET) Received: from rolf-mini.obsigna.com (rolf-mini.obsigna.com [192.168.222.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 595651350F91D; Fri, 27 Nov 2020 08:09:39 -0300 (-03) From: "Dr. Rolf Jansen" Message-Id: <8655AF30-273B-48E7-98CD-007AA1D265F5@obsigna.com> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 Date: Fri, 27 Nov 2020 08:09:38 -0300 In-Reply-To: <8d806302-479c-ca34-3fdb-96d27f40e212@viruzzz.org> Cc: freebsd-arm@freebsd.org To: Vladimir Goncharov References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <8d806302-479c-ca34-3fdb-96d27f40e212@viruzzz.org> X-Mailer: Apple Mail (2.3445.104.15) X-Rspamd-Queue-Id: 4CjBjY4Jdlz4v6G X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=obsigna.com header.s=strato-dkim-0002 header.b=XEFPc5Fi; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-rj@obsigna.com designates 85.215.255.22 as permitted sender) smtp.mailfrom=freebsd-rj@obsigna.com X-Spamd-Result: default: False [-1.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:85.215.255.0/24:c]; MV_CASE(0.50)[]; RWL_MAILSPIKE_GOOD(0.00)[85.215.255.22:from]; URI_COUNT_ODD(1.00)[7]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[obsigna.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[85.215.255.22:from]; ASN(0.00)[asn:6724, ipnet:85.215.255.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[obsigna.com:s=strato-dkim-0002]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[obsigna.com]; SPAMHAUS_ZRD(0.00)[85.215.255.22:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[85.215.255.22:from]; FROM_NAME_HAS_TITLE(1.00)[dr]; 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.34 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 11:09:54 -0000 Hello Vladimir, yes please, I am interested. Please can show us your version of the = GSoC-2018 diff file? Best regards Rolf > Am 27.11.2020 um 05:02 schrieb Vladimir Goncharov = : >=20 > Hello Rolf, >=20 > I have implemented in kernel queue for generated GPIO interrupts with > timestamps, so now it's possible to catch all events even on busy > system. It's all for gpio_gsoc2018 code. In result I have no more > warnings in dmesg. Unfortunately it requires allocating memory on each > event to store pin number and timestamp. In case of unability = allocating > memory it falls back to gpio_gsoc2018 method. > Does anybody interested in such patches? >=20 >=20 > 2020-11-27 04:18, Dr. Rolf Jansen =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >>> Am 26.11.2020 um 16:56 schrieb Ian Lepore : >>>=20 >>> On Tue, 2020-11-24 at 17:14 -0300, Dr. Rolf Jansen wrote: >>>> Hello >>>>=20 >>>> Has anything of the GSoC-2018 efforts made it into the current code >>>> base? >>>>=20 >>>>=20 >>> = https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts >>>>=20 >>>> I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a >>>> BeagleBone Black which was one of the implementation targets of = said >>>> project, but when running the test tools, I either see cannot >>>> read/kevent/poll/aio_read - Operation not supported by device or >>>> Inappropriate ioctl for device. >>>>=20 >>>> Perhaps I need to pull the project=C2=B4s changes into the kernel = by >>>> myself. However, before this I would like to ask whether it is = worth >>>> the effort. >>>>=20 >>>> Please, can anyone shed some light on this. >>>>=20 >>>> Best regards >>>>=20 >>>> Rolf >>>>=20 >>>=20 >>> I made some time this morning to review the gsoc2018 code. It turns >>> out this code is very high quality, nearly ready to commit as-is. = The >>> main thing it needs is some style cleanup in its comment blocks, and >>> documentation. I'd be inclined to commit the code first and write = the >>> documentation over the next little while and commit it separately. >>>=20 >>> If you'd like to give it a try, here's a diff that should apply and >>> build cleanly on freebsd 12 or 13: >>>=20 >>> https://people.freebsd.org/~ian/gpio_gsoc2018.diff >>>=20 >>> While there isn't any documentation yet, there is a test program (I >>> haven't run it yet) that demonstrates all the features: >>>=20 >>> = https://github.com/ckraemer/gsoc2018-utils/blob/master/src/gpioc_intr_test= .c >>>=20 >>> Right now the code will let you block waiting for a pin-change event >>> using select(), poll() or kevents, or to be notified via SIGIO, but >>> after being notified that something happened, you still have to call >>> read() to see which pin changed. I think if the pin changes state >>> multiple times between calls to read(), you'll lose track of some >>> changes (I'm not positive of that, I don't understand the kevent = stuff >>> well). >>>=20 >>> I'd like to add some features so that you can configure it to track = pin >>> changes in counting-mode and timestamping-mode. In counting mode, = when >>> you do a read() you would get back a pair of values, the pin number = and >>> how many times its interrupt fired since the last read. In >>> timestamping mode, every read would return a pin number and an >>> associated timespec giving the exact time the interrupt happened = (there >>> would need to be a way to configure how many events it could buffer, >>> but I think even allowing a thousand buffered events would only use = a >>> few kbytes of memory). >>=20 >> I got it working as well, please see my other post from yesterday. I = used gpioc_intr_test.c. >>=20 >> I see hundreds of warning messages when I press the test button a few = times. May these warnings be safely ignored. The kernel module of Oskar = Holmund works quite nice as well (for what I need), and with that one, I = don=E2=80=99t see warnings. >>=20 >> The counting- and timestamping-mode for sure would be very useful. = Perhaps by implementing this, there won=E2=80=99t be no unhandled = interrupts anymore, and hence there won=E2=80=99t be any warnings = either. >>=20 >> Best regards >>=20 >> Rolf >>=20 >>=20 > _______________________________________________ > 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" Dr. Rolf Jansen - - Rua Reginaldo de Lima, 98 Parque S=C3=A3o Diogo 09732-550, S=C3=A3o Bernardo do Campo S=C3=A3o Paulo - Brazil Phone: 0055-11/4317-0974 Mobile: 0055-11/9 8141-1465 E-Mail: rj@obsigna.com BLog: obsigna.com From owner-freebsd-arm@freebsd.org Fri Nov 27 11:28:36 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 39D344A5817 for ; Fri, 27 Nov 2020 11:28:36 +0000 (UTC) (envelope-from freebsd@viruzzz.org) Received: from mail.viruzzz.org (mail.viruzzz.org [IPv6:2001:67c:380:124::3]) (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 4CjC766xG7z3Ccj for ; Fri, 27 Nov 2020 11:28:34 +0000 (UTC) (envelope-from freebsd@viruzzz.org) Received: from [192.168.252.63] (helo=ohm.local) by mail.viruzzz.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1kibvM-0007qX-JP for freebsd-arm@freebsd.org; Fri, 27 Nov 2020 14:28:24 +0300 Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 To: freebsd-arm@freebsd.org References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <8d806302-479c-ca34-3fdb-96d27f40e212@viruzzz.org> <8655AF30-273B-48E7-98CD-007AA1D265F5@obsigna.com> From: Vladimir Goncharov Message-ID: <54ffe2d2-01a2-8b43-94fa-aee4a3f89861@viruzzz.org> Date: Fri, 27 Nov 2020 14:28:24 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <8655AF30-273B-48E7-98CD-007AA1D265F5@obsigna.com> Content-Type: multipart/mixed; boundary="------------2A1AAF89C0C383B854E76A38" Content-Language: ru X-Rspamd-Queue-Id: 4CjC766xG7z3Ccj X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@viruzzz.org has no SPF policy when checking 2001:67c:380:124::3) smtp.mailfrom=freebsd@viruzzz.org X-Spamd-Result: default: False [1.43 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_ATTACHMENT(0.00)[]; TO_DN_NONE(0.00)[]; MIME_BASE64_TEXT_BOGUS(1.00)[]; MIME_BASE64_TEXT(0.10)[]; CTYPE_MIXED_BOGUS(1.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:67c:380:124::3:from]; ASN(0.00)[asn:41599, ipnet:2001:67c:380::/48, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; DMARC_NA(0.00)[viruzzz.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2001:67c:380:124::3:from:127.0.2.255]; NEURAL_SPAM_SHORT(0.43)[0.427]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 11:28:36 -0000 This is a multi-part message in MIME format. --------------2A1AAF89C0C383B854E76A38 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Here it is. There is struct gpioc_event with pin number and bintime which is send to userspace. Also I'm thinking about to implementation notofication without extra reading from socket via struct kevent's extra fields (fflags/ext[4]), looks like it is possible. 2020-11-27 14:09, Dr. Rolf Jansen пишет: > Hello Vladimir, > > yes please, I am interested. Please can show us your version of the > GSoC-2018 diff file? > > Best regards > > Rolf > >> Am 27.11.2020 um 05:02 schrieb Vladimir Goncharov > >: >> >> Hello Rolf, >> >> I have implemented in kernel queue for generated GPIO interrupts with >> timestamps, so now it's possible to catch all events even on busy >> system. It's all for gpio_gsoc2018 code. In result I have no more >> warnings in dmesg. Unfortunately it requires allocating memory on each >> event to store pin number and timestamp. In case of unability allocating >> memory it falls back to gpio_gsoc2018 method. >> Does anybody interested in such patches? >> >> >> 2020-11-27 04:18, Dr. Rolf Jansen пишет: >>>> Am 26.11.2020 um 16:56 schrieb Ian Lepore >>> >: >>>> >>>> On Tue, 2020-11-24 at 17:14 -0300, Dr. Rolf Jansen wrote: >>>>> Hello >>>>> >>>>> Has anything of the GSoC-2018 efforts made it into the current code >>>>> base? >>>>> >>>>> >>>> https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts >>>> >>>>> >>>>> I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a >>>>> BeagleBone Black which was one of the implementation targets of said >>>>> project, but when running the test tools, I either see cannot >>>>> read/kevent/poll/aio_read - Operation not supported by device or >>>>> Inappropriate ioctl for device. >>>>> >>>>> Perhaps I need to pull the project´s changes into the kernel by >>>>> myself. However, before this I would like to ask whether it is worth >>>>> the effort. >>>>> >>>>> Please, can anyone shed some light on this. >>>>> >>>>> Best regards >>>>> >>>>> Rolf >>>>> >>>> >>>> I made some time this morning to review the gsoc2018 code.  It turns >>>> out this code is very high quality, nearly ready to commit as-is.  The >>>> main thing it needs is some style cleanup in its comment blocks, and >>>> documentation.  I'd be inclined to commit the code first and write the >>>> documentation over the next little while and commit it separately. >>>> >>>> If you'd like to give it a try, here's a diff that should apply and >>>> build cleanly on freebsd 12 or 13: >>>> >>>> https://people.freebsd.org/~ian/gpio_gsoc2018.diff >>>> >>>> While there isn't any documentation yet, there is a test program (I >>>> haven't run it yet) that demonstrates all the features: >>>> >>>> https://github.com/ckraemer/gsoc2018-utils/blob/master/src/gpioc_intr_test.c >>>> >>>> Right now the code will let you block waiting for a pin-change event >>>> using select(), poll() or kevents, or to be notified via SIGIO, but >>>> after being notified that something happened, you still have to call >>>> read() to see which pin changed.  I think if the pin changes state >>>> multiple times between calls to read(), you'll lose track of some >>>> changes (I'm not positive of that, I don't understand the kevent stuff >>>> well). >>>> >>>> I'd like to add some features so that you can configure it to track pin >>>> changes in counting-mode and timestamping-mode.  In counting mode, when >>>> you do a read() you would get back a pair of values, the pin number and >>>> how many times its interrupt fired since the last read.  In >>>> timestamping mode, every read would return a pin number and an >>>> associated timespec giving the exact time the interrupt happened (there >>>> would need to be a way to configure how many events it could buffer, >>>> but I think even allowing a thousand buffered events would only use a >>>> few kbytes of memory). >>> >>> I got it working as well, please see my other post from yesterday. I >>> used gpioc_intr_test.c. >>> >>> I see hundreds of warning messages when I press the test button a few >>> times. May these warnings be safely ignored. The kernel module of >>> Oskar Holmund works quite nice as well (for what I need), and with >>> that one, I don’t see warnings. >>> >>> The counting- and timestamping-mode for sure would be very useful. >>> Perhaps by implementing this, there won’t be no unhandled interrupts >>> anymore, and hence there won’t be any warnings either. >>> >>> Best regards >>> >>> Rolf >>> >>> >> _______________________________________________ >> 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" > > > > Dr. Rolf Jansen > - - > Rua Reginaldo de Lima, 98 > Parque São Diogo > 09732-550, São Bernardo do Campo > São Paulo - Brazil > > Phone:0055-11/4317-0974 > Mobile:0055-11/9 8141-1465 > E-Mail:rj@obsigna.com > BLog:obsigna.com > --------------2A1AAF89C0C383B854E76A38 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="gpio.diff" Content-Transfer-Encoding: base64 Content-Dispos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KKwllcnIgPSBidXNfc2V0dXBfaW50cihpbnRyX2NvbmYt PnBpbi0+ZGV2LCBpbnRyX2NvbmYtPmludHJfcmVzLAorCQkJSU5UUl9UWVBFX01JU0MgfCBJ TlRSX01QU0FGRSwgTlVMTCwgZ3Bpb2NfaW50ZXJydXB0X2hhbmRsZXIsCisJCQlpbnRyX2Nv bmYsICZpbnRyX2NvbmYtPmludHJfY29va2llKTsKKwlpZiAoZXJyICE9IDApCisJCXJldHVy biAoZXJyKTsKKworCWludHJfY29uZi0+cGluLT5mbGFncyA9IGZsYWdzOworCW10eF9sb2Nr KCZpbnRyX2NvbmYtPm10eCk7CisJaW50cl9jb25mLT5jb25maWdfbG9ja2VkID0gZmFsc2U7 CisJd2FrZXVwKCZpbnRyX2NvbmYtPmNvbmZpZ19sb2NrZWQpOworCisJcmV0dXJuICgwKTsK K30KKworCXN0YXRpYyBpbnQKK2dwaW9jX3JlbGVhc2VfcGluX2ludHIoc3RydWN0IGdwaW9j X3Bpbl9pbnRyICppbnRyX2NvbmYpCit7CisJaW50IGVycjsKKworCWludHJfY29uZi0+Y29u ZmlnX2xvY2tlZCA9IHRydWU7CisJbXR4X3VubG9jaygmaW50cl9jb25mLT5tdHgpOworCisJ aWYgKGludHJfY29uZi0+aW50cl9jb29raWUgIT0gTlVMTCkgeworCQllcnIgPSBidXNfdGVh cmRvd25faW50cihpbnRyX2NvbmYtPnBpbi0+ZGV2LAorCQkJCWludHJfY29uZi0+aW50cl9y ZXMsIGludHJfY29uZi0+aW50cl9jb29raWUpOworCQlpZiAoZXJyICE9IDApCisJCQlyZXR1 cm4gKGVycik7CisJCWVsc2UKKwkJCWludHJfY29uZi0+aW50cl9jb29raWUgPSBOVUxMOwor CX0KKworCWlmIChpbnRyX2NvbmYtPmludHJfcmVzICE9IE5VTEwpIHsKKwkJZXJyID0gYnVz X3JlbGVhc2VfcmVzb3VyY2UoaW50cl9jb25mLT5waW4tPmRldiwgU1lTX1JFU19JUlEsCisJ CQkJaW50c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MpKQorCQlyZXR1cm4gKHRydWUpOworCisJ U0xJU1RfRk9SRUFDSChwcml2X2xpbmssICZpbnRyX2NvbmYtPnByaXZzLCBuZXh0KSB7CisJ CWlmIChwcml2X2xpbmstPnByaXYgIT0gcHJpdikKKwkJCXJldHVybiAoZmFsc2UpOworCX0K KworCXJldHVybiAodHJ1ZSk7Cit9CisKKworCXN0YXRpYyB1aW50MzJfdAorZ3Bpb2NfZ2V0 X2ludHJfY29uZmlnKHN0cnVjdCBncGlvY19zb2Z0YyAqc2MsIHN0cnVjdCBncGlvY19jZGV2 cHJpdiAqcHJpdiwKKwkJdWludDMyX3QgcGluKQoreworCXN0cnVjdCBncGlvY19waW5faW50 cgkqaW50cl9jb25mID0gJnNjLT5zY19waW5faW50cltwaW5dOworCXN0cnVjdCBncGlvY19w cml2cwkqcHJpdl9saW5rOworCXVpbnQzMl90CQlmbGFnczsKKworCWZsYWdzID0gaW50cl9j b25mLT5waW4tPmZsYWdzOworCisJaWYgKGZsYWdzID09IDApCisJCXJldHVybiAoMCk7CisK KwlTTElTVF9GT1JFQUNIKHByaXZfbGluaywgJmludHJfY29uZi0+cHJpdnMsIG5leHQpIHsK KwkJaWYgKHByaXZfbGluay0+cHJpdiA9PSBwcml2KSB7CisJCQlmbGFncyB8PSBHUElPX0lO VFJfQVRUQUNIRUQ7CisJCQlicmVhazsKKwkJfQorCX0KKworCXJldHVybiAoZmxhZ3MpOwor fQorCisJc3RhdGljIGludAorZ3Bpb2Nfc2V0X2ludHJfY29uZmlnKHN0cnVjdCBncGlvY19z b2Z0YyAqc2MsIHN0cnVjdCBncGlvY19jZGV2cHJpdiAqcHJpdiwKKwkJdWludDMyX3QgcGlu LCB1aW50MzJfdCBmbGFncykKK3sKKwlzdHJ1Y3QgZ3Bpb2NfcGluX2ludHIgKmludHJfY29u ZiA9ICZzYy0+c2NfcGluX2ludHJbcGluXTsKKwlpbnQgcmVzOworCisJcmVzID0gMDsKKwlp ZiAoaW50cl9jb25mLT5waW4t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CQkJaWYgKHJlcyA9PSBFRVhJU1QpCisJ CQkJcmVzID0gMDsKKwkJfQorCX0KKwltdHhfdW5sb2NrKCZpbnRyX2NvbmYtPm10eCk7CisK KwlyZXR1cm4gKHJlcyk7Cit9CisKKwlzdGF0aWMgdm9pZAorZ3Bpb2NfaW50ZXJydXB0X2hh bmRsZXIodm9pZCAqYXJnKQoreworCXN0cnVjdCBncGlvY19waW5faW50ciAqaW50cl9jb25m ID0gYXJnOworCXN0cnVjdCBncGlvY19zb2Z0YyAqc2MgPSBpbnRyX2NvbmYtPnNjOworCXN0 cnVjdCBncGlvY19wcml2cyAqcHJpdnM7CisKKwltdHhfbG9jaygmaW50cl9jb25mLT5tdHgp OworCisJaWYgKGludHJfY29uZi0+Y29uZmlnX2xvY2tlZCA9PSB0cnVlKSB7CisJCWRldmlj ZV9wcmludGYoc2MtPnNjX2RldiwgIkludGVycnVwdCBjb25maWd1cmF0aW9uIGluICIKKwkJ CQkicHJvZ3Jlc3MuIERpc2NhcmRpbmcgaW50ZXJydXB0IG9uIHBpbiAlZC5cbiIsCisJCQkJ aW50cl9jb25mLT5waW4tPnBpbik7CisJCW10eF91bmxvY2soJmludHJfY29uZi0+bXR4KTsK KwkJcmV0dXJuOworCX0KKworCWlmIChTTElTVF9FTVBUWSgmaW50cl9jb25mLT5wcml2cykp IHsKKwkJZGV2aWNlX3ByaW50ZihzYy0+c2NfZGV2LCAiTm8gZmlsZSBkZXNjcmlwdG9yIGFz c29jaWF0ZWQgd2l0aCAiCisJCQkJIm9jY3VycmVkIGludGVycnVwdCBvbiBwaW4gJWQuXG4i LCBpbnRyX2NvbmYtPnBpbi0+cGluKTsKKwkJbXR4X3VubG9jaygmaW50cl9jb25mLT5tdHgp OworCQlyZXR1cm47CisJfQorCisJU0xJU1RfRk9SRUFDSChwcml2cywgJmludHJfY29uZi0+ cHJpdnMsIG5leHQpIHsKKwkJbXR4X2xvY2soJnByaXZzLT5wcml2LT5tdHgpOworCQlzdHJ1 Y3Qg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JldHVybiAocmVzKTsKK30KKworCXN0YXRpYyBp bnQKK2dwaW9jX3BvbGwoc3RydWN0IGNkZXYgKmRldiwgaW50IGV2ZW50cywgc3RydWN0IHRo cmVhZCAqdGQpCit7CisJc3RydWN0IGdwaW9jX2NkZXZwcml2ICpwcml2OworCWludCBlcnI7 CisJaW50IHJldmVudHM7CisKKwlyZXZlbnRzID0gMDsKKworCWVyciA9IGRldmZzX2dldF9j ZGV2cHJpdigodm9pZCAqKikmcHJpdik7CisJaWYgKGVyciAhPSAwKSB7CisJCXJldmVudHMg PSBQT0xMRVJSOworCQlyZXR1cm4gKHJldmVudHMpOworCX0KKworCWlmIChTTElTVF9FTVBU WSgmcHJpdi0+cGlucykpIHsKKwkJcmV2ZW50cyA9IFBPTExIVVA7CisJCXJldHVybiAocmV2 ZW50cyk7CisJfQorCisJaWYgKGV2ZW50cyAmIChQT0xMSU4gfCBQT0xMUkROT1JNKSkgewor CQlpZiAocHJpdi0+bGFzdF9pbnRyX3BpbiAhPSAtMSkKKwkJCXJldmVudHMgfD0gZXZlbnRz ICYgKFBPTExJTiB8IFBPTExSRE5PUk0pOworCQllbHNlCisJCQlzZWxyZWNvcmQodGQsICZw cml2LT5zZWxpbmZvKTsKKwl9CisKKwlyZXR1cm4gKHJldmVudHMpOworfQorCisJc3RhdGlj IGludAorZ3Bpb2Nfa3FmaWx0ZXIoc3RydWN0IGNkZXYgKmRldiwgc3RydWN0IGtub3RlICpr bikKK3svL2F0dGFjaCB0byBrcXVldWUKKwlzdHJ1Y3QgZ3Bpb2NfY2RldnByaXYgKnByaXY7 CisJc3RydWN0IGtubGlzdCAqa25saXN0OworCWludCBlcnI7CisKKwllcnIgPSBkZXZmc19n ZXRfY2RldnByaXYoKHZvaWQgKiopJnByaXYpOworCWlmIChlcnIgIT0gMCkKKwkJcmV0dXJu IGVycjsKKworCWlmIChTTElTVF9FTVBUWSgmcHJpdi0+cGlucykpCisJCXJldHVybiAoRU5Y SU8pOworCisJc3dpdGNoKGtuLT5rbl9maWx0ZXIpIHsKKwljYXNlIEVWRklMVF9SRUFEOgor CQlrbi0+a25fZm9wID0gJmdwaW9jX3JlYWRfZmlsdGVyb3BzOworCQlrbi0+a25faG9vayA9 ICh2b2lkICopcHJpdjsKKwkJYnJlYWs7CisJZGVmYXVsdDoKKwkJcmV0dXJuIChFT1BOT1RT VVBQKTsKKwl9CisKKwlrbmxpc3QgPSAmcHJpdi0+c2VsaW5mby5zaV9ub3RlOworCWtubGlz dF9hZGQoa25saXN0LCBrbiwgMCk7CisKKwlyZXR1cm4gKDApOworfQorCitzdGF0aWMgaW50 CitncGlvY19rcXJlYWQoc3RydWN0IGtub3RlICprbiwgbG9uZyBoaW50KQoreworCXN0cnVj dCBncGlvY19jZGV2cHJpdiAqcHJpdiA9IGtuLT5rbl9ob29rOworCWlmIChTTElTVF9FTVBU WSgmcHJpdi0+cGlucykpIHsKKwkJa24tPmtuX2ZsYWdzIHw9IEVWX0VPRjsKKwkJcmV0dXJu ICgxKTsKKwl9IGVsc2UgeworCQlpZiAocHJpdi0+bGFzdF9pbnRyX3BpbiAhPSAtMSkgewor CQkJa24tPmtuX2RhdGEgPSBzaXplb2YocHJpdi0+bGFzdF9pbnRyX3Bpbik7CisJCQlyZXR1 cm4gKDEpOworCQl9CisJfQorCXJldHVybiAoMCk7Cit9CisKK3N0YXRpYyB2b2lkCitncGlv Y19rcWRldGFjaChzdHJ1Y3Qga25vdGUgKmtuKQoreworCXN0cnVjdCBncGlvY19jZGV2cHJp diAqcHJpdiA9IGtuLT5rbl9ob29rOworCXN0cnVjdCBrbmxpc3QgKmtubGlzdCA9ICZwcml2 LT5zZWxpbmZvLnNpX25vdGU7CisKKwlrbmxpc3RfcmVtb3ZlKGtubGlzdCwga24sIDApOwog fQogCiBzdGF0aWMgZGV2aWNlX21ldGhvZF90IGdwaW9jX21ldGhvZHNbXSA9IHsKT25seSBp biAvdXNyL2hvbWUvYnVpbGRyb290L3Vzci9zcmMvc3lzL2Rldi9ncGlvOiBncGlvYy5jLm9y aWcKT25seSBpbiAuOiBkaWZmLmNvcmUKT25seSBpbiAuOiBncGlvLmRpZmYKZGlmZiAtcnUg Li9zeXMvZ3Bpby5oIC91c3IvaG9tZS9idWlsZHJvb3QvdXNyL3NyYy9zeXMvc3lzL2dwaW8u aAotLS0gLi9zeXMvZ3Bpby5oCTIwMjAtMTAtMjMgMDM6MDI6MTguMDAwMDAwMDAwICswMzAw CisrKyAvdXNyL2hvbWUvYnVpbGRyb290L3Vzci9zcmMvc3lzL3N5cy9ncGlvLmgJMjAyMC0x MS0yNSAxMjoyMjo0MS40NjA5NDEwMDAgKzAzMDAKQEAgLTg0LDYgKzg0LDcgQEAKICNkZWZp bmUgR1BJT19JTlRSX01BU0sJCShHUElPX0lOVFJfTEVWRUxfTE9XIHwgR1BJT19JTlRSX0xF VkVMX0hJR0ggfCBcCiAJCQkJR1BJT19JTlRSX0VER0VfUklTSU5HIHwJCQkgICAgICBcCiAJ CQkJR1BJT19JTlRSX0VER0VfRkFMTElORyB8IEdQSU9fSU5UUl9FREdFX0JPVEgpCisjZGVm aW5lIEdQSU9fSU5UUl9BVFRBQ0hFRAkweDAwMjAwMDAwICAgICAgLyogaW50ZXJydXB0IGF0 dGFjaGVkIHRvIGZpbGUgKi8KIAogc3RydWN0IGdwaW9fcGluIHsKIAl1aW50MzJfdCBncF9w aW47CQkJLyogcGluIG51bWJlciAqLwpPbmx5IGluIC91c3IvaG9tZS9idWlsZHJvb3QvdXNy L3NyYy9zeXMvc3lzOiBncGlvLmgub3JpZwo= --------------2A1AAF89C0C383B854E76A38-- From owner-freebsd-arm@freebsd.org Fri Nov 27 17:17: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 D6BD84ACB6C for ; Fri, 27 Nov 2020 17:17:00 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound5a.ore.mailhop.org (outbound5a.ore.mailhop.org [44.233.67.66]) (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 4CjLs82tY0z3mg1 for ; Fri, 27 Nov 2020 17:17:00 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1606497419; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=YdMCFDm2uqpOrZ0g9VLAX9WyxSgRPVnsS02pV7yFhmsmoXuKwmLwuTFPm1pAhm0nyiYuljA5ljRoS XD4DOvtET4xrX4/gyo8B4RBDrYMrMJ33wg/6YuxSaJGW8y67glF/giLuEnh6uPjZ/aKXKQSic3q03g 7T7F10Me0Cq1z0JbzrrBe/B6kPsq3Fvwq/ybUCMW/OquLQUOO/AnYvnpl9adKLgT9vWgVc4S0J2Vh7 pUpLXSsxYrv/i9tdId9amDGU1+oPm/Cu4nU+Ml3FOJR5CrneAFET98VXZHvpB3fyUo46r1o3E4khd9 cwhKiW0e8mMDhPjjDwiu43CP5aEzw2g== 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=bsBNMxN2gbjmVl5U4Pdkg32AiWSSfqGorhNoC36ljhE=; b=G+i65tmzojYE8CQJrpVAlAPK2q1YN6xGmmTgIWEA6k/OxDPUAmZSeO0+RX4EI7iCoRcNCUK1Dfymw hfAkfLfi6nHUTJDHzbdkO2ypYJnUU/mdRK/TVCrvjau3L1U7Zd2m9HsgV+ZYJbLPu9KmY3dBbF0TcE YAadOYxJTIZA72uWnyiuc3P2gSGyi77M8n0m0EVa0FyY7S03cZAzXOQyUC4V2EFx7Xs1+yWdv79I8K Wizn+6NQxb1mCkqv3d9fy2E/KG+/RWjMyzQw1aNcAFo7Y2UvGWgRiEB+ejG9X8YfOiH+AVwIdz9TYM 5iP3tfml0hMeEO6RyBvDO5olfT50HWA== ARC-Authentication-Results: i=1; outbound3.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=bsBNMxN2gbjmVl5U4Pdkg32AiWSSfqGorhNoC36ljhE=; b=barVRNFnQbNeAs1dAlupHoufWMO5OR0nH7/r7waLLm3J5bN70QGbKyV3CmQ+VBJVh+8BtridN3z8i IZ7bvZ4snGb2RVdoxuqlr9LbbtJ7JIoi060Rvh8kRW1zmMcZFSOz6Rcawkvi2Rojj57t6q/IY8CovN LQUH1UIwoV3taBENs5W7Ij8QlPqEWWsXpt5gP7jp6djJjWlfYaKBcP3zw6HD+cNgGjA15lBYeds6ha snqoJqziPAvRJsa0UgMw66+AfhOFbQsKSJGuxWRVTRGICm60qslz/Z+RiHWp2gC5S7ar1Jl2zJYn4b pafdFJGGCegwZrdjG9/UmIcBAtoIF+Q== X-MHO-RoutePath: aGlwcGll X-MHO-User: 589980e0-30d4-11eb-8b39-614106969e8d 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 outbound3.ore.mailhop.org (Halon) with ESMTPSA id 589980e0-30d4-11eb-8b39-614106969e8d; Fri, 27 Nov 2020 17:16:58 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 0ARHGrR1080432; Fri, 27 Nov 2020 10:16:54 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <08649892ca2ab434c261d36e0e13ba051086de6f.camel@freebsd.org> Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: Ian Lepore To: Vladimir Goncharov , freebsd-arm@freebsd.org Date: Fri, 27 Nov 2020 10:16:53 -0700 In-Reply-To: <54ffe2d2-01a2-8b43-94fa-aee4a3f89861@viruzzz.org> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <8d806302-479c-ca34-3fdb-96d27f40e212@viruzzz.org> <8655AF30-273B-48E7-98CD-007AA1D265F5@obsigna.com> <54ffe2d2-01a2-8b43-94fa-aee4a3f89861@viruzzz.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CjLs82tY0z3mg1 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:44.224.0.0/11, country:US] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 17:17:00 -0000 On Fri, 2020-11-27 at 14:28 +0300, Vladimir Goncharov wrote: > Here it is. > There is struct gpioc_event with pin number and bintime which is send > to userspace. > > Also I'm thinking about to implementation notofication without extra > reading from socket via struct kevent's extra fields (fflags/ext[4]), > looks like it is possible. > Please don't top-post on freebsd mailing lists. I think we need a way for the app to choose whether it wants simple reporting of pin number (like the original code) perhaps along with a count, versus requesting detailed per-event data. I'm going to propose something more detailed about this as soon as I get my thoughts all organized. I also want to get the original code and the locking fixes I've done to it into a phab review for people to start looking at before starting to do new major changes to it. Allocating memory in the interrupt handler isn't a good idea, it will just increase latency on processing other pin interrupts and lead to inaccurate timestamps. IMO, it would be better to allocate a fixed array of events; when the app requests detailed event reporting it can request the number of stored events it wants handled and we could allocate all at once based on that. -- Ian From owner-freebsd-arm@freebsd.org Fri Nov 27 17:32: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 6C5874ACFB7 for ; Fri, 27 Nov 2020 17:32:52 +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 4CjMCS1J74z3nZ4 for ; Fri, 27 Nov 2020 17:32:52 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1606498370; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=RKIgf3eb+8BLi2mtn3EjUTuniuxl5wtydr2x96rY5sQZSGStQjgxwt6qEXOXjtlis2kLMM3vmxir1 /LtkngGK/ynZVdq8zZ7l5PIBQlfyqTZMEoEPcXIvellFUyT6Qfin1FtPIBSzWaV0C6wJnfrf2wCXkU Bs+WvGb1beOc75jUR114pCvbYpfOO8hMg1+eq8gm9CX5ggd1eh04y1FWlomFGxKiooVEu1v/2RGxPs Gd6w7DnasGKh5NV+XpXAmRWFKqxNK5g+wb/1SbGgj64f3bINbW58BqoJj9/1di10T00nPLznO6PvHd RKDvAXtqvelINNc8DPOso1CLJp5hqyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=PbV8VbxIjgp43QmUGb8hyKoLtG7rU3EEqFSMyivzegk=; b=sTX2Ya3S9mGli6q9p0u8iDZaxMRU/6QRFPK72lOPqDrGDp3gVX+Kle5+8PSdmpBB8L6CR37s0c3Iy l/oigAJnVxZ/f8R8rCdHcn5cMfCumBiHIQB1hIrryZZyhDYjJlp8Ljp9hHAq/VS8SGDpELKnVpsT5R fXoM6ki3gWrnt1pwGSUOKWYcQglLFfaU9jbFuwSKoiMoi1vJ+aAe4EfmnN80rU1H4LkXb0VwJMDON0 9IRwKd7pvaHzFF4qGhzrXW6on8ERKj7ljpubpycshM/GGRI8wz7o6Qbc9jJi7EmCMABUtw9utjhiJT bClSZj8YPzaRyCLVe9kJAK5LGvadWxQ== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=PbV8VbxIjgp43QmUGb8hyKoLtG7rU3EEqFSMyivzegk=; b=hFweL3qVsul30tJNf7cH+xYbbIYuxaVC2tnWhw+eFot2o+gZ/6bzhLPJmYIGqQHLLigXPjpq43IxZ 52DHlQDg7AKyf0084rUTROuAInm7Qb0BrVzflSw9r8fo6tG1kRECVuHhN08LFvwiQYeczZWhX8VUAP IUnZJS0l9rDGQDqM8jKiNY+cdWvY4f0V2f0Lb82TehkISz8uLsnc+rkugGKU90Zwz5rsOe5WN1fAsp 8XA8lDLLvgn7/Usjx8IvFVnIZ+JeOwdbySrgJVgN2Zk4lktYRGEfv2Odum4SbnyjTfjdORPOOs5qeK j3vIVdD8BdUONPhSEEKDjAOjoSIM+CA== X-MHO-RoutePath: aGlwcGll X-MHO-User: 905ca3ae-30d6-11eb-9e13-df46ed8f892f 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 905ca3ae-30d6-11eb-9e13-df46ed8f892f; Fri, 27 Nov 2020 17:32:48 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 0ARHWkir080472; Fri, 27 Nov 2020 10:32:46 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: Ian Lepore To: "Dr. Rolf Jansen" Cc: freebsd-arm@freebsd.org Date: Fri, 27 Nov 2020 10:32:46 -0700 In-Reply-To: References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> Content-Type: text/plain; charset="iso-2022-jp" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CjMCS1J74z3nZ4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 17:32:52 -0000 On Thu, 2020-11-26 at 22:18 -0300, Dr. Rolf Jansen wrote: > > Am 26.11.2020 um 16:56 schrieb Ian Lepore : > > > > On Tue, 2020-11-24 at 17:14 -0300, Dr. Rolf Jansen wrote: > > > Hello > > > > > > Has anything of the GSoC-2018 efforts made it into the current > > > code > > > base? > > > > > > > > > > https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts > > > > > > I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a > > > BeagleBone Black which was one of the implementation targets of > > > said > > > project, but when running the test tools, I either see cannot > > > read/kevent/poll/aio_read - Operation not supported by device or > > > Inappropriate ioctl for device. > > > > > > Perhaps I need to pull the project$B!-(Bs changes into the kernel by > > > myself. However, before this I would like to ask whether it is > > > worth > > > the effort. > > > > > > Please, can anyone shed some light on this. > > > > > > Best regards > > > > > > Rolf > > > > > > > I made some time this morning to review the gsoc2018 code. It > > turns > > out this code is very high quality, nearly ready to commit as- > > is. The > > main thing it needs is some style cleanup in its comment blocks, > > and > > documentation. I'd be inclined to commit the code first and write > > the > > documentation over the next little while and commit it separately. > > > > If you'd like to give it a try, here's a diff that should apply and > > build cleanly on freebsd 12 or 13: > > > > https://people.freebsd.org/~ian/gpio_gsoc2018.diff > > > > While there isn't any documentation yet, there is a test program (I > > haven't run it yet) that demonstrates all the features: > > > > https://github.com/ckraemer/gsoc2018-utils/blob/master/src/gpioc_intr_test.c > > > > Right now the code will let you block waiting for a pin-change > > event > > using select(), poll() or kevents, or to be notified via SIGIO, but > > after being notified that something happened, you still have to > > call > > read() to see which pin changed. I think if the pin changes state > > multiple times between calls to read(), you'll lose track of some > > changes (I'm not positive of that, I don't understand the kevent > > stuff > > well). > > > > I'd like to add some features so that you can configure it to track > > pin > > changes in counting-mode and timestamping-mode. In counting mode, > > when > > you do a read() you would get back a pair of values, the pin number > > and > > how many times its interrupt fired since the last read. In > > timestamping mode, every read would return a pin number and an > > associated timespec giving the exact time the interrupt happened > > (there > > would need to be a way to configure how many events it could > > buffer, > > but I think even allowing a thousand buffered events would only use > > a > > few kbytes of memory). > > I got it working as well, please see my other post from yesterday. I > used gpioc_intr_test.c. > > I see hundreds of warning messages when I press the test button a few > times. May these warnings be safely ignored. The kernel module of > Oskar Holmund works quite nice as well (for what I need), and with > that one, I don$B!G(Bt see warnings. > > The counting- and timestamping-mode for sure would be very useful. > Perhaps by implementing this, there won$B!G(Bt be no unhandled interrupts > anymore, and hence there won$B!G(Bt be any warnings either. > > Best regards > > Rolf I'm sorry, I somehow overlooked your previous message about using gpioc_intr_test.c. Those warning messages are definitely not a good thing, in some changes I've made to the original patches they are changed to debugging-only output that won't normally show up. Printing messages from within an interrupt handler is pretty much always a bad idea. :) I was thinking about the various interrupt options and realized we cannot support level-triggered interrupts in this code without a ton of work. It's just a recipe for an interrupt storm (which will happen at the rate of tens of thousands of interrupts per second once the printfs aren't there to slow things down to console IO speed). To use level- triggered interrupts from userland, the gpioc would have to mask the interrupt from within the interrupt handler (we don't have an internal API for doing that with gpio interrupts right now), and provide some sort of EOI (end-of-interrupt) acknowledgement interface to userland to unmask them once it had done something to make the interrupt stop asserting. Basically this would extend the way device drivers handle level-triggered interrupts into userland, and I just don't see much value in all the work that would be involved to make that happen. I think instead we should just run in counting-mode by default, and add new code similar to what Vladimir Goncharov has proposed to handle detailed reporting of each event if the app requests it. I can't make up my mind on the issue of debouncing. My gut tells me that building in some kind of debounce logic as a per-pin configurable option would be nice, but it might also get really complicated. An app could handle debouncing for itself if it requested detailed event reporting, because the timestamps on the events could help it decide what to do. -- Ian From owner-freebsd-arm@freebsd.org Fri Nov 27 18:04:08 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 A78E04AD891 for ; Fri, 27 Nov 2020 18:04:08 +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 4CjMvX1F2Lz3pXX for ; Fri, 27 Nov 2020 18:04:07 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1606500247; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=edQg0qURr1+ntfkUwk0fEzay0dluTiehCONj7MNk2h4eawEmVLAnXBgihHcC4NtbTkNb8xnlysMgp LfJMlSGFSwyp4/2ezMI8rp1nVRvQbV3qQ0aEhq7yFYjjdv/eNpcjrqXNUZOP41KC52gPAd4x0YZXgZ skHeq1TOw2V7BxLrU12bka8iwzHmVZ0Btfz5thlLvUpwIfKgMIk+J9sFlpXAwSbxyFSUBP4H1PI6do iePUbIXT59ovlV6Mm3ILxncCDQ2tUMfHAtEHpDO8/qrEugd4kFbgFzNS1ZG4SVjBf9tffW6DP7gYQ5 iugk65gE8szpgheCm9sQhsbrtt+9IIg== 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=tmRbCx3RRTTMLCVZ/k7pwNBO62JAB3DU13E3npBQ5Dc=; b=GnS6ei5q2SdNJWAh0oRY2CDOeyjIRD1hGFufDE3xAjJ7XWIxcO+gcHdxhKkEn6IiLJx2vBunztoPR ilm6QLF0cdvtIf0GG8EHEBBdpjSIV/88NwGyoO/H8EOCnKal5DWmXSwuCJRI5PLS6hCpijefaaLULJ q0Ova4W5NpU1CspEq7npZuEK3bkB//NxLltLGpRnBJrxflWhyCbNWVvgUBmwtoEpqDKRXOeBKXb5bI guNcFhVjb2OoJ1nksjHxwUAdxB0weZ4gjKdB4IqRaeC83dpjqrear9695zUUGIa+zbga8kZaYo/mP6 /YnZIA5psZF/qOhmBAXTVqgOaVftcCA== 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=tmRbCx3RRTTMLCVZ/k7pwNBO62JAB3DU13E3npBQ5Dc=; b=cTzNoLLcBsEIGavlP09mGMGflt4Q1sRJdWSIwMcFaVa7J7MeNNJ54BglNMcNBrNEcGyxQPo9CB4JX 2zw1qJtxUgRfgq2X6C58yJlWPeMxvlrNIdakP0Htpfx12bZbHFozeQ4oyZT1nd+5VZU8J3EnBqoQdY lQsmCzk0960pJ5vhMwrveG/qLN9cSlQokCJ+gJ1xsQ5Eh39Mt5JHsWXm3rmok3GZ4LJuxhjmgrzlEA fJOYDg+nEeOYAXCAJw6O8Kne09qszGApWh/Hlkc4Kh2Oe8frLG0VmZf2hcbOaXtKo8MnucUCb29wRu 0S3FyvS3AR/ixBNzxI3vydrZXSNN2TA== X-MHO-RoutePath: aGlwcGll X-MHO-User: f00d981e-30da-11eb-9e13-df46ed8f892f 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 f00d981e-30da-11eb-9e13-df46ed8f892f; Fri, 27 Nov 2020 18:04:06 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 0ARI45SS080545 for ; Fri, 27 Nov 2020 11:04:05 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1e6993d43d22d6ce1aa2860a61745356688d1e53.camel@freebsd.org> Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: Ian Lepore To: freebsd-arm@freebsd.org Date: Fri, 27 Nov 2020 11:04:05 -0700 In-Reply-To: <08649892ca2ab434c261d36e0e13ba051086de6f.camel@freebsd.org> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <8d806302-479c-ca34-3fdb-96d27f40e212@viruzzz.org> <8655AF30-273B-48E7-98CD-007AA1D265F5@obsigna.com> <54ffe2d2-01a2-8b43-94fa-aee4a3f89861@viruzzz.org> <08649892ca2ab434c261d36e0e13ba051086de6f.camel@freebsd.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CjMvX1F2Lz3pXX X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 18:04:08 -0000 On Fri, 2020-11-27 at 10:16 -0700, Ian Lepore wrote: > On Fri, 2020-11-27 at 14:28 +0300, Vladimir Goncharov wrote: > > Here it is. > > There is struct gpioc_event with pin number and bintime which is send > > to userspace. > > > > Also I'm thinking about to implementation notofication without extra > > reading from socket via struct kevent's extra fields (fflags/ext[4]), > > looks like it is possible. > > > > Please don't top-post on freebsd mailing lists. > > I think we need a way for the app to choose whether it wants simple > reporting of pin number (like the original code) perhaps along with a > count, versus requesting detailed per-event data. I'm going to propose > something more detailed about this as soon as I get my thoughts all > organized. I also want to get the original code and the locking fixes > I've done to it into a phab review for people to start looking at > before starting to do new major changes to it. > > Allocating memory in the interrupt handler isn't a good idea, it will > just increase latency on processing other pin interrupts and lead to > inaccurate timestamps. IMO, it would be better to allocate a fixed > array of events; when the app requests detailed event reporting it can > request the number of stored events it wants handled and we could > allocate all at once based on that. > The gsoc2018 code, with locking and style(9) fixes, is now at: https://reviews.freebsd.org/D27398 -- Ian From owner-freebsd-arm@freebsd.org Fri Nov 27 22:05: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 E868946A33B for ; Fri, 27 Nov 2020 22:05:11 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound5a.ore.mailhop.org (outbound5a.ore.mailhop.org [44.233.67.66]) (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 4CjTFg3Nhpz4Wky for ; Fri, 27 Nov 2020 22:05:11 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1606514705; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=XRLc3tv0y/GgEYSj3l3CV3sbMguCATlSZtuhifr1PoceQDin8R8nkF4a6ixlhDam1M8Q51KTZtjN8 iSyjqG9/c0MO4s/sDvT6VzJrPNXEgGJESTg88Rhf4HXJToDfKt8BJg4nYg2poBsw8Q5KOdWWjtrfNK O04IYEQVH4UUdIRRTAFfAp8VbIBSe01ggZLmH2Yb7P1qxiFnC1Up9CwDWiFPfEskSoKG+nhfTVIb/8 4YSqVRbUBHTwIpQ3UPqM1Z0TTMWPAYx4wOlPY0QEhGXwPnrp23AiIU6zmVkm/F6S4t5uuVe73o6mJC WJssmn8SJwoVJJJ1UUhKZWzBYxeOZLw== 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=V8skLzckNqlR6JXb/d316lHAjJ1Zi9M47hgTFw5mrRY=; b=Dbc7ODStV/jXIRIYSdNULkRhoibuD36jerRwiLfUWuBzfGB+zQF4f9hJBqdJ3K3sDTfvbpCW99t5d PjlYAybmZzoN6KpgyTSNYSEK9yLbYDfIUy40YvKgIDHLY9s/+lGHKWCCya1cpt86EDX3/B8p71fya3 agEMlLP8KoKVFzluew+WvtYkmmVti37sFCRjscSCa4ZbXV6lMDwHqyhVHVmNOn5jt6X5pVZpgDxCkm aZPYq69X9dRVHVQH4cvi/IjrdkwMNz4PHJ2tYjcuSzrXXyvSsVnIjdn+sVcoSRuYBBdml1yDnZzNq+ ryF4biPYB8mpmGFztdoRp6qGebLEiIA== ARC-Authentication-Results: i=1; outbound3.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=V8skLzckNqlR6JXb/d316lHAjJ1Zi9M47hgTFw5mrRY=; b=cOnAKQOVHLWUT8T7XWoQ+uUg+oDWWmhl+CP5+gr6c/c6mwL+YwoaWoxjaeJlhNbkhRDwc4q7/lQ5p JCdTPG3Kq1B1+26i0iG9P3fotQctr/HMKyo+vTjyphO3cVkCECF1LsAYb/a7R3l3k3FehOquKz1WiL 4qlBMSZ8cwd5Ig2/oaSFTU7oJjP5LmZDGXxQTZMTJNI4TgDxDJrd2ebVp+1Kh1KNpSpFNZ0IQdIXWo 0auPRFWoUbrkvXN48nn1eU7c9zIwXJXge+muD/8IMoyjfh41VhucXvvVVMdQykz774jNmCbcyvyswp G2XynCg5Mad5SHcOTsvUrCMLgElgsEw== X-MHO-RoutePath: aGlwcGll X-MHO-User: 99317c48-30fc-11eb-8b39-614106969e8d 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 outbound3.ore.mailhop.org (Halon) with ESMTPSA id 99317c48-30fc-11eb-8b39-614106969e8d; Fri, 27 Nov 2020 22:05:03 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 0ARM5225081065 for ; Fri, 27 Nov 2020 15:05:02 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: Ian Lepore To: freebsd-arm@freebsd.org Date: Fri, 27 Nov 2020 15:05:02 -0700 In-Reply-To: <1e6993d43d22d6ce1aa2860a61745356688d1e53.camel@freebsd.org> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <8d806302-479c-ca34-3fdb-96d27f40e212@viruzzz.org> <8655AF30-273B-48E7-98CD-007AA1D265F5@obsigna.com> <54ffe2d2-01a2-8b43-94fa-aee4a3f89861@viruzzz.org> <08649892ca2ab434c261d36e0e13ba051086de6f.camel@freebsd.org> <1e6993d43d22d6ce1aa2860a61745356688d1e53.camel@freebsd.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CjTFg3Nhpz4Wky X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:44.224.0.0/11, country:US] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 22:05:12 -0000 On Fri, 2020-11-27 at 11:04 -0700, Ian Lepore wrote: > > I think we need a way for the app to choose whether it wants simple > > reporting of pin number (like the original code) perhaps along with > > a count, versus requesting detailed per-event data. I'm going to > > propose something more detailed about this as soon as I get my > > thoughts all organized. Okay, here's my current thinking on this (with tabs compressed down to just a couple spaces to prevent line-wrap in email). This is a snippet from gpio.h... /* * Reporting gpio pin-change per-event details to userland. * * When configured for detail reporting, each call to read(2) will * return one or more of these structures (or will return * EWOULDBLOCK in non-blocking IO mode when there are no new events * to report). */ struct gpio_event_detail { struct timespec gp_time; /* Time of event */ uint16_t gp_pin; /* Pin number */ bool gp_pinstate; /* Pin state at time of event */ }; /* * Reporting gpio pin-change summary data to userland. * * When configured for summary reporting (the default), each call to * read(2) will return one or more of these structures (or will * return EWOULDBLOCK in non-blocking IO mode when there are no new * events to report). */ struct gpio_event_summary { struct timespec gp_first_time; /* Time of first event */ struct timespec gp_last_time; /* Time of last event */ uint16_t gp_pin; /* Pin number */ uint16_t gp_count; /* Event count */ bool gp_first_state; /* Pin state at first event */ bool gp_last_state; /* Pin state at last event */ }; /* * Configuring event reporting to userland. * * The default is to deliver gpio_event_summary reporting. To * change it, you must use the GPIOCONFIGEVENTS ioctl to set the * event fifo size before using GPIOSETCONFIG to configure reporting * interrupt events on any pins. This config is tracked on a * per-open-descriptor basis. Once it has been set, it cannot be * changed without closing and re-opening the file descriptor. */ struct gpio_event_config { uint32_t gp_fifo_size; /* Zero for summary reporting. */ }; #define GPIOCONFIGEVENTS _IOW('G', 9, struct gpio_event_config) I haven't written the implementation of all this yet, but I have a pretty good idea of how to do so. -- Ian From owner-freebsd-arm@freebsd.org Fri Nov 27 22:45:41 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 C42E346AE36 for ; Fri, 27 Nov 2020 22:45:41 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.23]) (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.rzone.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CjV8N4j35z4YPs; Fri, 27 Nov 2020 22:45:40 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606517137; s=strato-dkim-0002; d=obsigna.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=PbIZRaNamje4663f4TRWRATQnpe7kgL2Swf2ehugcl0=; b=QyRW/J1QP24gyY3fb+xUbVqTd2k7EyejxaroHwHYhmLopB2tVjwborvEkJAFVN/vVt S89fGCp5EAAEkMG67X4LeGVVPzM/41AX5OGQ9wgj/2PhyKlFcIY9ZplpfVl9jAgkBSL0 Vzbue495HYjzi5X8A50LDJxPD2CnH3BEicUSOLw+cnYAJEae/6Fzq8PzBPA47ujTs3cd H2PVDt+/MuljuOUCzYolnAKd3t0P84PbNhA2Kw9J5Pmx/EnfR8pLJyj7PvW8kzt6dSP8 wxjgPdvOMU9fFebBBH3trIbxOHNRkfwLX9rVgpIidSkyjdQggPgoTiQSNIcD3GLo59kK eE0g== X-RZG-AUTH: ":O2kGeEG7b/pS1F2rRHW2isrKl4DV03XBEi+I6ZuztdvN9wS3wFGySS4Lw+ldTBio0dVbInGjc9RnD7rYRqs=" X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com by smtp.strato.de (RZmta 47.3.3 DYNA|AUTH) with ESMTPSA id U0af7bwARMjbReR (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 27 Nov 2020 23:45:37 +0100 (CET) Received: from [192.168.222.9] (unknown [192.168.222.9]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 447D11350F91D; Fri, 27 Nov 2020 19:45:33 -0300 (-03) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: "Dr. Rolf Jansen" In-Reply-To: <1e6993d43d22d6ce1aa2860a61745356688d1e53.camel@freebsd.org> Date: Fri, 27 Nov 2020 19:45:32 -0300 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <8d806302-479c-ca34-3fdb-96d27f40e212@viruzzz.org> <8655AF30-273B-48E7-98CD-007AA1D265F5@obsigna.com> <54ffe2d2-01a2-8b43-94fa-aee4a3f89861@viruzzz.org> <08649892ca2ab434c261d36e0e13ba051086de6f.camel@freebsd.org> <1e6993d43d22d6ce1aa2860a61745356688d1e53.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) X-Rspamd-Queue-Id: 4CjV8N4j35z4YPs X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=obsigna.com header.s=strato-dkim-0002 header.b=QyRW/J1Q; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-rj@obsigna.com designates 85.215.255.23 as permitted sender) smtp.mailfrom=freebsd-rj@obsigna.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:85.215.255.0/24]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[obsigna.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[85.215.255.23:from]; ASN(0.00)[asn:6724, ipnet:85.215.255.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[obsigna.com:s=strato-dkim-0002]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[obsigna.com]; SPAMHAUS_ZRD(0.00)[85.215.255.23:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[85.215.255.23:from]; FROM_NAME_HAS_TITLE(1.00)[dr]; RWL_MAILSPIKE_POSSIBLE(0.00)[85.215.255.23:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 22:45:41 -0000 Am 27.11.2020 um 15:04 schrieb Ian Lepore : > On Fri, 2020-11-27 at 10:16 -0700, Ian Lepore wrote: >> On Fri, 2020-11-27 at 14:28 +0300, Vladimir Goncharov wrote: >>> Here it is. >>> There is struct gpioc_event with pin number and bintime which is = send >>> to userspace. >>>=20 >>> Also I'm thinking about to implementation notofication without extra >>> reading from socket via struct kevent's extra fields = (fflags/ext[4]), >>> looks like it is possible. >>>=20 >>=20 >> Please don't top-post on freebsd mailing lists. >>=20 >> I think we need a way for the app to choose whether it wants simple >> reporting of pin number (like the original code) perhaps along with a >> count, versus requesting detailed per-event data. I'm going to = propose >> something more detailed about this as soon as I get my thoughts all >> organized. I also want to get the original code and the locking = fixes >> I've done to it into a phab review for people to start looking at >> before starting to do new major changes to it. >>=20 >> Allocating memory in the interrupt handler isn't a good idea, it will >> just increase latency on processing other pin interrupts and lead to >> inaccurate timestamps. IMO, it would be better to allocate a fixed >> array of events; when the app requests detailed event reporting it = can >> request the number of stored events it wants handled and we could >> allocate all at once based on that. >>=20 >=20 > The gsoc2018 code, with locking and style(9) fixes, is now at: >=20 > https://reviews.freebsd.org/D27398 I got it working, and as expected, by your comments the level interrupt = mode has been disabled. I am OK with this. Later, I will add more = comments on this in my response to you other e-mail. Best regards Rolf= From owner-freebsd-arm@freebsd.org Sat Nov 28 00:30: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 DE77B46D975 for ; Sat, 28 Nov 2020 00:30:33 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.24]) (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.rzone.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CjXTN4ByMz4f3c; Sat, 28 Nov 2020 00:30:32 +0000 (UTC) (envelope-from freebsd-rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606523430; s=strato-dkim-0002; d=obsigna.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=M/5Z+wmndfTWy1FutvoXqI1JZCJtiKqPK3AXo9sXgzY=; b=D49r47w2rOZiHOgadMchEJWs+IegbkNeAT4Hr006YQ4l3OMzAlhYMPi+W9h70T2FTz o7r/tyGc3CyqFkbpNyZqv5znm1ob6OAMizMQHIcpZ6DCtFL856h/kZ5ZyYRe+uwBxT9H kT+MdokolOs+97dAjMx5SgZ6GYmBwJKRGzE4ohxEn5+ya1LPaJBfGXGs61iYFWt6YO/o AluKmE1mN+fKzkEmqT3qbsFE/HmRzmgUF6CFg0V6/YVxV0qIidQf66WtP5toZ29qGqxI 9TRfwRMdgO3Kb5Ugmx04hk34QTbzMZ4jYEaFZvwTlnG3xC9wXdIVWEtelnU5M0hreZI7 C91Q== X-RZG-AUTH: ":O2kGeEG7b/pS1F2rRHW2isrKl4DV03XBEi+I6ZuztdvN9wS3wFGySS4Lw+ldTBio0dVbInGjc9RnD7rYRqs=" X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com by smtp.strato.de (RZmta 47.3.3 DYNA|AUTH) with ESMTPSA id U0af7bwAS0UTRl5 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sat, 28 Nov 2020 01:30:29 +0100 (CET) Received: from [192.168.222.9] (unknown [192.168.222.9]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id EB2531350F91D; Fri, 27 Nov 2020 21:30:25 -0300 (-03) Content-Type: text/plain; charset=iso-2022-jp Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: "Dr. Rolf Jansen" In-Reply-To: Date: Fri, 27 Nov 2020 21:30:24 -0300 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <3F7009F8-549C-4580-B4D2-9C8471890CE6@obsigna.com> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) X-Rspamd-Queue-Id: 4CjXTN4ByMz4f3c X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=obsigna.com header.s=strato-dkim-0002 header.b=D49r47w2; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-rj@obsigna.com designates 85.215.255.24 as permitted sender) smtp.mailfrom=freebsd-rj@obsigna.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:85.215.255.0/24]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[obsigna.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-0.999]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[85.215.255.24:from]; ASN(0.00)[asn:6724, ipnet:85.215.255.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[obsigna.com:s=strato-dkim-0002]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[obsigna.com]; SPAMHAUS_ZRD(0.00)[85.215.255.24:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[85.215.255.24:from]; FROM_NAME_HAS_TITLE(1.00)[dr]; RWL_MAILSPIKE_POSSIBLE(0.00)[85.215.255.24:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2020 00:30:33 -0000 Am 27.11.2020 um 14:32 schrieb Ian Lepore : > On Thu, 2020-11-26 at 22:18 -0300, Dr. Rolf Jansen wrote: >>> Am 26.11.2020 um 16:56 schrieb Ian Lepore : >>>=20 >>> On Tue, 2020-11-24 at 17:14 -0300, Dr. Rolf Jansen wrote: >>>> Hello >>>>=20 >>>> Has anything of the GSoC-2018 efforts made it into the current >>>> code >>>> base? >>>>=20 >>>>=20 >>>=20 >>>=20 > = https://wiki.freebsd.org/SummerOfCode2018Projects/UserSpaceGPIOinterrupts >>>>=20 >>>> I installed the recent 13.0-CURRENT snapshot (2020-11-19) on a >>>> BeagleBone Black which was one of the implementation targets of >>>> said >>>> project, but when running the test tools, I either see cannot >>>> read/kevent/poll/aio_read - Operation not supported by device or >>>> Inappropriate ioctl for device. >>>>=20 >>>> Perhaps I need to pull the project=1B$B!-=1B(Bs changes into the = kernel by >>>> myself. However, before this I would like to ask whether it is >>>> worth >>>> the effort. >>>>=20 >>>> Please, can anyone shed some light on this. >>>>=20 >>>> Best regards >>>>=20 >>>> Rolf >>>>=20 >>>=20 >>> I made some time this morning to review the gsoc2018 code. It >>> turns >>> out this code is very high quality, nearly ready to commit as- >>> is. The >>> main thing it needs is some style cleanup in its comment blocks, >>> and >>> documentation. I'd be inclined to commit the code first and write >>> the >>> documentation over the next little while and commit it separately. >>>=20 >>> If you'd like to give it a try, here's a diff that should apply and >>> build cleanly on freebsd 12 or 13: >>>=20 >>> https://people.freebsd.org/~ian/gpio_gsoc2018.diff >>>=20 >>> While there isn't any documentation yet, there is a test program (I >>> haven't run it yet) that demonstrates all the features: >>>=20 >>>=20 > = https://github.com/ckraemer/gsoc2018-utils/blob/master/src/gpioc_intr_test= .c >>>=20 >>> Right now the code will let you block waiting for a pin-change >>> event >>> using select(), poll() or kevents, or to be notified via SIGIO, but >>> after being notified that something happened, you still have to >>> call >>> read() to see which pin changed. I think if the pin changes state >>> multiple times between calls to read(), you'll lose track of some >>> changes (I'm not positive of that, I don't understand the kevent >>> stuff >>> well). >>>=20 >>> I'd like to add some features so that you can configure it to track >>> pin >>> changes in counting-mode and timestamping-mode. In counting mode, >>> when >>> you do a read() you would get back a pair of values, the pin number >>> and >>> how many times its interrupt fired since the last read. In >>> timestamping mode, every read would return a pin number and an >>> associated timespec giving the exact time the interrupt happened >>> (there >>> would need to be a way to configure how many events it could >>> buffer, >>> but I think even allowing a thousand buffered events would only use >>> a >>> few kbytes of memory). >>=20 >> I got it working as well, please see my other post from yesterday. I >> used gpioc_intr_test.c. >>=20 >> I see hundreds of warning messages when I press the test button a few >> times. May these warnings be safely ignored. The kernel module of >> Oskar Holmund works quite nice as well (for what I need), and with >> that one, I don=1B$B!G=1B(Bt see warnings. >>=20 >> The counting- and timestamping-mode for sure would be very useful. >> Perhaps by implementing this, there won=1B$B!G=1B(Bt be no unhandled = interrupts >> anymore, and hence there won=1B$B!G=1B(Bt be any warnings either. >>=20 >> Best regards >>=20 >> Rolf >=20 > I'm sorry, I somehow overlooked your previous message about using > gpioc_intr_test.c. >=20 > Those warning messages are definitely not a good thing, in some = changes > I've made to the original patches they are changed to debugging-only > output that won't normally show up. Printing messages from within an > interrupt handler is pretty much always a bad idea. :) >=20 > I was thinking about the various interrupt options and realized we > cannot support level-triggered interrupts in this code without a ton = of > work. It's just a recipe for an interrupt storm (which will happen at > the rate of tens of thousands of interrupts per second once the = printfs > aren't there to slow things down to console IO speed). To use level- > triggered interrupts from userland, the gpioc would have to mask the > interrupt from within the interrupt handler (we don't have an internal > API for doing that with gpio interrupts right now), and provide some > sort of EOI (end-of-interrupt) acknowledgement interface to userland = to > unmask them once it had done something to make the interrupt stop > asserting. Basically this would extend the way device drivers handle > level-triggered interrupts into userland, and I just don't see much > value in all the work that would be involved to make that happen. >=20 > I think instead we should just run in counting-mode by default, and = add > new code similar to what Vladimir Goncharov has proposed to handle > detailed reporting of each event if the app requests it. >=20 > I can't make up my mind on the issue of debouncing. My gut tells me > that building in some kind of debounce logic as a per-pin configurable > option would be nice, but it might also get really complicated. An = app > could handle debouncing for itself if it requested detailed event > reporting, because the timestamps on the events could help it decide > what to do. After working a bit with the various "User Space GPIO Interrupt" = incarnations in the last few days, I found that I don't need level = interrupts. The hardware colleague of our present project told me that I = do not need to bother with button debouncing in software either. There = are IC's which manage this, for example: MAX6818 - = https://datasheets.maximintegrated.com/en/ds/1896.pdf. So, the GPIO = would see only perfect square wave signals when a button has been = pressed. I still think that counting-mode and timestamp-mode could be very = useful. Regarding the memory allocation, I am with you that it should be done = once and not for any interrupt trail. As a matter of fact I did kind of = this already for a kernel module for FreeBSD-x86-64 targets which I = wrote for National Instruments M- and X-Series PCI and PCIe DAQ boards. = Here I allocate huge blocks of DMA memory (256 MB for the AI channels = and 48 MB for the AO channels) in the course of xxx_attach() and this = can be mapped into user space by mmap(). I added sysctls which allow to = resize said memory blocks, and ioctls for clearing and synching the = buffers. I do all the math on the measurement data in user space by = directly accessing the DMA blocks in the course of the measurements. Thinking about it, wouldn't it be nice to mmap() the = interrupt/counter/timestamp table into user space? Programs could read = the data in the table directly. It could be a round robin table, perhaps = of 100 kB to 1 MB. Perhaps my code in my kernel module for DMA buffer = management, which could be easily switched to any-kind-of-memory = management, does not exactly meet the high quality and style of FreeBSD = code, and I am even hesitant to offer it. However, if you are curious, = please send me a note. Best regards Rolf=