Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1377208ybg; Tue, 2 Jun 2020 08:22:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYWRIcx5ZDh0zLf9pgQiT+WLaADloU6FjLNBuYCJreUMbUr2Ma569rDRYfj0TBIFT/BB12 X-Received: by 2002:a05:6402:5:: with SMTP id d5mr27586551edu.247.1591111361174; Tue, 02 Jun 2020 08:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591111361; cv=none; d=google.com; s=arc-20160816; b=pEjuQe6PQoih2MHxb7TQgZWeVXb3ghQYj+rXRNb76saN99sSpHLQaOLZRU66jAD+DW 4EJAbEH/EzwEKkUrVUUT3Pv4jp6kwH1yAy1xN+hYoNZA5FzkwgJMm+jaJKasMZ14bMHj SgFDgQTLbinvv/Ude+zpIvfDOBgCkW7l6GAww5sF0MUF899BVwi7QT36uTAGwZ/QtTvl HldukC4a1HJa0WMosP9ZWOniT/hvYFGlErfwzChQt9GZ8fgGrU5WvdVCmh36GW5yjK1E aWx1RQqAg7Uq16dEoVMhhyRXKi9lI6WuoUtJiCJOWiZtBH2N6++lC5YcCwZ+3Wb0CkWo XAjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=fY5IJpcG4taKk/Z1c0/fQ/EvxTolmAQsbeDYBoiR5u0=; b=VoFE8sK0K2cKhJ8colySQHrpkPQrzKc8c/uPqbr7HFuhN2bxV2oRWOi2TyPVX96uIz xvQOk9vFqkFr4/n5K74r14FLCD0hIoK81PsEFAGyABZSW1lAPj410akwHM4BrcxmZcsf niG6hX98+9nsr0isSrxEw+BnAtJEAZ5QmT/NAJ4jufopc7zUkj1BnhciLYcyujgUoVP9 nG1a7/DwUUSeXWQcoslkntNHZ49LLArV1ZOO9ZoNCJL4AxJ+/dmEh7gT6CLMQJkWUxoq 0qNuZAjUCUVKFVW3c7sVjV6pYQpmOtgRiA96phr7mOrU3eLnhzZeuq2q0VJxOemvKADO z63w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=NtLZtOks; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id se4si1676715ejb.636.2020.06.02.08.22.17; Tue, 02 Jun 2020 08:22:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=NtLZtOks; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726162AbgFBPSP (ORCPT + 99 others); Tue, 2 Jun 2020 11:18:15 -0400 Received: from vern.gendns.com ([98.142.107.122]:54424 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgFBPSP (ORCPT ); Tue, 2 Jun 2020 11:18:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To: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=fY5IJpcG4taKk/Z1c0/fQ/EvxTolmAQsbeDYBoiR5u0=; b=NtLZtOksQBZaiN/MHofooBohHZ yLz+q25OmAY1J1RyUf0/feKCObejImLWtjna8ZQ0uxzyiM0BFAN0yDX/su6TOIdUcGIecBhnEROeu rKnMT7PBoOjCgJ5vb0Q1/WYMJJsUi2fad3XkcM2aAX+rmw/oQuHeYgFayIW4DHtjZWCjL0C0JdloA EJmFEPCJYbcI0E3MvqUidpxpBsP5vMLJIC0bAfadEuogsfdlzjtG4dLbE1H49nR1ApyieO4qyGQR9 awbtgQdycWeGLXshgfJT6uoHQIWbLdvRkNat/h/qg5GQs2Rac1w5nmqgjHRft6HUE3aaBO749uASj s3W/P9fQ==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:42134 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1jg8g5-00049A-Lh; Tue, 02 Jun 2020 11:18:09 -0400 Subject: Re: [PATCH v2 0/4] Introduce the Counter character device interface To: William Breathitt Gray , Jonathan Cameron Cc: kamel.bouhara@bootlin.com, gwendal@chromium.org, alexandre.belloni@bootlin.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, syednwaris@gmail.com, patrick.havelange@essensium.com, fabrice.gasnier@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com References: <20200524172542.31ff6ac7@archlinux> <20200524175439.GA14300@shinobu> <20200531161813.658ffdfb@archlinux> <20200531171351.GA10597@shinobu> From: David Lechner Message-ID: Date: Tue, 2 Jun 2020 10:18:07 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200531171351.GA10597@shinobu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/31/20 12:14 PM, William Breathitt Gray wrote: > Yielding the following /dev/counter0 memory layout: > > +------------+-----------------+------------+-------------------+ > | Byte 0 | Byte 1 - Byte 8 | Byte 9 | Byte 10 - Byte 17 | > +------------+-----------------+------------+-------------------+ > | Boundary 0 | Count 0 | Boundary 1 | Count 1 | > +------------+-----------------+------------+-------------------+ A potential pitfall with this sort of packing is that some platforms do not support unaligned access, so data would have to be "unpacked" before it could be used.