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: <da84b5e1-ae11-42e1-8b93-8d93df1862ad@quicinc.com>
Date: Mon, 8 Jul 2024 11:10:05 -0700
From: David Collins <quic_collinsd@...cinc.com>
To: Bjorn Andersson <andersson@...nel.org>
CC: Stephen Boyd <sboyd@...nel.org>, <linux-kernel@...r.kernel.org>,
        <linux-arm-msm@...r.kernel.org>, Abel Vesa <abel.vesa@...aro.org>,
        Dan
 Carpenter <dan.carpenter@...aro.org>,
        Neil Armstrong
	<neil.armstrong@...aro.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>
Subject: Re: [PATCH] spmi: pmic-arb: use correct node when adding irq domain

On 7/3/24 19:30, Bjorn Andersson wrote:
> On Wed, Jul 03, 2024 at 03:11:57PM GMT, David Collins wrote:
>> Pass a pointer to the SPMI bus subnode instead of the top-
>> level PMIC arbiter node when calling irq_domain_add_tree().
>> This ensures that consumer IRQ mappings can be found
>> successfully at runtime.
>>
>> Here is an example of a consumer device probe deferral that
>> happens without this fix in place:
>>
>> [   18.197271] platform c42d000.spmi:qcom,pmk8550@0:pon_hlos@...0:pwrkey:
>>   deferred probe pending: pm8941-pwrkey: IRQ index 0 not found
>> [   18.197275] platform c42d000.spmi:qcom,pmk8550@0:pon_hlos@...0:resin:
>>   deferred probe pending: pm8941-pwrkey: IRQ index 0 not found
>>
>> Fixes: 02922ccbb330 ("spmi: pmic-arb: Register controller for bus instead of arbiter")
>> Fixes: 979987371739 ("spmi: pmic-arb: Add multi bus support")
>> Signed-off-by: David Collins <quic_collinsd@...cinc.com>
> 
> Not sure if Stephen was waiting for some fixes tags, but otherwise this
> was already proposed and reviewed here:
> 
> https://lore.kernel.org/all/20240522-topic-spmi_multi_master_irqfix-v2-1-7ec92a862b9f@linaro.org/

Thanks Bjorn for the link to this previous patch.  I was unaware that it
had been sent out.  I ran into this bug when testing with the recent
pmic-arb multi-bus support series.  I searched to see if it been
submitted before and couldn't find mention of it, so I sent out my fix
for it.

It would be great if Konrad's version of the fix (with Fixes tag(s)
added) or mine could be picked up.  That will ensure that client IRQ
usage isn't broken on targets specifying spmi-pmic-arb SPMI bus subnode
devices in DT.

Thanks,
David


> FWIW:
> 
> Reviewed-by: Bjorn Andersson <andersson@...nel.org>
> 
> Regards,
> Bjorn
> 
>> ---
>>  drivers/spmi/spmi-pmic-arb.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
>> index 791cdc160c51..e6a4bf3abb1f 100644
>> --- a/drivers/spmi/spmi-pmic-arb.c
>> +++ b/drivers/spmi/spmi-pmic-arb.c
>> @@ -1737,8 +1737,7 @@ static int spmi_pmic_arb_bus_init(struct platform_device *pdev,
>>  
>>  	dev_dbg(&pdev->dev, "adding irq domain for bus %d\n", bus_index);
>>  
>> -	bus->domain = irq_domain_add_tree(dev->of_node,
>> -					  &pmic_arb_irq_domain_ops, bus);
>> +	bus->domain = irq_domain_add_tree(node, &pmic_arb_irq_domain_ops, bus);
>>  	if (!bus->domain) {
>>  		dev_err(&pdev->dev, "unable to create irq_domain\n");
>>  		return -ENOMEM;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ