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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5D46C388F2 for ; Fri, 6 Nov 2020 06:49:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 57EB8208C3 for ; Fri, 6 Nov 2020 06:49:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604645376; bh=AsfhP1wqbywLFtoKXHYhKEJsKLATCe3IIPSMytcVEZQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=gI5yLx6pwpmOOlkY1d/oPvlc3h9rVTgSkevt3kMoq1jH32Voo/Wh8P4fQESDGhiOs Nq/Hyk1kwOOhd19Rk0g1C2jf5TF1rVPPeBoJQWCVOH9cH+5Mh2O942ZJ4razLT0Neq WFyAH08trUaQImku0AxfPF6H2+etnU1/sNx5QDZ8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726227AbgKFGtd (ORCPT ); Fri, 6 Nov 2020 01:49:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:39364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726226AbgKFGtd (ORCPT ); Fri, 6 Nov 2020 01:49:33 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE0A720825; Fri, 6 Nov 2020 06:49:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604645372; bh=AsfhP1wqbywLFtoKXHYhKEJsKLATCe3IIPSMytcVEZQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jIwjpKJO/e61STmYXG3CRf2xvsYa6uG8rbpadudCSw2M9OlXvUeFxkLlwBT1C/OBP hWc+mQsM/K9DlMaBzVKC9L2K4WbqqW449SUrz1fyjLwyhmuAsLKyimLktDfbcjwPPp 5f1de08YM+mCpH2SEj/b5CzupK7RMMpLNhqSfinE= Date: Fri, 6 Nov 2020 07:49:29 +0100 From: Greg KH To: Prasad Sodagudi Cc: rostedt@goodmis.org, mingo@redhat.com, keescook@chromium.org, catalin.marinas@arm.com, saiprakash.ranjan@codeaurora.org, will@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, anton@enomsg.org, arnd@arndb.de, ccross@android.com, jbaron@akamai.com, jim.cromie@gmail.com, joe@perches.com, joel@joelfernandes.org Subject: Re: [PATCH v2] tracing: Add register read and write tracing support Message-ID: <20201106064929.GC697514@kroah.com> References: <1604631386-178312-1-git-send-email-psodagud@codeaurora.org> <1604631386-178312-2-git-send-email-psodagud@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1604631386-178312-2-git-send-email-psodagud@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Thu, Nov 05, 2020 at 06:56:26PM -0800, Prasad Sodagudi wrote: > Add register read/write operations tracing support. > ftrace events helps to trace register read and write > location details of memory mapped IO registers. This sentance does not parse for me, can you please rework it? > These trace logs helps to debug un clocked access > of peripherals. "un clocked"? What does that mean? And you do have 72 columns to fill, please use it :) > > Signed-off-by: Prasad Sodagudi > --- > arch/arm64/include/asm/io.h | 9 ++++++++ > arch/arm64/kernel/image-vars.h | 8 +++++++ You are only adding it for arm64, why not add the generic support first, and then add it for all "major" arches afterwards? > include/linux/iorw.h | 38 +++++++++++++++++++++++++++++++ > include/trace/events/rwio.h | 51 ++++++++++++++++++++++++++++++++++++++++++ > kernel/trace/Kconfig | 11 +++++++++ > kernel/trace/Makefile | 1 + > kernel/trace/trace_readwrite.c | 31 +++++++++++++++++++++++++ > 7 files changed, 149 insertions(+) > create mode 100644 include/linux/iorw.h > create mode 100644 include/trace/events/rwio.h > create mode 100644 kernel/trace/trace_readwrite.c > > diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h > index fd172c4..bcfc65c 100644 > --- a/arch/arm64/include/asm/io.h > +++ b/arch/arm64/include/asm/io.h > @@ -9,6 +9,7 @@ > #define __ASM_IO_H > > #include > +#include > #include > > #include > @@ -24,24 +25,28 @@ > #define __raw_writeb __raw_writeb > static inline void __raw_writeb(u8 val, volatile void __iomem *addr) > { > + log_write_io(addr); > asm volatile("strb %w0, [%1]" : : "rZ" (val), "r" (addr)); Why are you not logging the value here, and everywhere else? You need to document why that is somewhere, as it's the most obvious question you will get. thanks, greg k-h 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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07F58C2D0A3 for ; Fri, 6 Nov 2020 06:50:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D35D20825 for ; Fri, 6 Nov 2020 06:50:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hxz0wSgG"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="jIwjpKJO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D35D20825 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=4Nh2d0QfVwpccTVb4fk3WL5mAooxudFvrjTLBBXS1N8=; b=hxz0wSgGI6QOo+Ar8svnTI7yP m24fRv1odkMaPelprjXr7e9EkTaqmt+ZaJjaKxz07Bzq2hRvYr0Xyik8eqibFRs3/sBEI2QgIB48G 0ULBydSReZOL6Rl7+sEdig3X+ChRhm4hooymTVoZ9B5qUbpXYNlIJy52UogKL+Gc/ec94ZKwJwOaW go8UpsIxs2xLh8VNZHTNxxogsH6k8bBdeOJAWjeBGme6kTsYR658yLYbsDvz7NwpYZOLCh1zwr+qY 6xv/feZlVpyQaAGktOv5378kkpOip9zses2//SZhvtUQ42IpFdDBLsugHk7vtP4KVDWxptR0frFKx 8Irlq44oQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kavZ2-0008Ki-LR; Fri, 06 Nov 2020 06:49:36 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kavZ0-0008K9-1E for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 06:49:34 +0000 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE0A720825; Fri, 6 Nov 2020 06:49:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604645372; bh=AsfhP1wqbywLFtoKXHYhKEJsKLATCe3IIPSMytcVEZQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jIwjpKJO/e61STmYXG3CRf2xvsYa6uG8rbpadudCSw2M9OlXvUeFxkLlwBT1C/OBP hWc+mQsM/K9DlMaBzVKC9L2K4WbqqW449SUrz1fyjLwyhmuAsLKyimLktDfbcjwPPp 5f1de08YM+mCpH2SEj/b5CzupK7RMMpLNhqSfinE= Date: Fri, 6 Nov 2020 07:49:29 +0100 From: Greg KH To: Prasad Sodagudi Subject: Re: [PATCH v2] tracing: Add register read and write tracing support Message-ID: <20201106064929.GC697514@kroah.com> References: <1604631386-178312-1-git-send-email-psodagud@codeaurora.org> <1604631386-178312-2-git-send-email-psodagud@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1604631386-178312-2-git-send-email-psodagud@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201106_014934_175285_B5044D32 X-CRM114-Status: GOOD ( 19.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: saiprakash.ranjan@codeaurora.org, keescook@chromium.org, arnd@arndb.de, jim.cromie@gmail.com, catalin.marinas@arm.com, anton@enomsg.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org, ccross@android.com, joel@joelfernandes.org, jbaron@akamai.com, mingo@redhat.com, linux-arm-msm@vger.kernel.org, joe@perches.com, will@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 05, 2020 at 06:56:26PM -0800, Prasad Sodagudi wrote: > Add register read/write operations tracing support. > ftrace events helps to trace register read and write > location details of memory mapped IO registers. This sentance does not parse for me, can you please rework it? > These trace logs helps to debug un clocked access > of peripherals. "un clocked"? What does that mean? And you do have 72 columns to fill, please use it :) > > Signed-off-by: Prasad Sodagudi > --- > arch/arm64/include/asm/io.h | 9 ++++++++ > arch/arm64/kernel/image-vars.h | 8 +++++++ You are only adding it for arm64, why not add the generic support first, and then add it for all "major" arches afterwards? > include/linux/iorw.h | 38 +++++++++++++++++++++++++++++++ > include/trace/events/rwio.h | 51 ++++++++++++++++++++++++++++++++++++++++++ > kernel/trace/Kconfig | 11 +++++++++ > kernel/trace/Makefile | 1 + > kernel/trace/trace_readwrite.c | 31 +++++++++++++++++++++++++ > 7 files changed, 149 insertions(+) > create mode 100644 include/linux/iorw.h > create mode 100644 include/trace/events/rwio.h > create mode 100644 kernel/trace/trace_readwrite.c > > diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h > index fd172c4..bcfc65c 100644 > --- a/arch/arm64/include/asm/io.h > +++ b/arch/arm64/include/asm/io.h > @@ -9,6 +9,7 @@ > #define __ASM_IO_H > > #include > +#include > #include > > #include > @@ -24,24 +25,28 @@ > #define __raw_writeb __raw_writeb > static inline void __raw_writeb(u8 val, volatile void __iomem *addr) > { > + log_write_io(addr); > asm volatile("strb %w0, [%1]" : : "rZ" (val), "r" (addr)); Why are you not logging the value here, and everywhere else? You need to document why that is somewhere, as it's the most obvious question you will get. thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel