lkml.org 
[lkml]   [2008]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] 2.6.25-rc2-git8 fails to boot on 486 due to TSC breakage
Mikael Pettersson wrote:
>
> Here's how the breakage occurs:
> 1. arch/x86/kernel/tsc_32.c:tsc_init() sees !cpu_has_tsc,
> so bails and calls setup_clear_cpu_cap(X86_FEATURE_TSC).
> 2. include/asm-x86/cpufeature.h:setup_clear_cpu_cap(bit) clears
> the bit in boot_cpu_data and sets it in cleared_cpu_caps
> 3. arch/x86/kernel/cpu/common.c:identify_cpu() XORs all caps
> in with cleared_cpu_caps
> HOWEVER, at this point c->x86_capability correctly has TSC
> Off, cleared_cpu_caps has TSC On, so the XOR incorrectly
> sets TSC to On in c->x86_capability, with disastrous results.
>
> The real bug is that clearing bits with XOR only works if the
> bits are known to be 1 prior to the XOR, and that's not true here.
>
> A simple fix is to convert the XOR to AND-NOT instead. The following
> patch does that, and allows my 486 to boot 2.6.25-rc kernels again.
>

Please fix it in both places. Using XOR instead of AND-NOT is a bug,
plain and simple.

-hpa


\
 
 \ /
  Last update: 2008-02-25 02:05    [W:0.076 / U:3.464 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site