[PATCH] power: Disable wakeup for pcie bridge / enable debug prints
Imre Deak
imre.deak at intel.com
Sat Apr 6 13:33:29 UTC 2019
Signed-off-by: Imre Deak <imre.deak at intel.com>
---
drivers/base/power/Makefile | 2 +-
drivers/base/power/wakeup.c | 17 ++++++++++++++++-
drivers/gpu/drm/i915/Kconfig.debug | 1 +
init/main.c | 2 +-
kernel/irq/pm.c | 4 ++++
5 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
index e1bb691cf8f1..2c656ba2ce95 100644
--- a/drivers/base/power/Makefile
+++ b/drivers/base/power/Makefile
@@ -5,4 +5,4 @@ obj-$(CONFIG_PM_TRACE_RTC) += trace.o
obj-$(CONFIG_PM_GENERIC_DOMAINS) += domain.o domain_governor.o
obj-$(CONFIG_HAVE_CLK) += clock_ops.o
-ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG
+ccflags-y := -DDEBUG
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index bb1ae175fae1..b88a2f685dc2 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -408,6 +408,12 @@ void device_set_wakeup_capable(struct device *dev, bool capable)
if (!!dev->power.can_wakeup == !!capable)
return;
+ if (dev_name(dev) &&
+ strcmp(dev_name(dev), "0000:00:1d.0") == 0) {
+ dev_info(dev, "wakeup capable: %d\n", capable);
+ capable = false;
+ }
+
dev->power.can_wakeup = capable;
if (device_is_registered(dev) && !list_empty(&dev->power.entry)) {
if (capable) {
@@ -833,6 +839,7 @@ bool pm_wakeup_pending(void)
{
unsigned long flags;
bool ret = false;
+ int abort_count;
raw_spin_lock_irqsave(&events_lock, flags);
if (events_check_enabled) {
@@ -849,11 +856,19 @@ bool pm_wakeup_pending(void)
pm_print_active_wakeup_sources();
}
- return ret || atomic_read(&pm_abort_suspend) > 0;
+ abort_count = atomic_read(&pm_abort_suspend);
+ if (abort_count > 0)
+ ret = true;
+
+ if (ret)
+ printk(KERN_DEBUG "Suspend aborted, count %d\n", abort_count);
+
+ return ret;
}
void pm_system_wakeup(void)
{
+ dump_stack();
atomic_inc(&pm_abort_suspend);
s2idle_wake();
}
diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
index ad4d71161dda..994d9d904afc 100644
--- a/drivers/gpu/drm/i915/Kconfig.debug
+++ b/drivers/gpu/drm/i915/Kconfig.debug
@@ -31,6 +31,7 @@ config DRM_I915_DEBUG
select DRM_I915_SW_FENCE_DEBUG_OBJECTS
select DRM_I915_SELFTEST
select DRM_I915_DEBUG_RUNTIME_PM
+ select GENERIC_IRQ_DEBUGFS
default n
help
Choose this option to turn on extra driver debugging that may affect
diff --git a/init/main.c b/init/main.c
index 598e278b46f7..cafc85d915c7 100644
--- a/init/main.c
+++ b/init/main.c
@@ -504,7 +504,7 @@ void __init __weak thread_stack_cache_init(void)
void __init __weak mem_encrypt_init(void) { }
-bool initcall_debug;
+bool initcall_debug = true;
core_param(initcall_debug, initcall_debug, bool, 0644);
#ifdef TRACEPOINTS_ENABLED
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index d6961d3c6f9e..4e85fdd6dd44 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -21,6 +21,10 @@ bool irq_pm_check_wakeup(struct irq_desc *desc)
desc->depth++;
irq_disable(desc);
pm_system_irq_wakeup(irq_desc_get_irq(desc));
+ printk(KERN_DEBUG "%s: dev %s irq %d\n",
+ __func__,
+ desc->dev_name,
+ desc->irq_data.irq);
return true;
}
return false;
--
2.13.2
More information about the Intel-gfx-trybot
mailing list