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] [day] [month] [year] [list]
Message-ID: <19cf953d-09b2-4c5c-9201-5f1fd84118e7@quicinc.com>
Date: Fri, 6 Sep 2024 13:43:34 +0800
From: Jingyi Wang <quic_jingyw@...cinc.com>
To: Konrad Dybcio <konradybcio@...il.com>,
        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>
CC: <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

Hi Konrad,

On 9/5/2024 9:29 PM, Konrad Dybcio wrote:
> On 3.09.2024 8:21 AM, 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))) {
>> +		/* errata: get num of llcc banks. */
>> +	} else {
>> +		ret = regmap_read(regmap, cfg->reg_offset[LLCC_COMMON_STATUS0], &num_banks);
>> +		if (ret)
>> +			goto err;
>> +
>> +		num_banks &= LLCC_LB_CNT_MASK;
>> +		num_banks >>= LLCC_LB_CNT_SHIFT;
>> +	}
> 
> Is num-banks going to be populated by the bootloader, or hardcoded?
> 
> If the latter, we may just do so in the driver, hoping no more SoCs
> have this erratum..
> 
> Konrad

We would like modify that in driver instead of bootloader, so you suggestion
is hardcode it in struct like "qcom_llcc_config" instead of adding property
in devicetree? Please correct my if there is misunderstanding.

Thanks,
Jingyi



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ