[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#635575: [linux-2.6] Will not wake up after sleep



Hi Jonathan, 

On Thursday 28 July 2011 8:37:39 Jonathan Nieder wrote:
> > After update from 2.6 kernel to 3.0 my Idepad S10-3 will not wake up
> > after sleep.  Back to latest 2.6 kernel works fine.
> Thanks for reporting it.  Basic questions:

I think I answered all these earlier, but

> If none of the above yields any hints, your best bet is probably to
> bisect to find which upstream change introduced the problem. 

I didn't have time to go through this one until now.  First of all

> 1. Build the latest upstream version and test it.

Done that and it's not working.

> Then git checks out another version to test.
> 3. Repeat until bored:

I did this and after a few days managed to narrow it down.  Here's the result 
of the final bisect:

983bbf1af0664b78689612b247acb514300f62c7 is the first bad commit
commit 983bbf1af0664b78689612b247acb514300f62c7
Author: Tian, Kevin <kevin.tian@intel.com>
Date:   Fri May 6 14:43:56 2011 +0800

    x86: Don't unmask disabled irqs when migrating them
    
    It doesn't make sense to unconditionally unmask a disabled irq when
    migrating it from offlined cpu to another. If the irq triggers then it
    will be disabled in the interrupt handler anyway. So we can just avoid
    unmasking it.
    
    [ tglx: Made masking unconditional again and fixed the changelog ]
    
    Signed-off-by: Fengzhe Zhang <fengzhe.zhang@intel.com>
    Signed-off-by: Kevin Tian <kevin.tian@intel.com>
    Cc: Ian Campbell <Ian.Campbell@citrix.com>
    Cc: Jan Beulich <JBeulich@novell.com>
    Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
    Link: 
http://lkml.kernel.org/r/%3C625BA99ED14B2D499DC4E29D8138F1505C8ED7F7E3%40shsmsx502.ccr.corp.intel.com%3E
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

:040000 040000 677f5362fb66e73824fc66ef01da8a84669ccd07 
bd7b26cc7effda3499ce3105141cb6cebd9d1f7a M      arch

I have attached the bisect.log.

I also tried to go back to HEAD and manually change arch/x86/irq.c revert this 
particular commit and it works.  Changing the current HEAD like this:

diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 6c0802e..d240ca1 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -277,7 +277,7 @@ void fixup_irqs(void)
                        set_affinity = 0;
 
                if (!irqd_can_move_in_process_context(data) &&
-                   !irqd_irq_disabled(data) && chip->irq_unmask)
+                   chip->irq_unmask)
                        chip->irq_unmask(data);
 
                raw_spin_unlock(&desc->lock);

Make my Ideapad S10-3 wake up fine after sleep.

Now, the question is how to report this upstream.  Honestly - I haven't got a 
clue.

-- 
Lars
# bad: [02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] Linux 3.0
# good: [61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf] Linux 2.6.39
git bisect start 'v3.0' 'v2.6.39'
# bad: [6b36fdd11b15b6fea900f7fa0195ca3f54a33153] ARM: mach-shmobile: AG5EVM DSI resource string update
git bisect bad 6b36fdd11b15b6fea900f7fa0195ca3f54a33153
# bad: [06f4e926d256d902dd9a53dcb400fd74974ce087] Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
git bisect bad 06f4e926d256d902dd9a53dcb400fd74974ce087
# good: [2142c131a3e290ae350f8a0b0d354c0585a96df1] net: convert to new cpumask API
git bisect good 2142c131a3e290ae350f8a0b0d354c0585a96df1
# bad: [39ab05c8e0b519ff0a04a869f065746e6e8c3d95] Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
git bisect bad 39ab05c8e0b519ff0a04a869f065746e6e8c3d95
# good: [df48d8716eab9608fe93924e4ae06ff110e8674f] Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
git bisect good df48d8716eab9608fe93924e4ae06ff110e8674f
# bad: [13588209aa90d9c8e502750fc86160314555612f] Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
git bisect bad 13588209aa90d9c8e502750fc86160314555612f
# good: [7e6628e4bcb3b3546c625ec63ca724f28ab14f0c] Merge branch 'timers-clockevents-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
git bisect good 7e6628e4bcb3b3546c625ec63ca724f28ab14f0c
# good: [bd6709a91a593d8fe35d08da542e9f93bb74a304] x86, NUMA: Make 32bit use common NUMA init path
git bisect good bd6709a91a593d8fe35d08da542e9f93bb74a304
# good: [016281880439a8665ecf37514865742da58131d4] Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
git bisect good 016281880439a8665ecf37514865742da58131d4
# bad: [ac2941f59a38eeb535e1f227a8f90d7fe6b7828b] Merge branches 'x86-efi-for-linus', 'x86-gart-for-linus', 'x86-irq-for-linus' and 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
git bisect bad ac2941f59a38eeb535e1f227a8f90d7fe6b7828b
# good: [935a638241b0658b9749edd060f972575f9d4a78] x86, efi: Ensure that the entirity of a region is mapped
git bisect good 935a638241b0658b9749edd060f972575f9d4a78
# good: [dffa4b2f62ff28c982144c7033001b1ece4d3532] x86, mce: Drop the default decoding notifier
git bisect good dffa4b2f62ff28c982144c7033001b1ece4d3532
# bad: [983bbf1af0664b78689612b247acb514300f62c7] x86: Don't unmask disabled irqs when migrating them
git bisect bad 983bbf1af0664b78689612b247acb514300f62c7
# good: [b87ba87ca26e226b2277a2d5613ed596f408e96d] x86: Skip migrating IRQF_PER_CPU irqs in fixup_irqs()
git bisect good b87ba87ca26e226b2277a2d5613ed596f408e96d

Reply to: