Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1699781

Re: Suspend-resume failure on Intel Eagle Lake Core2Duo

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: Suspend-resume failure on Intel Eagle Lake Core2Duo
Date 2017-07-31 09:50 +0200
Message-ID <u9dCF-3sb-7@gated-at.bofh.it> (permalink)
References (15 earlier) <u8eKu-4ZB-21@gated-at.bofh.it> <u8eU9-560-5@gated-at.bofh.it> <u8eUa-560-17@gated-at.bofh.it> <u8gjg-65z-19@gated-at.bofh.it> <u9djk-3lr-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 31 Jul 2017, Tomi Sarvela wrote:
> On 28/07/17 19:26, Thomas Gleixner wrote:
> > Did you change anything else compared to the tests before ?
> 
> I did check that the problem persisted in linus-HEAD before testing your
> patch. The testing was done in order (reading from console logs I happen to
> still have in one window):

What I still do not understand is why this would affect the suspend path in
any way.

Can you remove the previous patch and apply the one below. If it resumes,
please provide the data from the trace buffer again.

Thanks,

	tglx

8<--------------
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -459,3 +459,11 @@ static inline void irq_remove_debugfs_en
 {
 }
 #endif /* CONFIG_GENERIC_IRQ_DEBUGFS */
+
+extern bool irq_suspend_resume;
+
+static inline void irq_trace_state(const char *what, struct irq_desc *desc)
+{
+	trace_printk("%s %d state %08x\n", what, irq_desc_get_irq(desc),
+		     irqd_get(&desc->irq_data));
+}
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -14,6 +14,8 @@
 
 #include "internals.h"
 
+bool irq_suspend_resume;
+
 bool irq_pm_check_wakeup(struct irq_desc *desc)
 {
 	if (irqd_is_wakeup_armed(&desc->irq_data)) {
@@ -120,6 +122,7 @@ void suspend_device_irqs(void)
 	struct irq_desc *desc;
 	int irq;
 
+	irq_suspend_resume = true;
 	for_each_irq_desc(irq, desc) {
 		unsigned long flags;
 		bool sync;
@@ -127,7 +130,9 @@ void suspend_device_irqs(void)
 		if (irq_settings_is_nested_thread(desc))
 			continue;
 		raw_spin_lock_irqsave(&desc->lock, flags);
+		irq_trace_state("presuspend", desc);
 		sync = suspend_device_irq(desc);
+		irq_trace_state("postsuspend", desc);
 		raw_spin_unlock_irqrestore(&desc->lock, flags);
 
 		if (sync)
@@ -150,8 +155,9 @@ static void resume_irq(struct irq_desc *
 	/* Pretend that it got disabled ! */
 	desc->depth++;
 	irq_state_set_disabled(desc);
-	irq_state_set_masked(desc);
+
 resume:
+	irq_state_set_masked(desc);
 	desc->istate &= ~IRQS_SUSPENDED;
 	__enable_irq(desc);
 }
@@ -172,9 +178,14 @@ static void resume_irqs(bool want_early)
 			continue;
 
 		raw_spin_lock_irqsave(&desc->lock, flags);
+		irq_trace_state("preresume", desc);
 		resume_irq(desc);
+		irq_trace_state("postresume", desc);
 		raw_spin_unlock_irqrestore(&desc->lock, flags);
 	}
+
+	if (!want_early)
+		irq_suspend_resume = false;
 }
 
 /**

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Suspend-resume failure on Intel Eagle Lake Core2Duo Martin Peres <martin.peres@linux.intel.com> - 2017-07-24 15:50 +0200
  Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-24 17:30 +0200
    Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Martin Peres <martin.peres@linux.intel.com> - 2017-07-24 17:50 +0200
      Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-24 18:40 +0200
        Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Martin Peres <martin.peres@linux.intel.com> - 2017-07-24 18:40 +0200
          Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Tomi Sarvela <tomi.p.sarvela@intel.com> - 2017-07-25 09:10 +0200
            Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Martin Peres <martin.peres@linux.intel.com> - 2017-07-26 15:50 +0200
              Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-26 16:30 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Tomi Sarvela <tomi.p.sarvela@intel.com> - 2017-07-27 09:40 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-27 09:50 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Tomi Sarvela <tomi.p.sarvela@intel.com> - 2017-07-27 10:20 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-27 21:50 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-27 22:20 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-27 23:10 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Tomi Sarvela <tomi.p.sarvela@intel.com> - 2017-07-28 14:40 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-28 14:50 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-28 15:20 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Tomi Sarvela <tomi.p.sarvela@intel.com> - 2017-07-28 15:30 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-28 16:20 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Tomi Sarvela <tomi.p.sarvela@intel.com> - 2017-07-28 16:50 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-28 17:00 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Tomi Sarvela <tomi.p.sarvela@intel.com> - 2017-07-28 17:00 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-28 18:30 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Tomi Sarvela <tomi.p.sarvela@intel.com> - 2017-07-31 09:30 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-31 09:50 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Tomi Sarvela <tomi.p.sarvela@intel.com> - 2017-07-31 10:00 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-31 10:30 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Tomi Sarvela <tomi.p.sarvela@intel.com> - 2017-07-31 10:50 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-31 16:10 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Tomi Sarvela <tomi.p.sarvela@intel.com> - 2017-07-31 16:20 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-31 17:10 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Tomi Sarvela <tomi.p.sarvela@intel.com> - 2017-07-31 17:50 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-31 18:00 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-08-03 09:40 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Peter Zijlstra <peterz@infradead.org> - 2017-08-03 10:30 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Marc Zyngier <marc.zyngier@arm.com> - 2017-08-03 10:50 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-08-03 15:00 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Marc Zyngier <marc.zyngier@arm.com> - 2017-08-03 15:40 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-08-07 06:50 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Marc Zyngier <marc.zyngier@arm.com> - 2017-08-07 10:20 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-08-08 03:40 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Marc Zyngier <marc.zyngier@arm.com> - 2017-08-08 09:40 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-08-09 06:10 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Thomas Gleixner <tglx@linutronix.de> - 2017-07-31 10:40 +0200
                Re: Suspend-resume failure on Intel Eagle Lake Core2Duo Martin Peres <martin.peres@linux.intel.com> - 2017-07-28 14:40 +0200

csiph-web