linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qi Liu <liuqi115@huawei.com>
To: Suzuki K Poulose <suzuki.poulose@arm.com>,
	<mathieu.poirier@linaro.org>, <mike.leach@linaro.org>
Cc: <coresight@lists.linaro.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <linuxarm@huawei.com>
Subject: Re: [PATCH] coresight: etm4x: Modify core-commit of cpu to avoid the overflow of HiSilicon ETM
Date: Thu, 26 Nov 2020 21:38:15 +0800	[thread overview]
Message-ID: <4acd7b82-74db-4df6-a7af-26f8434de45f@huawei.com> (raw)
In-Reply-To: <cfa91a72-6e01-85ce-583a-9a49093a875b@arm.com>



On 2020/11/23 22:12, Suzuki K Poulose wrote:
> Hi Qi
> 
> Thanks for the changes. Mostly looks good to me, except for the
> name of the call back.
> 
> 
Hi Suzuki,
ok, I'll send a new patch to change the name of call back.

Thanks
Qi
> On 11/23/20 1:29 PM, Qi Liu wrote:
>> The ETM device can't keep up with the core pipeline when cpu core
>> is at full speed. This may cause overflow within core and its ETM.
>> This is a common phenomenon on ETM devices.
>>
>> On HiSilicon Hip08 platform, a specific feature is added to set
>> core pipeline. So commit rate can be reduced manually to avoid ETM
>> overflow.
>>
>> Signed-off-by: Qi Liu <liuqi115@huawei.com>
> 
> 
>> ---
>> Change since v1:
>> - add CONFIG_ETM4X_IMPDEF_FEATURE and CONFIG_ETM4X_IMPDEF_HISILICON
>>    to keep specific feature off platforms which don't use it.
>> Change since v2:
>> - remove some unused variable.
>> Change since v3:
>> - use read/write_sysreg_s() to access register.
>>
>>   drivers/hwtracing/coresight/Kconfig                |  9 +++
>>   drivers/hwtracing/coresight/coresight-etm4x-core.c | 84 ++++++++++++++++++++++
>>   drivers/hwtracing/coresight/coresight-etm4x.h      | 12 ++++
>>   3 files changed, 105 insertions(+)
>>
> 
>>
>> diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h
>> index eefc737..1784975 100644
>> --- a/drivers/hwtracing/coresight/coresight-etm4x.h
>> +++ b/drivers/hwtracing/coresight/coresight-etm4x.h
>> @@ -8,6 +8,7 @@
>>
>>   #include <asm/local.h>
>>   #include <linux/spinlock.h>
>> +#include <linux/types.h>
>>   #include "coresight-priv.h"
>>
>>   /*
>> @@ -203,6 +204,11 @@
>>   /* Interpretation of resource numbers change at ETM v4.3 architecture */
>>   #define ETM4X_ARCH_4V3    0x43
>>
>> +enum etm_impdef_type {
>> +    ETM4_IMPDEF_HISI_CORE_COMMIT,
>> +    ETM4_IMPDEF_FEATURE_MAX,
>> +};
>> +
>>   /**
>>    * struct etmv4_config - configuration information related to an ETMv4
>>    * @mode:    Controls various modes supported by this ETM.
>> @@ -415,6 +421,7 @@ struct etmv4_save_state {
>>    * @state_needs_restore: True when there is context to restore after PM exit
>>    * @skip_power_up: Indicates if an implementation can skip powering up
>>    *           the trace unit.
>> + * @arch_features: Bitmap of arch features of etmv4 devices.
>>    */
>>   struct etmv4_drvdata {
>>       void __iomem            *base;
>> @@ -463,6 +470,11 @@ struct etmv4_drvdata {
>>       struct etmv4_save_state        *save_state;
>>       bool                state_needs_restore;
>>       bool                skip_power_up;
>> +    DECLARE_BITMAP(arch_features, ETM4_IMPDEF_FEATURE_MAX);
>> +};
>> +
>> +struct etm4_arch_features {
>> +    void (*set_commit)(bool enable);
> 
> The set_commit is too hisilicon specific :-). Could we please rename
> this to soemthing more generic. The callback for hisilicon etms, could still
> be xx_commit". May be simply call it
> 
>     callback() ?
> 
> or may be even
>     arch_callback() ?
> 
> 
>>   };
> 
> nit: This need not be part of the header file, as it is not used
> outside the etm4x-core.c
> 
> Suzuki
> 
> .
> 


  reply	other threads:[~2020-11-26 13:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 13:29 [PATCH] coresight: etm4x: Modify core-commit of cpu to avoid the overflow of HiSilicon ETM Qi Liu
2020-11-23 14:12 ` Suzuki K Poulose
2020-11-26 13:38   ` Qi Liu [this message]
2020-11-24  1:00 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-09-03 11:37 Qi Liu
2020-08-03 13:40 Qi Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4acd7b82-74db-4df6-a7af-26f8434de45f@huawei.com \
    --to=liuqi115@huawei.com \
    --cc=coresight@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@linaro.org \
    --cc=suzuki.poulose@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).