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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69C21C77B73 for ; Thu, 20 Apr 2023 06:59:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V2LW4IclQ0Jk2RIIsAixrXdtpBH2UDwj0PEgaUmycN4=; b=kEUEhq0tP2fh17 cTGnNR7nQ6O6f+bmfT2VT4KjjMerUG3dg7JwHs9AJHZ2GKoUuGJxq+8Xt2eRZnSVXKmwNF68J8gB5 K62x0kXHG2AmA6VW1ovpMald8KBoSfSLRDdNh8DhM5MdQvUvNtdy5SdHYH0M/JgX5WjeZP3mZ86+M xPR/28vunU8/ZpdDAQz0GGv27p+9IRpbUeyjstORSuluNru/Y2jehY4SGZksVaKnqzEB9H1GTclYO Vreom9J9oAjkI5WpQQuwY/oYMaPYhqmGhy7PkhGL4mGt/V/lr2jV7S+25bKUhdRfbsdEJYHPkbkh5 IouM5vnPefT0HKU9XHOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppOF6-007EQo-0m; Thu, 20 Apr 2023 06:58:08 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppOF3-007EPa-2B for linux-arm-kernel@lists.infradead.org; Thu, 20 Apr 2023 06:58:07 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3F74C641D2; Thu, 20 Apr 2023 06:58:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CB7CC433D2; Thu, 20 Apr 2023 06:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1681973884; bh=A+bLNsF6LzOed0PVhdtMwFsw4F1i3Dt8U4VT0TXawxU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ehlXKtdn2Z4AN0E9m9LxE/lKyDT2WCXAwbTAmg1gpXjbC6EFgpXTk5ydvz5mhxvor CERF7hAHIR0TdRq8gbrT9D8rZaAdzxmkrItm4DUlkRi5hiLzQxC0L7DqyJnqVHqO69 GIurBMOjzCMO35RSw3wad7GV9FMgl1ZjMarAqriE= Date: Thu, 20 Apr 2023 08:58:01 +0200 From: Greg Kroah-Hartman To: Trilok Soni Cc: Souradeep Chowdhury , Arnd Bergmann , 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) Message-ID: References: <2023041833-alienate-trash-f4da@gregkh> <50844899-b047-42fd-807a-db7136e5e590@app.fastmail.com> <44834c75-4db7-ec8a-9367-c6b83fa96b22@quicinc.com> <9808142e-d6e6-71bc-f362-09b878cb3b87@quicinc.com> <2024b144-42cf-1044-258c-2dc6c6af0d88@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2024b144-42cf-1044-258c-2dc6c6af0d88@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230419_235806_086384_BD560FC6 X-CRM114-Status: GOOD ( 37.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Apr 19, 2023 at 09:10:14AM -0700, Trilok Soni wrote: > On 4/19/2023 9:08 AM, Trilok Soni wrote: > > On 4/19/2023 3:20 AM, Souradeep Chowdhury wrote: > > > = > > > = > > > On 4/19/2023 1:00 PM, Arnd Bergmann wrote: > > > > 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?=A0 How are they= related? > > > > > > Why both?=A0 Why not just one?=A0 What userspace tools are goin= g 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 don= e 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. > > > = > > > Register addresses are made runtime configurable to give the user the > > > option of going for a software trigger. So the user can debug issues > > > during run-time as well. These register locations are arbitrary > > > and is configured by the user for debugging purposes and is not > > > related to the DCC hardware itself. > > = > > Please note that we don't want to recompile the devicetree for new > > settings since these registers can be set by team of engineers who are > > debugging system level issues with various IPs across the SOCs. You > > don't want to recompile the images while reproducing the system hangs/IP > > watchdogs etc; > = > ...and also these registers list is not fixed, it will vary based on the > problem you are seeing and debugging on the SOC across the IPs. Then all of this should be documented in the driver, and in the changelog please. thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel