diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-09-04 12:04:45 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-09-04 12:04:45 -0400 |
commit | fe47784ba5cbb6b713c013e046859946789b45e4 (patch) | |
tree | 6384958d55e29be0d2eb8ae78fa437c10636d8d6 /arch/x86/power/cpu_32.c | |
parent | 83b8e28b14d63db928cb39e5c5ed2a548246bd71 (diff) | |
parent | af2e1f276ff08f17192411ea3b71c13a758dfe12 (diff) |
Merge branch 'x86/cpu' into x86/xsave
Conflicts:
arch/x86/kernel/cpu/feature_names.c
include/asm-x86/cpufeature.h
Diffstat (limited to 'arch/x86/power/cpu_32.c')
-rw-r--r-- | arch/x86/power/cpu_32.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/power/cpu_32.c b/arch/x86/power/cpu_32.c index 02f36f53558c..274d06082f48 100644 --- a/arch/x86/power/cpu_32.c +++ b/arch/x86/power/cpu_32.c | |||
@@ -46,7 +46,7 @@ static void __save_processor_state(struct saved_context *ctxt) | |||
46 | ctxt->cr0 = read_cr0(); | 46 | ctxt->cr0 = read_cr0(); |
47 | ctxt->cr2 = read_cr2(); | 47 | ctxt->cr2 = read_cr2(); |
48 | ctxt->cr3 = read_cr3(); | 48 | ctxt->cr3 = read_cr3(); |
49 | ctxt->cr4 = read_cr4(); | 49 | ctxt->cr4 = read_cr4_safe(); |
50 | } | 50 | } |
51 | 51 | ||
52 | /* Needed by apm.c */ | 52 | /* Needed by apm.c */ |
@@ -99,7 +99,9 @@ static void __restore_processor_state(struct saved_context *ctxt) | |||
99 | /* | 99 | /* |
100 | * control registers | 100 | * control registers |
101 | */ | 101 | */ |
102 | write_cr4(ctxt->cr4); | 102 | /* cr4 was introduced in the Pentium CPU */ |
103 | if (ctxt->cr4) | ||
104 | write_cr4(ctxt->cr4); | ||
103 | write_cr3(ctxt->cr3); | 105 | write_cr3(ctxt->cr3); |
104 | write_cr2(ctxt->cr2); | 106 | write_cr2(ctxt->cr2); |
105 | write_cr0(ctxt->cr0); | 107 | write_cr0(ctxt->cr0); |