Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp436958rwe; Wed, 19 Apr 2023 00:42:50 -0700 (PDT) X-Google-Smtp-Source: AKy350YSddVlgqLBxSYkGuHBhECufYzSn3NcI4w6MYohnKtTEtIacFMeBIu/Hec2bwJeGeVPluIe X-Received: by 2002:a05:6a21:999c:b0:f0:6102:4ce3 with SMTP id ve28-20020a056a21999c00b000f061024ce3mr1844098pzb.24.1681890170332; Wed, 19 Apr 2023 00:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681890170; cv=none; d=google.com; s=arc-20160816; b=uh4xB0iT1cvzSHdKsTFM1RFzwN/a4w415x/zaZDC7IJBXFb74edHuSO7JDJmD2DmqX /5dEPIwRsbycFzr04mkyjRBRAz4VCGiDDIBvTp5vMrAlO7lh4TT2C4J6UzzDFFRlBUHB KteTbU3vW8BiX+grq2qpR3Mscoh+nKlMgpYEyk96Irez8gxKBEC3nVJN/Txs1HIQi/LU iQTgD4FiafOJIBEoXIjV72IFJF+1qIvKsp/On2DdwmV2OwIvRM9MiOwZWB+DKN8stL2z chao57Y4QD/0RGxStvx2vKceSt4+aixX6ECisPOnNPDUN576wX2fDCzqvrJRM+Vsw/TU dBiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=Ec4Ecq7H4INlX/3HvS/3quM8Fg2PkdC80uzcjyfYOJI=; b=y/5Z4YaeGGxN67X2Th7/VfJ/hl4Wl0831gl5kgYnuaAilo2SsNvT2uS65kx6HEEkHz IjBGnXff9qzDMDhtCSFAl4h8In5dusZnSKbgYYSBHseSMbDZdko4F6GoApis73iMeY2c VdAOYlSoVYGZnbfKArRNy6+9NqisfdIt6tDGNzpz6a3gGUEo0UeMOc57AoWwdtysOkDq pX1W3f67BXuzZi/Dxf6UAEn+nzsfTOpgEj0edScvtEzWSQ5j1W2pqQj6EN6Xhc+V5SvS 59yxEnKX80Jo+LN9uwXP5WpnWbIGJKbjMGT6zCwF9k941ZFWz9HtdrrQoGuZHUFdYA84 4X4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=VCrvrExR; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=eDxpRvKP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a19-20020aa79713000000b0063b89234a5asi8532117pfg.371.2023.04.19.00.42.39; Wed, 19 Apr 2023 00:42:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=VCrvrExR; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=eDxpRvKP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232210AbjDSHbY (ORCPT + 99 others); Wed, 19 Apr 2023 03:31:24 -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 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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