[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <04ba2810-f9f0-631d-b4a6-0c99edb31701@quicinc.com>
Date: Mon, 27 Feb 2023 10:41:33 +0800
From: Tao Zhang <quic_taozha@...cinc.com>
To: Suzuki K Poulose <suzuki.poulose@....com>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Konrad Dybcio <konradybcio@...il.com>,
Mike Leach <mike.leach@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
CC: Jinlong Mao <quic_jinlmao@...cinc.com>,
Leo Yan <leo.yan@...aro.org>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
<coresight@...ts.linaro.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
Tingwei Zhang <quic_tingweiz@...cinc.com>,
Yuanfang Zhang <quic_yuanfang@...cinc.com>,
Trilok Soni <quic_tsoni@...cinc.com>,
Hao Zhang <quic_hazha@...cinc.com>,
<linux-arm-msm@...r.kernel.org>, <bjorn.andersson@...aro.org>,
Tao Zhang <taozha@....qualcomm.com>
Subject: Re: [PATCH v2 2/9] coresight-tpda: Add DSB dataset support
Hi Suzuki,
Currently if the dsb_esize is not set to 32 or 64, we will not set the
DSBSIZE bit of the register here.
This design is really not good enough.
I will change this in the next version of patch to issue a warning if an
unexpected value is obtained.
在 2/22/2023 8:46 PM, Suzuki K Poulose 写道:
> On 19/01/2023 07:41, Tao Zhang wrote:
>> Read the DSB element size from the device tree. Set the register
>> bit that controls the DSB element size of the corresponding port.
>>
>> Signed-off-by: Tao Zhang <quic_taozha@...cinc.com>
>> Signed-off-by: Tao Zhang <taozha@....qualcomm.com>
>> ---
>> drivers/hwtracing/coresight/coresight-tpda.c | 62
>> ++++++++++++++++++++++++++++
>> drivers/hwtracing/coresight/coresight-tpda.h | 4 ++
>> 2 files changed, 66 insertions(+)
>>
>> diff --git a/drivers/hwtracing/coresight/coresight-tpda.c
>> b/drivers/hwtracing/coresight/coresight-tpda.c
>> index 5989798..be13e08 100644
>> --- a/drivers/hwtracing/coresight/coresight-tpda.c
>> +++ b/drivers/hwtracing/coresight/coresight-tpda.c
>> @@ -37,6 +37,15 @@ static void tpda_enable_port(struct tpda_drvdata
>> *drvdata, int port)
>> u32 val;
>> val = readl_relaxed(drvdata->base + TPDA_Pn_CR(port));
>> + /*
>> + * Configure aggregator port n DSB data set element size
>> + * Set the bit to 0 if the size is 32
>> + * Set the bit to 1 if the size is 64
>> + */
>> + if (drvdata->dsb_esize[port] == 32)
>> + val &= ~TPDA_Pn_CR_DSBSIZE;
>> + else if (drvdata->dsb_esize[port] == 64)
>> + val |= TPDA_Pn_CR_DSBSIZE;
>
> What are the chances of having a value other than 32 or 64 ?
> What should we do in that case ? Should the driver at least
> give out a warning at least in the unhandled case rather than
> silently reusing the existing setting ?
>
> Suzuki
>
Best,
Tao
Powered by blists - more mailing lists