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-next>] [day] [month] [year] [list]
Message-Id: <20230717191654.1303285-1-samuel.holland@sifive.com>
Date:   Mon, 17 Jul 2023 12:16:54 -0700
From:   Samuel Holland <samuel.holland@...ive.com>
To:     Mark Brown <broonie@...nel.org>
Cc:     Samuel Holland <samuel.holland@...ive.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Laxman Dewangan <ldewangan@...dia.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] regmap-irq: Set IRQCHIP_MASK_ON_SUSPEND if no wake_base

If hardware provides no way to control which IRQs are wakeup enabled,
then software needs to mask non-wakeup-enabled IRQs when going to sleep.

Fixes: 55ac85e942c6 ("regmap: irq: enable wake support by default")
Signed-off-by: Samuel Holland <samuel.holland@...ive.com>
---

 drivers/base/regmap/regmap-irq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index ced0dcf86e0b..d7e076cff6e1 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -728,6 +728,8 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
 
 	d->irq_chip = regmap_irq_chip;
 	d->irq_chip.name = chip->name;
+	if (!chip->wake_base)
+		d->irq_chip.flags |= IRQCHIP_MASK_ON_SUSPEND;
 	d->irq = irq;
 	d->map = map;
 	d->chip = chip;
-- 
2.40.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ