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]
Message-ID: <CAHp75VdnmPGr3WSiyjCrzbgJwOFE92gr7yUMb2QqS3+GGRtAiA@mail.gmail.com>
Date: Tue, 3 Feb 2026 17:28:57 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Florian Fainelli <florian.fainelli@...adcom.com>
Cc: linux-kernel@...r.kernel.org, Doug Berger <opendmb@...il.com>, 
	Linus Walleij <linusw@...nel.org>, 
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>, 
	Bartosz Golaszewski <brgl@...nel.org>, Christophe Leroy <chleroy@...nel.org>, 
	"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>, 
	"moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE" <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v3 1/2] gpio: brcmstb: implement irq_mask_ack

On Thu, Jan 29, 2026 at 10:13 PM Florian Fainelli
<florian.fainelli@...adcom.com> wrote:
>
> From: Doug Berger <opendmb@...il.com>
>
> The irq_mask_ack operation is slightly more efficient than doing

.irq_mask_ack()

> irq_mask and irq_ack separately.

.irq_mask()
.irq_ack()

> More importantly for this driver it bypasses the check of
> irqd_irq_masked ensuring a previously masked but still active
> interrupt gets remasked if unmasked at the hardware level. This
> allows the driver to more efficiently unmask the wake capable
> interrupts when quiescing without needing to enable the irqs
> individually to clear the irqd_irq_masked state.

...

> +static void brcmstb_gpio_irq_mask_ack(struct irq_data *d)
> +{
> +       struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
> +       struct brcmstb_gpio_bank *bank = gpiochip_get_data(gc);
> +       struct brcmstb_gpio_priv *priv = bank->parent_priv;

> +       u32 mask = BIT(brcmstb_gpio_hwirq_to_offset(d->hwirq, bank));

Use API to get HW IRQ from irq_data. This is documented in the GPIO
documentation.

> +
> +       guard(gpio_generic_lock_irqsave)(&bank->chip);
> +       __brcmstb_gpio_set_imask(bank, d->hwirq, false);
> +       gpio_generic_write_reg(&bank->chip,
> +                              priv->reg_base + GIO_STAT(bank->id), mask);
> +}


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ