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:	Tue, 12 May 2015 12:36:12 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Geert Uytterhoeven <geert+renesas@...der.be>,
	Hisashi Nakamura <hisashi.nakamura.ak@...esas.com>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Valentine <valentine.barshak@...entembedded.com>,
	Magnus Damm <magnus.damm@...il.com>,
	Alexandre Courbot <gnurou@...il.com>,
	Marc Zyngier <marc.zyngier@....com>,
	Axel Haslam <ahaslam@...libre.com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: rcar: Check for irq_set_irq_wake() failures

On Tue, May 12, 2015 at 10:07 AM, Geert Uytterhoeven
<geert@...ux-m68k.org> wrote:
> On Tue, May 12, 2015 at 9:55 AM, Linus Walleij <linus.walleij@...aro.org> wrote:

>> This should be moved to the commit message I think.
>
> So that's why I put it below the "---".

So it was below the --- and that is why I ask you to move this
useful information above the --- and into the commit message.

>>> -       irq_set_irq_wake(p->irq_parent, on);
>>> +       int error;
>>> +
>>> +       if (p->irq_parent) {
>>> +               error = irq_set_irq_wake(p->irq_parent, on);
>>> +               if (error) {
>>> +                       dev_dbg(&p->pdev->dev,
>>> +                               "irq %u doesn't support irq_set_wake\n",
>>> +                               p->irq_parent);
>>> +                       p->irq_parent = 0;
>>> +               }
>>> +       }
>>
>> Does the SH maintainers really like this... Warning
>> appear once and is squelched.
>>
>> Isn't it better to make sure it doesn't happen or something.
>>
>> It looks hacky. Any other suggestions?
>
> The first call to irq_set_irq_wake() (on = true) doesn't print a warning.
> It returns an error code, to indicate that the operation is not supported.
>
> Calling irq_set_irq_wake() again (on = false, during resume) would print
> a warning, as it wouldn't match internal state ("Unbalanced IRQ 26 wake
> disable"). That one is gone now.

Yeah :/

There are a few different patches floating for irq_set_wake() things
and some seem to be causing regressions, I just want some
broader discussion on how we solve this across all platforms.

Maybe the GPIOLIB_IRQCHIP should handle the set_wake()
similarly for all chips?

>> Also, please convert this driver to use GPIOLIB_IRQCHIP
>> like everyone else.
>
> What old branch are you looking at, that it doesn't have commit
> c7f3c5d3ac2d6831 ("gpio: rcar: Switch to use gpiolib irqchip helpers")
> yet ;-)?

Argh sorry. (And that was an awesome patch.)

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ