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: <87tujnrtev.wl-maz@kernel.org>
Date:   Wed, 18 Aug 2021 10:31:04 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     Maulik Shah <mkshah@...eaurora.org>
Cc:     tglx@...utronix.de, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, linux-gpio@...r.kernel.org,
        bjorn.andersson@...aro.org, linus.walleij@...aro.org,
        tkjos@...gle.com, lsrao@...eaurora.org
Subject: Re: [PATCH 2/2] irqchip: qcom-pdc: Disconnect domain hierarchy for GPIO_NO_WAKE_IRQs

Hi Maulik,

In the future, please always add a cover-letter email if sending a
series that has more than a single patch. This considerably helps the
tracking, and gives you an opportunity to explain what you are doing.

On Tue, 17 Aug 2021 11:19:06 +0100,
Maulik Shah <mkshah@...eaurora.org> wrote:
> 
> gpio_to_irq() reports error at irq_domain_trim_hierarchy() for non wakeup
> capable GPIOs that do not have dedicated interrupt at GIC.
> 
> Since PDC irqchip do not allocate irq at parent GIC domain for such GPIOs
> indicate same by using irq_domain_disconnect_hierarchy().
> 
> Signed-off-by: Maulik Shah <mkshah@...eaurora.org>
> ---
>  drivers/irqchip/qcom-pdc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c
> index 32d5920..0ba0461 100644
> --- a/drivers/irqchip/qcom-pdc.c
> +++ b/drivers/irqchip/qcom-pdc.c
> @@ -324,8 +324,11 @@ static int qcom_pdc_gpio_alloc(struct irq_domain *domain, unsigned int virq,
>  	if (ret)
>  		return ret;
>  
> -	if (hwirq == GPIO_NO_WAKE_IRQ)
> +	if (hwirq == GPIO_NO_WAKE_IRQ) {
> +		if (domain->parent)
> +			irq_domain_disconnect_hierarchy(domain->parent, virq);
>  		return 0;
> +	}
>  
>  	parent_hwirq = get_parent_hwirq(hwirq);
>  	if (parent_hwirq == PDC_NO_PARENT_IRQ)

It feels like you are papering over the core of the problem, which is
that most of the GPIO_NO_WAKE_IRQ stuff should simply go away now that
we have a way to drop parts of the hierarchy.

I had a go at that a few months back, but never had the opportunity to
actually test the resulting code[1]. Could you please give it a go and
let me know what breaks?

Thanks,

	M.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?h=irq/qcom-pdc-nowake&id=331b2ba388a4a79b5c40b8addf56cbe35099a410

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ