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=