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]
Date:	Sun, 26 Jul 2015 23:13:41 -0700
From:	tip-bot for Sudeep Holla <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	geert@...ux-m68k.org, magnus.damm@...il.com,
	gregory.clement@...e-electrons.com, michal.simek@...inx.com,
	linus.walleij@...aro.org, linux-kernel@...r.kernel.org,
	tglx@...utronix.de, marc.zyngier@....com, jason@...edaemon.net,
	lorenzo.pieralisi@....com, mingo@...nel.org, hpa@...or.com,
	horms@...ge.net.au, sudeep.holla@....com
Subject: [tip:irq/core] irqchip/gic:
  Enable SKIP_SET_WAKE and MASK_ON_SUSPEND

Commit-ID:  aec89ef72ba6c94420f599dcb684ed66937cdacf
Gitweb:     http://git.kernel.org/tip/aec89ef72ba6c94420f599dcb684ed66937cdacf
Author:     Sudeep Holla <sudeep.holla@....com>
AuthorDate: Wed, 15 Jul 2015 15:38:28 +0100
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Mon, 27 Jul 2015 08:09:37 +0200

irqchip/gic: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND

The GIC controller doesn't provides any facility to configure the wakeup
sources. For the same reason, GIC chip implementation can't provide
irq_set_wake functionality, but that results in the irqchip core
preventing the systems from entering sleep states like "suspend to RAM".

The GICv1/v2 controllers support wakeup events. They signal these wakeup
events even when CPU interface is disabled which means the wakeup
outputs are always enabled with the required logic in always-on domain.
An implementation can powerdown the GIC completely, but then the wake-up
must be relayed to some control logic within the power controller that
acts as wake-up interrupt controller.

Setting the IRQCHIP_SKIP_SET_WAKE flags will ensure that the interrupts
from GIC can work as wakeup interrupts and resume from suspend-to-{idle,
ram}. The wakeup interrupt sources need to use enable_irq_wake() and the
irqchip core will then set the IRQD_WAKEUP_STATE flag.

Also it's always safer to mask all the non wakeup interrupts are masked
at the chip level when suspending. The irqchip infrastructure can handle
masking of those interrupts at the chip level. The chip implementation
just have to indicate that with IRQCHIP_MASK_ON_SUSPEND.

This patch enables IRQCHIP_SKIP_SET_WAKE and IRQCHIP_MASK_ON_SUSPEND so
that the irqchip core allows and handles the power managemant wake up
modes.

Signed-off-by: Sudeep Holla <sudeep.holla@....com>
Cc: Marc Zyngier <marc.zyngier@....com>
Cc: Simon Horman <horms@...ge.net.au>
Cc: Jason Cooper <jason@...edaemon.net>
Cc: Michal Simek <michal.simek@...inx.com>
Cc: Linus Walleij <linus.walleij@...aro.org>
Cc: Magnus Damm <magnus.damm@...il.com>
Cc: Gregory CLEMENT <gregory.clement@...e-electrons.com>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Cc: linux-arm-kernel@...ts.infradead.org
Link: http://lkml.kernel.org/r/1436971109-20189-1-git-send-email-sudeep.holla@arm.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 drivers/irqchip/irq-gic.c   | 4 +++-
 drivers/irqchip/irq-hip04.c | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index cadd862..39ff8df 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -324,7 +324,9 @@ static struct irq_chip gic_chip = {
 #endif
 	.irq_get_irqchip_state	= gic_irq_get_irqchip_state,
 	.irq_set_irqchip_state	= gic_irq_set_irqchip_state,
-	.flags			= IRQCHIP_SET_TYPE_MASKED,
+	.flags			= IRQCHIP_SET_TYPE_MASKED |
+				  IRQCHIP_SKIP_SET_WAKE |
+				  IRQCHIP_MASK_ON_SUSPEND,
 };
 
 void __init gic_cascade_irq(unsigned int gic_nr, unsigned int irq)
diff --git a/drivers/irqchip/irq-hip04.c b/drivers/irqchip/irq-hip04.c
index 55c2c10..a0128c7 100644
--- a/drivers/irqchip/irq-hip04.c
+++ b/drivers/irqchip/irq-hip04.c
@@ -202,7 +202,9 @@ static struct irq_chip hip04_irq_chip = {
 #ifdef CONFIG_SMP
 	.irq_set_affinity	= hip04_irq_set_affinity,
 #endif
-	.flags			= IRQCHIP_SET_TYPE_MASKED,
+	.flags			= IRQCHIP_SET_TYPE_MASKED |
+				  IRQCHIP_SKIP_SET_WAKE |
+				  IRQCHIP_MASK_ON_SUSPEND,
 };
 
 static u16 hip04_get_cpumask(struct hip04_irq_data *intc)
--
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