* Re: 2.6.22-rcX Transmeta/APM regression
[not found] <20070627153114.17953.qmail@science.horizon.com>
@ 2007-06-30 3:03 ` linux
0 siblings, 0 replies; 6+ messages in thread
From: linux @ 2007-06-30 3:03 UTC (permalink / raw)
To: linux-kernel, linux-pm; +Cc: bk, michal.k.k.piotrowski, linux, ak, hpa
Okay, after a ridiculous amount of bisecting and recompiling and
rebooting...
First I had to find out that the kernel stops booting as of
bf50467204: "i386: Use per-cpu GDT immediately on boot"
(With theis commit, it silently stops booting. The GP fault I
posted earlier comes a little later, but I didn't bother finding it.)
and starts again as of
b0b73cb41d: "i386: msr.h: be paranoid about types and parentheses"
However, one commit before the former suspends properly, and the latter
fails to suspend (exactly the same problem at get_fixed_ranges+0x9/0x60),
so I had to bisect further between the two, backporting the msr.h changes
across the msr-index.h splitoff.
Anyway, the patch which introduces the problem is the aptly named 3ebad:
3ebad59056: [PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending
2.6.22-rc6 plus that one commit reverted successfully does APM suspend
(and resume) for me.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.6.22-rcX Transmeta/APM regression
[not found] <20070630030343.31711.qmail@science.horizon.com>
@ 2007-06-30 4:06 ` H. Peter Anvin
2007-06-30 9:18 ` Andrew Morton
2007-06-30 9:26 ` Andi Kleen
1 sibling, 1 reply; 6+ messages in thread
From: H. Peter Anvin @ 2007-06-30 4:06 UTC (permalink / raw)
To: linux; +Cc: bk, linux-pm, linux-kernel, michal.k.k.piotrowski, ak
linux@horizon.com wrote:
>
> Anyway, the patch which introduces the problem is the aptly named 3ebad:
> 3ebad59056: [PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending
>
> 2.6.22-rc6 plus that one commit reverted successfully does APM suspend
> (and resume) for me.
Okay, I would guess that that patch probably touches MTRRs without
actually verify that the CPU *has* MTRRs -- the Transmeta Crusoe CPU
doesn't have MTRRs.
-hpa
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.6.22-rcX Transmeta/APM regression
2007-06-30 4:06 ` 2.6.22-rcX Transmeta/APM regression H. Peter Anvin
@ 2007-06-30 9:18 ` Andrew Morton
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2007-06-30 9:18 UTC (permalink / raw)
To: H. Peter Anvin
Cc: bk, michal.k.k.piotrowski, ak, linux-kernel, linux, linux-pm
On Sat, 30 Jun 2007 00:06:36 -0400 "H. Peter Anvin" <hpa@zytor.com> wrote:
> linux@horizon.com wrote:
> >
> > Anyway, the patch which introduces the problem is the aptly named 3ebad:
> > 3ebad59056: [PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending
> >
> > 2.6.22-rc6 plus that one commit reverted successfully does APM suspend
> > (and resume) for me.
>
> Okay, I would guess that that patch probably touches MTRRs without
> actually verify that the CPU *has* MTRRs -- the Transmeta Crusoe CPU
> doesn't have MTRRs.
>
This?
--- a/arch/i386/kernel/cpu/mtrr/generic.c~i386-mtrr-crash-fix
+++ a/arch/i386/kernel/cpu/mtrr/generic.c
@@ -65,7 +65,8 @@ get_fixed_ranges(mtrr_type * frs)
void mtrr_save_fixed_ranges(void *info)
{
- get_fixed_ranges(mtrr_state.fixed_ranges);
+ if (cpu_has_mtrr)
+ get_fixed_ranges(mtrr_state.fixed_ranges);
}
static void print_fixed(unsigned base, unsigned step, const mtrr_type*types)
_
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.6.22-rcX Transmeta/APM regression
[not found] <20070630030343.31711.qmail@science.horizon.com>
2007-06-30 4:06 ` 2.6.22-rcX Transmeta/APM regression H. Peter Anvin
@ 2007-06-30 9:26 ` Andi Kleen
2007-06-30 18:57 ` linux
1 sibling, 1 reply; 6+ messages in thread
From: Andi Kleen @ 2007-06-30 9:26 UTC (permalink / raw)
To: linux; +Cc: bk, linux-pm, linux-kernel, michal.k.k.piotrowski, hpa
On Saturday 30 June 2007 05:03, linux@horizon.com wrote:
> Anyway, the patch which introduces the problem is the aptly named 3ebad:
> 3ebad59056: [PATCH] x86: Save and restore the fixed-range MTRRs of the BSP
> when suspending
>
> 2.6.22-rc6 plus that one commit reverted successfully does APM suspend
> (and resume) for me.
Mr.Linux, Does that patch fix it?
-Andi
i386: Check if CPU has MTRRs before trying to save them
Signed-off-by: Andi Kleen <ak@suse.de>
Index: linux/arch/i386/kernel/cpu/mtrr/main.c
===================================================================
--- linux.orig/arch/i386/kernel/cpu/mtrr/main.c
+++ linux/arch/i386/kernel/cpu/mtrr/main.c
@@ -734,8 +734,11 @@ void mtrr_ap_init(void)
*/
void mtrr_save_state(void)
{
- int cpu = get_cpu();
+ int cpu;
+ if (!cpu_has_mtrr)
+ return;
+ cpu = get_cpu();
if (cpu == 0)
mtrr_save_fixed_ranges(NULL);
else
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.6.22-rcX Transmeta/APM regression
2007-06-30 9:26 ` Andi Kleen
@ 2007-06-30 18:57 ` linux
2007-06-30 19:08 ` Andrew Morton
0 siblings, 1 reply; 6+ messages in thread
From: linux @ 2007-06-30 18:57 UTC (permalink / raw)
To: ak, akpm, linux; +Cc: bk, linux-pm, linux-kernel, michal.k.k.piotrowski, hpa
Responding to various proposed fixes:
> Index: linux/arch/i386/kernel/cpu/mtrr/main.c
> ===================================================================
> --- linux.orig/arch/i386/kernel/cpu/mtrr/main.c
> +++ linux/arch/i386/kernel/cpu/mtrr/main.c
> @@ -734,8 +734,11 @@ void mtrr_ap_init(void)
> */
> void mtrr_save_state(void)
> {
> - int cpu = get_cpu();
> + int cpu;
>
> + if (!cpu_has_mtrr)
> + return;
> + cpu = get_cpu();
> if (cpu == 0)
> mtrr_save_fixed_ranges(NULL);
> else
This does not change the symptoms in any way.
> --- a/arch/i386/kernel/cpu/mtrr/generic.c~i386-mtrr-crash-fix
> +++ a/arch/i386/kernel/cpu/mtrr/generic.c
> @@ -65,7 +65,8 @@ get_fixed_ranges(mtrr_type * frs)
>
> void mtrr_save_fixed_ranges(void *info)
> {
> - get_fixed_ranges(mtrr_state.fixed_ranges);
> + if (cpu_has_mtrr)
> + get_fixed_ranges(mtrr_state.fixed_ranges);
> }
>
> static void print_fixed(unsigned base, unsigned step, const mtrr_type*types)
This works great, thanks! Please consider the regression diagnosed and fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.6.22-rcX Transmeta/APM regression
2007-06-30 18:57 ` linux
@ 2007-06-30 19:08 ` Andrew Morton
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2007-06-30 19:08 UTC (permalink / raw)
To: linux; +Cc: bk, michal.k.k.piotrowski, linux-kernel, ak, hpa, linux-pm
On 30 Jun 2007 14:57:06 -0400 linux@horizon.com wrote:
> > --- a/arch/i386/kernel/cpu/mtrr/generic.c~i386-mtrr-crash-fix
> > +++ a/arch/i386/kernel/cpu/mtrr/generic.c
> > @@ -65,7 +65,8 @@ get_fixed_ranges(mtrr_type * frs)
> >
> > void mtrr_save_fixed_ranges(void *info)
> > {
> > - get_fixed_ranges(mtrr_state.fixed_ranges);
> > + if (cpu_has_mtrr)
> > + get_fixed_ranges(mtrr_state.fixed_ranges);
> > }
> >
> > static void print_fixed(unsigned base, unsigned step, const mtrr_type*types)
>
> This works great, thanks! Please consider the regression diagnosed and fixed.
OK, thanks. I'll scoot that linuswards later today.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-06-30 19:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20070630030343.31711.qmail@science.horizon.com>
2007-06-30 4:06 ` 2.6.22-rcX Transmeta/APM regression H. Peter Anvin
2007-06-30 9:18 ` Andrew Morton
2007-06-30 9:26 ` Andi Kleen
2007-06-30 18:57 ` linux
2007-06-30 19:08 ` Andrew Morton
[not found] <20070627153114.17953.qmail@science.horizon.com>
2007-06-30 3:03 ` linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox