From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 852F7C77B73 for ; Wed, 19 Apr 2023 07:31:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232035AbjDSHbX (ORCPT ); Wed, 19 Apr 2023 03:31:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231593AbjDSHbR (ORCPT ); Wed, 19 Apr 2023 03:31:17 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53CB046B4; Wed, 19 Apr 2023 00:31:16 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id D22A65C00E9; Wed, 19 Apr 2023 03:31:13 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 19 Apr 2023 03:31:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1681889473; x=1681975873; bh=Ec 4Ecq7H4INlX/3HvS/3quM8Fg2PkdC80uzcjyfYOJI=; b=VCrvrExRrgs5WTxoZZ b6o/Wn2xY9uJ3qgnfSXPHzVACCJFSvPUT43RJKboctcCzfUNkn7ogvkr3elFgR/M 27VCCKLYRMGJVjesdnqXOwG2mKT832b4mUV5B1yip1QgIGOXbSdVRlXfrVnZccOw fr2r14Q+bm9TIv7qW02iL3XQJ3n3UYsoeIDU8vmboqRUY2lsgR5loRzRYpsePbqd nge+onwZXU23O/r7jHcJLdPA7WLVY44GczoWuEV6ydDj1vYIGLQ37RhJKlR1vgBZ vMJoUaF5k0kQK2fmgPVfy30/qOO4HfoQs/MReHs5M0mSxznrdoHJaHC760rSVOQR QyYA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1681889473; x=1681975873; bh=Ec4Ecq7H4INlX /3HvS/3quM8Fg2PkdC80uzcjyfYOJI=; b=eDxpRvKP0y6qok6rzsgrcxDtk+GQR TeXy/o7hCOxk0uNMbc6fzVQStfx4nLMCkWQ0yg7XRBbSGOhaCDTfkYeHgzfFReRu YPteXgf/lUZQtJp9EZ01EfE4OMbg47vvuxNAYHJIjFxwKMgmanr8WXC2Kbj8qiXz mgK9LOvLf+eiMq/72zW+jwlZ3Ifn70I0+3RwgjHlG8vypIkUHIa8iJZ+2xPSyYO2 cORgp4wXKBmhCWniyA2nbxGa8NE8SnzNvy5Pbqq02Bo6alUiUPpW04wILREz7vke bp2jt+PyCi1Rrf3JyscVvv/Iqwq3TamOEC7wPo/mjsSInowRzLSUmkkYQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdelledguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedt keetffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 698B9B60086; Wed, 19 Apr 2023 03:31:13 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-372-g43825cb665-fm-20230411.003-g43825cb6 Mime-Version: 1.0 Message-Id: <50844899-b047-42fd-807a-db7136e5e590@app.fastmail.com> In-Reply-To: References: <2023041833-alienate-trash-f4da@gregkh> Date: Wed, 19 Apr 2023 09:30:52 +0200 From: "Arnd Bergmann" To: "Souradeep Chowdhury" , "Greg Kroah-Hartman" Cc: "Andy Gross" , "Konrad Dybcio" , "Krzysztof Kozlowski" , "Bjorn Andersson" , "Rob Herring" , "Alex Elder" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, "Sibi Sankar" , "Rajendra Nayak" Subject: Re: [PATCH V22 2/3] misc: dcc: Add driver support for Data Capture and Compare unit(DCC) Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Wed, Apr 19, 2023, at 09:00, Souradeep Chowdhury wrote: > On 4/18/2023 9:15 PM, Greg Kroah-Hartman wrote: >> >>> The following is the justification of using debugfs interface over the >>> other alternatives like sysfs/ioctls >>> >>> i) As can be seen from the debugfs attribute descriptions, some of the >>> debugfs attribute files here contains multiple arguments which needs to >>> be accepted from the user. This goes against the design style of sysfs. >>> >>> ii) The user input patterns have been made simple and convenient in this >>> case with the use of debugfs interface as user doesn't need to shuffle >>> between different files to execute one instruction as was the case on >>> using other alternatives. >> >> Why do you have debugfs and also a misc device? How are they related? >> Why both? Why not just one? What userspace tools are going to use >> either of these interfaces and where are they published to show how this >> all was tested? > > DCC has two fundamental steps of usage:- > > 1.Configuring the register addresses on the dcc_sram which is done by > user through the debugfs interface. For example:- > > echo R 0x10c004 > /sys/kernel/debug/dcc/../3/config > > Here we are configuring the register addresses for list 3, the 'R' > indicates a read operation, so this register value will be read > in case of a software trigger or kernel panic/watchdog bite and > dumped into the dcc_sram. Can you describe why the register location needs to be runtime configurable? I would have expected this type of setting to be part of the devicetree, which already describes other parts that interact with sram devices. How does a user ensure that the address they configure does not overlap with some other use of the sram? Arnd