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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20231129083844.GU5169@atomide.com>
Date:   Wed, 29 Nov 2023 10:38:44 +0200
From:   Tony Lindgren <tony@...mide.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        linux-input@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Rob Herring <robh@...nel.org>, Dhruva Gole <d-gole@...com>
Subject: Re: [PATCH v4 2/2] Input: gpio-keys - Add system suspend support for
 dedicated wakeirqs

* Dmitry Torokhov <dmitry.torokhov@...il.com> [231125 04:50]:
> Hi Tony,
> 
> On Fri, Nov 24, 2023 at 10:32:41AM +0200, Tony Lindgren wrote:
> > +	/*
> > +	 * Wakeirq shares the handler with the main interrupt, it's only
> > +	 * active during system suspend. See gpio_keys_button_enable_wakeup()
> > +	 * and gpio_keys_button_disable_wakeup().
> > +	 */
> > +	error = devm_request_any_context_irq(dev, bdata->wakeirq, isr,
> > +					     irqflags, wakedesc, bdata);
> > +	if (error < 0) {
> > +		dev_err(dev, "Unable to claim wakeirq %d; error %d\n",
> > +			bdata->irq, error);
> > +		return error;
> > +	}
> > +
> > +	/*
> > +	 * Disable wakeirq until suspend. IRQF_NO_AUTOEN won't work if
> > +	 * IRQF_SHARED was set based on !button->can_disable.
> > +	 */
> > +	disable_irq_nosync(bdata->wakeirq);
> 
> Why _nosync() here and below? Is there any harm in sing the normal
> variant?

Well they are enabled the same time anyways for a while, so I see no
harm using the normal variant here. Will post updated patches after
some testing.

Regards,

Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ