lkml.org 
[lkml]   [2011]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.38.2 breaks suspend to disk
On 04/01/2011 12:54 PM, Yinghai Lu wrote:
>
> ok, please check if you are happy with this one.
>

The best would simply be:

mmu_cr4_features = read_cr4_safe();

If this has to run before we can handle exceptions, one can verify the
existence by testing for the CPUID instruction (a CPU has CR4 if and
only if it has CPUID):

if (boot_cpu_data.cpuid_level >= 0)
mmu_cr4_features = read_cr4_safe();

... since we set cpuid_level to -1 if there is no CPUID instruction.

-hpa


\
 
 \ /
  Last update: 2011-04-01 22:25    [W:0.090 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site