[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111205072806.GA2366@elte.hu>
Date: Mon, 5 Dec 2011 08:28:06 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Larry Finger <Larry.Finger@...inger.net>,
Borislav Petkov <borislav.petkov@....com>,
"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: 3.2-rc2 freezes on boot for AMD K6 - bisected to commit
bcb80e53877c2045d9e52f4a71372c3fe6501f6f
* Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> On Sat, Dec 3, 2011 at 12:43 PM, Larry Finger <Larry.Finger@...inger.net> wrote:
> > On 11/30/2011 01:09 AM, Larry Finger wrote:
> >> On 11/29/2011 11:59 PM, Srivatsa S. Bhat wrote:
> >>>
> >>> Can you please try out the patch posted in
> >>> https://lkml.org/lkml/2011/11/28/178 ?
>
> Ugh. I hate that patch.
>
> It's completely stupid. If "rdmsr_safe()" doesn't work at that point
> in the boot, then it's pointless to call it.
>
> So this change is pure and utter crap:
>
> - rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy);
> + if (c->x86 >= 0xf)
> + rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy);
>
> because it is misleading as hell: that rdmsr isn't *safe* at all, so
> why are we calling "rdmsr_safe()"?
Yeah.
> It's wrong.
>
> The right patch would either just remove the "safe" part (and
> just say that the register has to be supported if c->x86 >=
> 0xf), but quite honestly, I don't see why we do that thing in
> early_init_amd() AT ALL. Afaik, the microcode version field
> isn't really *needed* by the kernelin the first place, much
> less is it needed by the *early* boot, so why isn't this in
> 'init_amd()' a bit later when the "safe" version actually
> *works*?
>
> IOW, I think the patch should be something like the attached
> (TOTALLY UNTESTED) patch. Larry, does this work for you? It
> just moves the rdmsr_safe() to the later function.
Looks sane to me.
We can improve the early init properties some more - but there's
always going to be a chicken-and-egg problem there. At minimum
we should add a comment to rdmsr_safe() that explains its
dependencies.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists