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]
Date:   Wed, 23 May 2018 07:35:26 +0000
From:   Anson Huang <anson.huang@....com>
To:     Marc Zyngier <marc.zyngier@....com>
CC:     "tglx@...utronix.de" <tglx@...utronix.de>,
        "jason@...edaemon.net" <jason@...edaemon.net>,
        dl-linux-imx <linux-imx@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] irqchip: gpcv2: remove unnecessary functions

Hi, Marc

Anson Huang
Best Regards!


> -----Original Message-----
> From: Marc Zyngier [mailto:marc.zyngier@....com]
> Sent: Wednesday, May 23, 2018 3:23 PM
> To: Anson Huang <anson.huang@....com>
> Cc: tglx@...utronix.de; jason@...edaemon.net; dl-linux-imx
> <linux-imx@....com>; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH] irqchip: gpcv2: remove unnecessary functions
> 
> On Wed, 23 May 2018 07:23:00 +0100,
> Anson Huang wrote:
> >
> > GPC is in always-on domain, it never lost its content during
> > suspend/resume, so no need to do save/restore for it during
> > suspend/resume.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@....com>
> > ---
> >  drivers/irqchip/irq-imx-gpcv2.c | 41
> > -----------------------------------------
> >  1 file changed, 41 deletions(-)
> >
> > diff --git a/drivers/irqchip/irq-imx-gpcv2.c
> > b/drivers/irqchip/irq-imx-gpcv2.c index 4760307..e6025d9 100644
> > --- a/drivers/irqchip/irq-imx-gpcv2.c
> > +++ b/drivers/irqchip/irq-imx-gpcv2.c
> > @@ -28,46 +28,6 @@ struct gpcv2_irqchip_data {
> >
> >  static struct gpcv2_irqchip_data *imx_gpcv2_instance;
> >
> > -static int gpcv2_wakeup_source_save(void) -{
> > -	struct gpcv2_irqchip_data *cd;
> > -	void __iomem *reg;
> > -	int i;
> > -
> > -	cd = imx_gpcv2_instance;
> > -	if (!cd)
> > -		return 0;
> > -
> > -	for (i = 0; i < IMR_NUM; i++) {
> > -		reg = cd->gpc_base + cd->cpu2wakeup + i * 4;
> > -		cd->saved_irq_mask[i] = readl_relaxed(reg);
> > -		writel_relaxed(cd->wakeup_sources[i], reg);
> > -	}
> 
> If you're removing that code, what's the purpose of keeping saved_irq_mask?
> 
> Also, who is now programming the wake-up_source? For good or bad reasons,
> this drivers uses the save/restore hooks to program the wake-up state.
> Removing this code seem to simply kill the feature.
> 
> What am I missing?
> 
> Thanks,

I made a mistake here, forgot to program the wakeup source into GPC IMR register
In imx_gpcv2_irq_set_wake function.
And I think we can remove the saved_irq_mask as well, will do it in V2.

The wake-up source is programmed by module driver calling "enable_irq_wake" if
device wakeup capability is enabled, and I miss to program into GPC IMR register. Will
fix it later. Thanks.

Anson.

> 
> 	M.
> 
> --
> Jazz is not dead, it just smell funny.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ