Skip to contentSkip to conversation

Commit 9f15226e755 breaks resume on Toshiba Portege R500

Regression, 2.6.32->33-rc1 Rafael J. Wysocki 1 participant 3 messages Dec 23, 2009

lore
Share & tools
lore
#0 lore raw

Hi Andreas,

Unfortunately your commit 9f15226e75583547aaf542c6be4bdac1060dd425 (x86, ucode-amd: Ensure ucode update on suspend/resume after CPU off/online cycle) breaks resume from suspend to RAM on my Toshiba Portege R500 (an attempt to resume causes a hard hang with 100% CPU load, reproducible 100% of the time). This has been found by bisection and confirmed by reverting this commit on top of 2.6.33-rc1.

Strangely enough, the box doesn't even have an AMD CPU, there's an Intel Core2 Duo in it, so I suspect some missing check somewhere.

If I have the time, I'll look deeper into this tomorrow.

[BTW, I can't recall seeing this patch before. That very well may be my fault, but please make sure that CCs of suspend-related patches are sent to me in future.]

Rafael

#1 lore raw
Quoted 9 lines · Rafael J. Wysocki

Hi Andreas,

Unfortunately your commit 9f15226e75583547aaf542c6be4bdac1060dd425 (x86, ucode-amd: Ensure ucode update on suspend/resume after CPU off/online cycle) breaks resume from suspend to RAM on my Toshiba Portege R500 (an attempt to resume causes a hard hang with 100% CPU load, reproducible 100% of the time). This has been found by bisection and confirmed by reverting this commit on top of 2.6.33-rc1.

Quoted 4 lines

Strangely enough, the box doesn't even have an AMD CPU, there's an Intel Core2 Duo in it, so I suspect some missing check somewhere.

If I have the time, I'll look deeper into this tomorrow.

I think commit 9f15226e755 is wrong, since it causes microcode_init_cpu() to be called during resume even for CPUs for which there's no microcode to apply. That, in turn, results in executing request_firmware() (on Intel CPUs at least) which doesn't work at this stage of resume (we have device interrupts disabled, I/O devices are still suspended and so on).

If I'm not mistaken, the "if (uci->valid)" logic means "if that CPU is known to us" , so before commit 9f15226e755 microcode_resume_cpu() was called for all CPUs already in the system during suspend, which was the right thing to do. The commit changed it so that the CPUs without microcode to apply are now treated as "unknown", which is not quite right.

The problem this commit attempted to solve has to be handled differently.

Linus, please revert commit 9f15226e755.

Rafael

#2 lore raw
In reply to Rafael J. Wysocki
Quoted 9 lines · Rafael J. Wysocki

Hi Andreas,

Unfortunately your commit 9f15226e75583547aaf542c6be4bdac1060dd425 (x86, ucode-amd: Ensure ucode update on suspend/resume after CPU off/online cycle) breaks resume from suspend to RAM on my Toshiba Portege R500 (an attempt to resume causes a hard hang with 100% CPU load, reproducible 100% of the time). This has been found by bisection and confirmed by reverting this commit on top of 2.6.33-rc1.

Quoted 4 lines

Strangely enough, the box doesn't even have an AMD CPU, there's an Intel Core2 Duo in it, so I suspect some missing check somewhere.

If I have the time, I'll look deeper into this tomorrow.

I think commit 9f15226e755 is wrong, since it causes microcode_init_cpu() to be called during resume even for CPUs for which there's no microcode to apply. That, in turn, results in executing request_firmware() (on Intel CPUs at least) which doesn't work at this stage of resume (we have device interrupts disabled, I/O devices are still suspended and so on).

If I'm not mistaken, the "if (uci->valid)" logic means "if that CPU is known to us" , so before commit 9f15226e755 microcode_resume_cpu() was called for all CPUs already in the system during suspend, which was the right thing to do. The commit changed it so that the CPUs without microcode to apply are now treated as "unknown", which is not quite right.

The problem this commit attempted to solve has to be handled differently.

Linus, please revert commit 9f15226e755.

Rafael