mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shivnandan Kumar <quic_kshivnan@quicinc.com>
To: Konrad Dybcio <konrad.dybcio@linaro.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Bjorn Andersson <andersson@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<quic_rgottimu@quicinc.com>
Subject: Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
Date: Thu, 20 Jun 2024 14:25:59 +0530	[thread overview]
Message-ID: <461966ee-11ce-45e7-8ea8-abbb71431458@quicinc.com> (raw)
In-Reply-To: <a30fb728-d832-4309-8415-a28fed301e27@linaro.org>



On 6/20/2024 12:46 AM, Konrad Dybcio wrote:
> 
> 
> On 6/19/24 15:51, Shivnandan Kumar wrote:
>> Add tracepoint for tracing the measured traffic in kbps,
>> up_kbps and down_kbps in bwmon. This information is valuable
>> for understanding what bwmon hw measures at the system cache
>> level and at the DDR level which is helpful in debugging
>> bwmon behavior.
>>
>> Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
>> ---
>>   MAINTAINERS                        |  1 +
>>   drivers/soc/qcom/icc-bwmon.c       |  7 +++--
>>   drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
>>   3 files changed, 55 insertions(+), 2 deletions(-)
>>   create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 242fc612fbc5..1b410c0183bb 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -18573,6 +18573,7 @@ M:    Krzysztof Kozlowski 
>> <krzysztof.kozlowski@linaro.org>
>>   L:    linux-arm-msm@vger.kernel.org
>>   S:    Maintained
>>   F:    
>> Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
>> +F:    drivers/soc/qcom/trace_icc-bwmon.h
>>   F:    drivers/soc/qcom/icc-bwmon.c
>>
>>   QUALCOMM IOMMU
>> diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
>> index fb323b3364db..9b5ac1e62673 100644
>> --- a/drivers/soc/qcom/icc-bwmon.c
>> +++ b/drivers/soc/qcom/icc-bwmon.c
>> @@ -17,6 +17,8 @@
>>   #include <linux/pm_opp.h>
>>   #include <linux/regmap.h>
>>   #include <linux/sizes.h>
>> +#define CREATE_TRACE_POINTS
>> +#include "trace_icc-bwmon.h"
>>
>>   /*
>>    * The BWMON samples data throughput within 'sample_ms' time. With 
>> three
>> @@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void 
>> *dev_id)
>>       struct icc_bwmon *bwmon = dev_id;
>>       unsigned int irq_enable = 0;
>>       struct dev_pm_opp *opp, *target_opp;
>> -    unsigned int bw_kbps, up_kbps, down_kbps;
>> +    unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;
>>
>> -    bw_kbps = bwmon->target_kbps;
>> +    meas_kbps = bw_kbps = bwmon->target_kbps;
>>
>>       target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);
> 
> This breaks bwmon, as dev_pm_opp_find_bw_ceil is now fed a random
> (uninitialized variable) value
> 

Thank you for reviewing the patch.
I didn't get it, still the variable "bw_kbps" is being initialized along 
with "meas_kbps". Which variable are you referring to as being fed to 
dev_pm_opp_find_bw_ceil  with an uninitialized value?

Thanks
Shivnandan

> Konrad

  reply	other threads:[~2024-06-20  8:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 13:51 Shivnandan Kumar
2024-06-19 19:16 ` Konrad Dybcio
2024-06-20  8:55   ` Shivnandan Kumar [this message]
2024-06-20 10:48     ` Konrad Dybcio
2024-06-20 20:36       ` Dmitry Baryshkov
2024-06-24 11:11         ` Shivnandan Kumar
  -- strict thread matches above, loose matches on Subject: below --
2024-05-31 10:54 Shivnandan Kumar
2024-05-31 20:29 ` kernel test robot
2024-06-01  1:28 ` kernel test robot

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=461966ee-11ce-45e7-8ea8-abbb71431458@quicinc.com \
    --to=quic_kshivnan@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_rgottimu@quicinc.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

all inboxes | Powered by JetHome®