Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp370333rwr; Thu, 20 Apr 2023 00:05:08 -0700 (PDT) X-Google-Smtp-Source: AKy350b+kZO3b87GzgZPahxL0IwQyr9E9SiwiwaWhFI8Y9/BSn9V1Q1/lhV6BHSmIE7XgJN91j/E X-Received: by 2002:a05:6a00:23d2:b0:62a:c1fa:b253 with SMTP id g18-20020a056a0023d200b0062ac1fab253mr187486pfc.31.1681974307712; Thu, 20 Apr 2023 00:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681974307; cv=none; d=google.com; s=arc-20160816; b=NOWAjmuONkE/6vTQODLkG1IwQAEDv/eHo7q1mbYg4NcT3HoiUSpLW67DNwpQEMasK1 R8B/ep7bwPdOVi/2vUBfkNEnjgV29gbTTvFuWNLPIR8tl3YV1Wxn5X6L5gXkjLtWOPu/ CJTXS2iqMReJ1r40nQU3IxKLUdYM894E1jOYUnuzUh6y8sbKUKmnD7x3MNyja1wirFsL mIyfXa40XeAC18Mj0O7Iy2BmiUBPcZmv2qoAOc4WiqipP1i6qvjzChTOUSPqi98YFbCA o53oPajmSzZ4RlDi/p/AAMh4UhyaD45WrSqzDcCagvBLVG24r+oVi0R/6vfm9YH9NtBq G47g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5ExWc7+8/6v5jhJndxlqIXds5+w+SJPWGw4AgQ9e7gE=; b=mPabbgjzNv1smuM7VT0zvxFGT7bw2TvzY0Ye5VqxevIgz+DX58nGbeA8ky/NqL5jFr MCsSjrLLLVNDhM9DmgNL5nJDHFlA+tKEQotXBkMTQ1m8/QgZIV0Zek8fHWK67TkkVxKM kTkLnvSIo2r7T7vMlZDjytvCrZEJ+w95Lzv1MV0ll8mi3040bxDvt4wvoZASI15aTxAo SiVRHktbqPpf6svywBJPELucvkvDUUHK7f5ZUE5sO8gUwN4l5te5WngzC8ftq7cPX2tU b05zekxFculQhqrjY74PlzSmmvytodhp3GfnCZxc6p4XCdjh2AGXc2SB8SwTiYv8rZfa mUhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ehlXKtdn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y21-20020aa79435000000b0063b680015casi876368pfo.185.2023.04.20.00.04.32; Thu, 20 Apr 2023 00:05:07 -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=@linuxfoundation.org header.s=korg header.b=ehlXKtdn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233880AbjDTG6I (ORCPT + 99 others); Thu, 20 Apr 2023 02:58:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbjDTG6H (ORCPT ); Thu, 20 Apr 2023 02:58:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C49FE2D42; Wed, 19 Apr 2023 23:58:05 -0700 (PDT) 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 4BA4164557; 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-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2024b144-42cf-1044-258c-2dc6c6af0d88@quicinc.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: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?? 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. > > > > > > 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