login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
August
»
18
Re: [PATCH] Fix i486 suspend to disk CR4 oops
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: H. Peter Anvin
Subject:
Re: [PATCH] Fix i486 suspend to disk CR4 oops
Date: Sunday, August 17, 2008 - 9:35 pm
Maciej W. Rozycki wrote:
quoted text
> On Sun, 17 Aug 2008, David Fries wrote: > >> arch/x86/power/cpu_32.c __save_processor_state calls read_cr4() >> only a i486 CPU doesn't have the CR4 register. Trying to read it >> produces an invalid opcode oops during suspend to disk. > [...] >> diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c >> index 81e5ab6..bd0f2a3 100644 >> --- a/arch/x86/kernel/acpi/sleep.c >> +++ b/arch/x86/kernel/acpi/sleep.c >> @@ -86,7 +86,9 @@ int acpi_save_state_mem(void) >> #endif /* !CONFIG_64BIT */ >> >> header->pmode_cr0 = read_cr0(); >> - header->pmode_cr4 = read_cr4(); >> + /* cr4 was introduced in the Pentium CPU */ >> + if (boot_cpu_data.x86 >= 5) >> + header->pmode_cr4 = read_cr4(); >> header->realmode_flags = acpi_realmode_flags; >> header->real_magic = 0x12345678; >> > > NACK. Later i486 chips do have CR4 -- for PSE, VME, etc. (the set of > features varies across the line). Use a fixup as elsewhere or something. >
The other alternative is to probe for the CPUID instruction (via EFLAGS.ID) -- CR4 is present if and only if CPUID exists. -hpa --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] Fix i486 suspend to disk CR4 oops
, David Fries
, (Sun Aug 17, 9:03 pm)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Maciej W. Rozycki
, (Sun Aug 17, 9:14 pm)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, H. Peter Anvin
, (Sun Aug 17, 9:35 pm)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Andi Kleen
, (Sun Aug 17, 11:04 pm)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, H. Peter Anvin
, (Sun Aug 17, 11:34 pm)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Ingo Molnar
, (Sun Aug 17, 11:41 pm)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Andi Kleen
, (Sun Aug 17, 11:42 pm)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, H. Peter Anvin
, (Sun Aug 17, 11:45 pm)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Pavel Machek
, (Mon Aug 18, 2:15 am)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Rafael J. Wysocki
, (Mon Aug 18, 3:16 am)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, David Fries
, (Mon Aug 18, 5:58 am)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Ingo Molnar
, (Mon Aug 18, 6:25 am)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Maciej W. Rozycki
, (Mon Aug 18, 7:38 am)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Maciej W. Rozycki
, (Mon Aug 18, 7:41 am)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Dave Jones
, (Mon Aug 18, 8:24 am)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Lennart Sorensen
, (Mon Aug 18, 9:04 am)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Dave Jones
, (Mon Aug 18, 10:17 am)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, H. Peter Anvin
, (Mon Aug 18, 10:32 am)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Pavel Machek
, (Mon Aug 18, 3:02 pm)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, Pavel Machek
, (Mon Aug 18, 3:04 pm)
Re: [PATCH] Fix i486 suspend to disk CR4 oops
, H. Peter Anvin
, (Mon Aug 18, 3:10 pm)
Re: [PATCH] i486 CR4 oops, no_console_suspend
, David Fries
, (Mon Aug 18, 8:37 pm)
Re: [PATCH] i486 CR4 oops, no_console_suspend
, Ingo Molnar
, (Tue Aug 19, 2:34 am)
Re: [PATCH] i486 CR4 oops, no_console_suspend
, H. Peter Anvin
, (Tue Aug 19, 9:07 am)
Re: [PATCH] i486 CR4 oops, no_console_suspend
, David Fries
, (Wed Aug 20, 9:17 pm)
Re: [PATCH] i486 CR4 oops, no_console_suspend
, H. Peter Anvin