lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c846a47-8192-4c6c-927b-8969485d49aa@kernel.org>
Date: Tue, 3 Sep 2024 09:19:43 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Jingyi Wang <quic_jingyw@...cinc.com>
Cc: Bjorn Andersson <andersson@...nel.org>,
 Konrad Dybcio <konradybcio@...nel.org>, Conor Dooley <conor@...nel.org>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] soc: qcom: llcc: add errata to get bank num

On 03/09/2024 09:17, Jingyi Wang wrote:
> 
> 
> On 9/3/2024 3:13 PM, Krzysztof Kozlowski wrote:
>> On Tue, Sep 03, 2024 at 02:21:31PM +0800, Jingyi Wang wrote:
>>> Use "num-banks" property to indicate the actual num of banks for
>>> errata.
>>>
>>> Signed-off-by: Jingyi Wang <quic_jingyw@...cinc.com>
>>> ---
>>>  drivers/soc/qcom/llcc-qcom.c | 15 ++++++++++-----
>>>  1 file changed, 10 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
>>> index 8fa4ffd3a9b5..3fb45e625d82 100644
>>> --- a/drivers/soc/qcom/llcc-qcom.c
>>> +++ b/drivers/soc/qcom/llcc-qcom.c
>>> @@ -1275,12 +1275,17 @@ static int qcom_llcc_probe(struct platform_device *pdev)
>>>  		goto err;
>>>  	cfg = &cfgs->llcc_config[cfg_index];
>>>  
>>> -	ret = regmap_read(regmap, cfg->reg_offset[LLCC_COMMON_STATUS0], &num_banks);
>>> -	if (ret)
>>> -		goto err;
>>> +	if (unlikely(!of_property_read_u32(dev->of_node, "num-banks", &num_banks))) {
>>
>> Drop unlikely.
>>
>>> +		/* errata: get num of llcc banks. */
>>
>> Huh? What?
>>
>>> +	} else {
>>> +		ret = regmap_read(regmap, cfg->reg_offset[LLCC_COMMON_STATUS0], &num_banks);
>>> +		if (ret)
>>> +			goto err;
>>
>> Sorry, but what? You can read it from hardware, but you add DT property?
>> No, that's just wrong. Why commit msg explains nothing about reasons and
>> problem you are solving?
>>
> we need the property because there is hardware errata on this SoC, regmap_read get wrong num.

That's what compatible is for.

Anyway, you did not explain the problem but just send some code. All
your patches in this and all future submissions must explain why you are
doing this. What you are fixing, why you are introducing something.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ