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: <e71490ddac65bcf844e277b683ab1795@codeaurora.org>
Date:   Thu, 01 Jun 2017 22:36:06 +0530
From:   kgunda@...eaurora.org
To:     Stephen Boyd <sboyd@...eaurora.org>
Cc:     Abhijeet Dharmapurikar <adharmap@...eaurora.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        David Collins <collinsd@...eaurora.org>,
        Subbaraman Narayanamurthy <subbaram@...eaurora.org>,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        adharmap@...cinc.com, aghayal@....qualcomm.com,
        linux-arm-msm-owner@...r.kernel.org
Subject: Re: [PATCH V1 06/15] spmi: pmic-arb: fix missing interrupts

On 2017-05-31 07:30, Stephen Boyd wrote:
> On 05/30, Kiran Gunda wrote:
>> From: Abhijeet Dharmapurikar <adharmap@...eaurora.org>
>> 
>> irq_enable is called when the device resumes. Note that the
>> irq_enable is called regardless of whether the interrupt was
>> marked enabled/disabled in the descriptor or whether it was
>> masked/unmasked at the controller while resuming.
>> 
>> The current driver unconditionally clears the interrupt in its
>> irq_enable callback. This is dangerous as any interrupts that
>> happen right before the resume could be missed.
>> Remove the irq_enable callback and use mask/unmask instead.
>> 
>> Also remove struct pmic_arb_irq_spec as it serves no real purpose.
>> It is used only in the translate function and the code is much
>> cleaner without it.
> 
> Also a separate patch for that part....
> 
Sure. will split it in to different patch or move it in the
https://patchwork.kernel.org/patch/9754511/ patch as per your comment.
>> 
>> Signed-off-by: Abhijeet Dharmapurikar <adharmap@...eaurora.org>
>> Signed-off-by: Kiran Gunda <kgunda@...eaurora.org>
>> ---
>>  drivers/spmi/spmi-pmic-arb.c | 29 +++--------------------------
>>  1 file changed, 3 insertions(+), 26 deletions(-)
>> 
>> diff --git a/drivers/spmi/spmi-pmic-arb.c 
>> b/drivers/spmi/spmi-pmic-arb.c
>> index 0a5728c..bc03737 100644
>> --- a/drivers/spmi/spmi-pmic-arb.c
>> +++ b/drivers/spmi/spmi-pmic-arb.c
>> @@ -588,17 +588,6 @@ static void qpnpint_irq_unmask(struct irq_data 
>> *d)
>>  	qpnpint_spmi_write(d, QPNPINT_REG_EN_CLR, &data, 1);
>>  }
>> 
>> -static void qpnpint_irq_enable(struct irq_data *d)
>> -{
>> -	u8 irq  = d->hwirq >> 8;
>> -	u8 data;
>> -
>> -	qpnpint_irq_unmask(d);
>> -
>> -	data = BIT(irq);
>> -	qpnpint_spmi_write(d, QPNPINT_REG_LATCHED_CLR, &data, 1);
>> -}
>> -
>>  static int qpnpint_irq_set_type(struct irq_data *d, unsigned int 
>> flow_type)
>>  {
>>  	struct spmi_pmic_arb_qpnpint_type type;
>> @@ -647,7 +636,6 @@ static int qpnpint_get_irqchip_state(struct 
>> irq_data *d,
>> 
>>  static struct irq_chip pmic_arb_irqchip = {
>>  	.name		= "pmic_arb",
>> -	.irq_enable	= qpnpint_irq_enable,
>>  	.irq_ack	= qpnpint_irq_ack,
>>  	.irq_mask	= qpnpint_irq_mask,
>>  	.irq_unmask	= qpnpint_irq_unmask,
> 
> This looks ok.
Thanks !

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ