Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp243025iob; Mon, 2 May 2022 18:17:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8RO7J1a2gKnth3Q8JA7ztn89Um1ceaMknPc3fjzU8Rm0s51nPhNn3KhFjwmhLW1b/ijre X-Received: by 2002:a17:90b:33c5:b0:1dc:35c:9e2c with SMTP id lk5-20020a17090b33c500b001dc035c9e2cmr2085746pjb.163.1651540659777; Mon, 02 May 2022 18:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651540659; cv=none; d=google.com; s=arc-20160816; b=avMUqR2n42ZFL1GjrKQB1h9mmOrDLUAGM0iw1clCG2iJ9gpzGSeUwwTMW9pw0qRpoY YXP7r2W4HBGoO7lRjhIlBrAftS1QkOhn533lmJsq4Tv0GkwO56/KvdkzsQZJCegt+Roe iFt5F1AXHsDstBZzzMwb/6OwMtH8JA0o3eXyjSFHLemhZxjljLInk2+tNKrga5qWFjwX Zt6VsxMYnPv4sgTTQxq3+9CD1HIkISSRwnJO+M3OVlkEB0v/poOvLv8OvxDzUtpdJ1Oz ZED+fDzfznEh+KNxYdKiu9rCteV5SwJPYwQP7gzgxVXDFe8U5ORwZPdhUX9nKWXE2q3Q uXcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=gYMv6mhRM0NW8wmhbrz7A30S7YrVvPdbhJi1KdJ+nbs=; b=qxTdPA3jRQla3m7YDjZy3C3XET1e/YUkqTn8zRtlVUxT1lon7niJLuo369Pq9g2L6O xgAy/RENpCUmQbZC6/cAvURnbJktjvPOAb3BVFHVZAgd+xx3kJL3JpJ+kK1Z0aE521H6 xMUb8sEykliueTKLY7rJ3E1wjJcww5ebZ9U7NBvsK/LDj6YAKBOdl5mQMdu1aOCfcIrY GvyvBxwK7BN9Xi2uNCh58iJr300Iy8SdEciQqqTAtAgXZh79Z07UMnsXIKpVQYdlOwqV vydaLhT7KWTvApUjPV24y7mCfKhpMSigwL2nIOeL9mdIcOlTl/SBIGfDxr5UihUIAhN7 XcpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=yEcBT6F1; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p3-20020a1709026b8300b00158f23ac798si15003564plk.128.2022.05.02.18.17.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 18:17:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=yEcBT6F1; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9274A61601; Mon, 2 May 2022 17:57:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346236AbiD1Mcu (ORCPT + 99 others); Thu, 28 Apr 2022 08:32:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346291AbiD1Mcr (ORCPT ); Thu, 28 Apr 2022 08:32:47 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E37DAF1DE; Thu, 28 Apr 2022 05:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1651148973; x=1682684973; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=gYMv6mhRM0NW8wmhbrz7A30S7YrVvPdbhJi1KdJ+nbs=; b=yEcBT6F1+xYnXKQ+G7xAVLglS7pdi5RnQW7Znoy2ahnCOP3WBNkYOtFn 7uT0mDES9oSwOmGuiqszO08JFc0667yMiXKlpyqBAGVONC8cnu8uCEaeo XXKiVvUBM9+rzFULc3lmXtBL3Li6GyWbOvEme7IE/0qRQpSdfZJuwVVN0 s=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 28 Apr 2022 05:29:33 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2022 05:29:32 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 28 Apr 2022 05:29:32 -0700 Received: from [10.50.42.7] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 28 Apr 2022 05:29:28 -0700 Message-ID: Date: Thu, 28 Apr 2022 17:59:25 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCHv12 7/9] asm-generic/io: Add logging support for MMIO accessors Content-Language: en-US To: Greg KH CC: , , , , , , , , , References: <6673a2e73d3dd4c7aa01fee9b26cc4a52176ba7a.1651139070.git.quic_saipraka@quicinc.com> <6688ffa2-ec14-9126-1296-6180bab3e1d6@quicinc.com> From: Sai Prakash Ranjan In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 4/28/2022 5:32 PM, Greg KH wrote: > On Thu, Apr 28, 2022 at 04:51:49PM +0530, Sai Prakash Ranjan wrote: >> On 4/28/2022 4:21 PM, Greg KH wrote: >>> On Thu, Apr 28, 2022 at 03:25:30PM +0530, Sai Prakash Ranjan wrote: >>>> Add logging support for MMIO high level accessors such as read{b,w,l,q} >>>> and their relaxed versions to aid in debugging unexpected crashes/hangs >>>> caused by the corresponding MMIO operation. >>>> >>>> Signed-off-by: Sai Prakash Ranjan >>>> --- >>>> include/asm-generic/io.h | 82 ++++++++++++++++++++++++++++++++++++++-- >>>> 1 file changed, 78 insertions(+), 4 deletions(-) >>>> >>>> diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h >>>> index 7ce93aaf69f8..99090722cb4b 100644 >>>> --- a/include/asm-generic/io.h >>>> +++ b/include/asm-generic/io.h >>>> @@ -10,6 +10,7 @@ >>>> #include /* I/O is all done through memory accesses */ >>>> #include /* for memset() and memcpy() */ >>>> #include >>>> +#include >>>> #ifdef CONFIG_GENERIC_IOMAP >>>> #include >>>> @@ -61,6 +62,35 @@ >>>> #define __io_par(v) __io_ar(v) >>>> #endif >>>> +#if IS_ENABLED(CONFIG_TRACE_MMIO_ACCESS) && !(defined(__DISABLE_TRACE_MMIO__)) >>> Shouldn't you document __DISABLE_TRACE_MMIO__ somewhere? It's not even >>> in the changelog. Put a big comment above this for what is is for and >>> how to use it. Otherwise you will forget all about this in 6 months :) >>> >>> thanks, >>> >>> greg k-h >> Didn't you ask me to split the patch to the one actually adding the flag and the one using it. > Yes, and isn't this the commit that adds the flag? Or was that on an > earlier one that I missed? > > Ah, it's in patch 6/9 > > But you should also document it here in the .h file, otherwise the only > place it is described is in some random kvm Makefile that no one will > ever notice :) > > Sure it makes sense, will add it. Thanks, Sai