diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch new file mode 100644 index 00000000..b800a3ea --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 1ca189655bf3edf14c4837eba5873fc9c50f7e15 Mon Sep 17 00:00:00 2001 | ||
2 | From: Thomas Renninger <trenn@suse.de> | ||
3 | Date: Sun, 4 Dec 2011 22:17:29 +0100 | ||
4 | Subject: [PATCH 098/130] intel idle: Make idle driver more robust | ||
5 | |||
6 | commit 5c2a9f06a9cd7194f884cdc88144866235dec07d upstream. | ||
7 | |||
8 | kvm -cpu host passes the original cpuid info to the guest. | ||
9 | |||
10 | Latest kvm version seem to return true for mwait_leaf cpuid | ||
11 | function on recent Intel CPUs. But it does not return mwait | ||
12 | C-states (mwait_substates), instead zero is returned. | ||
13 | |||
14 | While real CPUs seem to always return non-zero values, the intel | ||
15 | idle driver should not get active in kvm (mwait_substates == 0) | ||
16 | case and bail out. | ||
17 | Otherwise a Null pointer exception will happen later when the | ||
18 | cpuidle subsystem tries to get active: | ||
19 | [0.984807] BUG: unable to handle kernel NULL pointer dereference at (null) | ||
20 | [0.984807] IP: [<(null)>] (null) | ||
21 | ... | ||
22 | [0.984807][<ffffffff8143cf34>] ? cpuidle_idle_call+0xb4/0x340 | ||
23 | [0.984807][<ffffffff8159e7bc>] ? __atomic_notifier_call_chain+0x4c/0x70 | ||
24 | [0.984807][<ffffffff81001198>] ? cpu_idle+0x78/0xd0 | ||
25 | |||
26 | Reference: | ||
27 | https://bugzilla.novell.com/show_bug.cgi?id=726296 | ||
28 | |||
29 | Signed-off-by: Thomas Renninger <trenn@suse.de> | ||
30 | CC: Bruno Friedmann <bruno@ioda-net.ch> | ||
31 | Signed-off-by: Len Brown <len.brown@intel.com> | ||
32 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
33 | --- | ||
34 | drivers/idle/intel_idle.c | 3 ++- | ||
35 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
36 | |||
37 | diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c | ||
38 | index 5d2f8e1..1dafcc3 100644 | ||
39 | --- a/drivers/idle/intel_idle.c | ||
40 | +++ b/drivers/idle/intel_idle.c | ||
41 | @@ -348,7 +348,8 @@ static int intel_idle_probe(void) | ||
42 | cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &mwait_substates); | ||
43 | |||
44 | if (!(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) || | ||
45 | - !(ecx & CPUID5_ECX_INTERRUPT_BREAK)) | ||
46 | + !(ecx & CPUID5_ECX_INTERRUPT_BREAK) || | ||
47 | + !mwait_substates) | ||
48 | return -ENODEV; | ||
49 | |||
50 | pr_debug(PREFIX "MWAIT substates: 0x%x\n", mwait_substates); | ||
51 | -- | ||
52 | 1.7.7.4 | ||
53 | |||