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: <20170817074150.GA17549@dragon>
Date:   Thu, 17 Aug 2017 15:41:51 +0800
From:   Shawn Guo <shawnguo@...nel.org>
To:     Kiran Gunda <kgunda@...eaurora.org>
Cc:     gregkh@...uxfoundation.org, sboyd@...eaurora.org,
        Abhijeet Dharmapurikar <adharmap@...eaurora.org>,
        David Collins <collinsd@...eaurora.org>,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-arm-msm-owner@...r.kernel.org
Subject: Re: [PATCH V2 11/12] spmi: pmic-arb: add support for HW version 5

Hi Kiran,

On Fri, Jul 28, 2017 at 12:40:46PM +0530, Kiran Gunda wrote:
> From: David Collins <collinsd@...eaurora.org>
> 
> Add support for version 5 of the SPMI PMIC arbiter.  It utilizes
> different offsets for registers than those found on version 3.
> Also, the procedure to determine if writing and IRQ access is
> allowed for a given PPID changes for version 5.
> 
> Signed-off-by: David Collins <collinsd@...eaurora.org>
> Signed-off-by: Kiran Gunda <kgunda@...eaurora.org>
> Reviewed-by: Stephen Boyd <sboyd@...eaurora.org>
> ---
>  drivers/spmi/spmi-pmic-arb.c | 236 +++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 214 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
> index bc68e08..3f46445 100644
> --- a/drivers/spmi/spmi-pmic-arb.c
> +++ b/drivers/spmi/spmi-pmic-arb.c

<snip>

> @@ -680,12 +701,19 @@ static int qpnpint_irq_domain_dt_translate(struct irq_domain *d,
>  	ppid = intspec[0] << 8 | intspec[1];
>  	rc = pmic_arb->ver_ops->ppid_to_apid(pmic_arb, ppid);
>  	if (rc < 0) {
> -		dev_err(&pmic_arb->spmic->dev, "failed to xlate sid = 0x%x, periph = 0x%x, irq = %x rc = %d\n",
> +		dev_err(&pmic_arb->spmic->dev, "failed to xlate sid = %#x, periph = %#x, irq = %u rc = %d\n",
>  		intspec[0], intspec[1], intspec[2], rc);
>  		return rc;
>  	}
>  
>  	apid = rc;
> +	if (pmic_arb->apid_data[apid].irq_ee != pmic_arb->ee) {
> +		dev_err(&pmic_arb->spmic->dev, "failed to xlate sid = %#x, periph = %#x, irq = %u: ee=%u but owner=%u\n",
> +			intspec[0], intspec[1], intspec[2], pmic_arb->ee,
> +			pmic_arb->apid_data[apid].irq_ee);
> +		return -ENODEV;
> +	}
> +

It seems to me that this check breaks pm8916_gpios on db410c.  It causes
the failure of pinctrl-spmi-gpio driver probing, because npins returned
from platform_irq_count() call is 0.

Shawn

>  	/* Keep track of {max,min}_apid for bounding search during interrupt */
>  	if (apid > pmic_arb->max_apid)
>  		pmic_arb->max_apid = apid;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ