Re: [PATCH] PM / OPP: fix CPU device to be removed from OPP table in wrong order
From: Joonyoung Shim
Date: Fri Nov 25 2016 - 02:30:02 EST
On 11/25/2016 03:57 PM, Viresh Kumar wrote:
> On 25-11-16, 10:54, Joonyoung Shim wrote:
>> I found this problem during system suspend/resume of Odroid-XU3 board.
>> # rtcwake -m mem -s 3
>> wakeup from "mem" at Wed Apr 4 05:54:44 2001
>> [ 15.965996] PM: Syncing filesystems ... done.
>> [ 15.976333] Freezing user space processes ... (elapsed 0.002 seconds) done.
>> [ 15.983287] Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
>> [ 16.006951] wake enabled for irq 135
>> [ 16.008782] smsc95xx 1-1.1:1.0 eth0: entering SUSPEND2 mode
>> [ 16.094110] PM: suspend of devices complete after 95.038 msecs
>> [ 16.105648] PM: late suspend of devices complete after 6.903 msecs
>> [ 16.116356] PM: noirq suspend of devices complete after 5.912 msecs
>> [ 16.121213] Disabling non-boot CPUs ...
>> [ 16.154140] IRQ51 no longer affine to CPU1
>> [ 16.154709] CPU1: shutdown
>> [ 16.214148] IRQ52 no longer affine to CPU2
>> [ 16.214646] CPU2: shutdown
>> [ 16.273980] IRQ53 no longer affine to CPU3
>> [ 16.274458] CPU3: shutdown
>> [ 16.335093] IRQ54 no longer affine to CPU4
>> [ 16.336033] CPU4: shutdown
>> [ 16.389979] IRQ55 no longer affine to CPU5
>> [ 16.390823] CPU5: shutdown
>> [ 16.444829] IRQ56 no longer affine to CPU6
>> [ 16.445621] CPU6: shutdown
>> [ 16.509229] cpu cpu4: Failed to find opp_table: -19
>> [ 16.514008] IRQ57 no longer affine to CPU7
>> [ 16.514824] CPU7: shutdown
> Yes you have found a real bug it seems. I think that can be reproduced
> by a simple rmmmod of cpufreq-dt.ko module as well.
> Though the solution you provided isn't good enough.
> Consider for example a case where you do this:
> - offline CPU 4
> - suspend the system
> You are going to get stuck in the exact same problem again.
> I have sent a separate patch and cc'd you. Can you please verify that
> it works for you ?
Thanks for the patch, i tested it and it is working well.