Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1249047rwb; Sun, 18 Sep 2022 03:56:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5YZ28aGoOTuN41p97LraSxta51e0SHkokL75fx/lRlZg9Kr7McBLNAjyFINcSbumatQisy X-Received: by 2002:a05:6a00:1688:b0:53b:4239:7c5c with SMTP id k8-20020a056a00168800b0053b42397c5cmr13391423pfc.81.1663498610410; Sun, 18 Sep 2022 03:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663498610; cv=none; d=google.com; s=arc-20160816; b=q+iqgopK6qe6w/Gk39+6oknYe67OGgLgYL6krf/3QXsmrgdHAIWoBvCOPT9WDjdUiY Py20wYac5YFLzYnHbi4/mx50YA9iydiP1OqomR3C9YqhN5tYyp3q01PewXHdh5bRGwmU CWQJu1l0yFdM6Pe8pFIsJ9Bf/vMHkcLKNWViu4wvBKTuv9HFMOqHFv6/hq9VX2ew2At2 N6z8pS2aBUkjKbKZWdr9aWFQPdu8GR8xO+1K/s86bBa+2jIyet1WmmtFIu2HuICTcMaL xB6sM1qfiwGSSC/YW6dmeMTn4PyYeLQkJl7okiyct3nm+NcO7PGRBDJGuQaqTvJJRb64 h7RQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BbUswvTsDom2LCnQAh3d3qKgpzcaFS7wrzea9C90Pbg=; b=Z1UY4Kdew/z5PTWuqRW6iA7rED9SlX5o5JE5tGGnmt7VdeAa4KrPn5hulZUYSQRUr1 i7oFMIuSNQJ29H3Sv/ZUu9hCLvUlFN+o0812GMC73QmrGO5fai426z3n3lhse/8cHK2L cmiRTOE8lAFiu5WRilXSTr4uTKjpzuPP/OKFy0adw8XQnMLa/YEcMMS1aolF3Yu+Ailr qPJxA7lI3WixQiGfNIgZ/JfVTCART4FwN1eIGlAYc1WVlbpdhiALSZBoJeHwa3auJN2E 0MIjhI41cqVff2hwqD9uWtj5CZeQWHXPAePYR/G4OQQiF/xq5zMmHrdYP9H61kWjhFqb lgpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=v8ZlC0pP; 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 q20-20020a170902edd400b001787e843b71si7776160plk.122.2022.09.18.03.56.38; Sun, 18 Sep 2022 03:56: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=@linuxfoundation.org header.s=korg header.b=v8ZlC0pP; 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 S229507AbiIRKcn (ORCPT + 99 others); Sun, 18 Sep 2022 06:32:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbiIRKcl (ORCPT ); Sun, 18 Sep 2022 06:32:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0BCF1C916 for ; Sun, 18 Sep 2022 03:32:40 -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 ams.source.kernel.org (Postfix) with ESMTPS id 85833B80E4C for ; Sun, 18 Sep 2022 10:32:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1EAEC433D6; Sun, 18 Sep 2022 10:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663497158; bh=I/231C3xrrcoDPvXTfR4QzqxGeYUu8BpzYz0w9jb7YE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=v8ZlC0pPtIIuhPG7vgs+5ZAm//zBSWqtfUBHqiLsnInfHLC/c3i1uOMBcMUdfAETl 7pmkeGLLpWfXEv13Vs6VnybiwCbfIf9aXdlZONNP/ZagT7SwBS0j9TCHzRUxDaTltV sMtDkyZk0fDOzPSPtnewIXQIhT/kPcb1xOtp6Wd8= Date: Sun, 18 Sep 2022 12:33:06 +0200 From: Greg KH To: Jiho Chu Cc: arnd@arndb.de, ogabbay@kernel.org, krzysztof.kozlowski@linaro.org, broonie@kernel.org, linux-kernel@vger.kernel.org, yelini.jeong@samsung.com, myungjoo.ham@samsung.com Subject: Re: [PATCH v2 07/13] trinity: Add sysfs module Message-ID: References: <20220917072356.2255620-1-jiho.chu@samsung.com> <20220917072356.2255620-8-jiho.chu@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220917072356.2255620-8-jiho.chu@samsung.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Sat, Sep 17, 2022 at 04:23:50PM +0900, Jiho Chu wrote: > This patch includes sysfs interfaces. > > sysfs interface provides NPU's internal statistics, status and control > attribes. > > The sysfs information provided by the Trinity are: > - IDU version > - profiling result > - allocated debugfs buffer > > The control attributes are including: > - initialize profile operation > - NPU control (suspend/resume/stop) > > Signed-off-by: Jiho Chu > Signed-off-by: Yelin Jeong > Signed-off-by: Dongju Chae > Signed-off-by: MyungJoo Ham > --- > .../ABI/testing/sysfs-driver-trinity | 55 ++ > drivers/misc/trinity/Makefile | 1 + > drivers/misc/trinity/trinity_sysfs.c | 667 ++++++++++++++++++ > 3 files changed, 723 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-driver-trinity > create mode 100644 drivers/misc/trinity/trinity_sysfs.c > > diff --git a/Documentation/ABI/testing/sysfs-driver-trinity b/Documentation/ABI/testing/sysfs-driver-trinity > new file mode 100644 > index 000000000000..754e6f36a1dc > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-driver-trinity > @@ -0,0 +1,55 @@ > +What: /sys/devices/platform/trinity/*.triv2/debug/debugfs_max > +Date: July 2022 > +KernelVersion: 5.19-rc8 > +Contact: Jiho Chu > +Description: Shows current allocated debugfs entry size. > + Note that, Writing max entry size allocates NPU's hardware > + memory for debugfs entries. Why are debugfs things being mentioned in sysfs entries? That's not needed, nor is it allowed, sorry. Please put all debugfs stuff in debugfs. Also, sysfs is "one value per file", you violate that in lots of ways with this patch. Please fix all of that, and use the sysfs_emit() calls instead of snprintf() for your sysfs show calls. thanks, greg k-h