[lkml]   [2000]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] 2.4.0-test2: %cr4 in a register dump
Followup to:  <>
By author: Linus Torvalds <>
In newsgroup:
> >
> > this is aesthetically bogus. i think you should always print CR4,
> > no matter whether it's 0 or not.
> If I remember correctly, there are CPU's out there that will bomb out
> horribly when you access %cr4 if the register doesn't exist.

They will #GP, yes. If you want to read %cr4 unconditionally you have
to be prepared to trap the #GP.

> Do I remember wrong?
> I'd certainly agree with printing out cr4 even if it would be zero, I just
> disagree very much with adding a register read to the dump output that may
> cause an infinite regression of traps..

Indeed. %cr4 was introduced in the P5; I believe it is probably a
valid assumption that if the CPU has CPUID it also has %cr4 (the later
486's which had CPUID also had VME, so they must have supported %cr4.)


<> at work, <> in private!
"Unix gives you enough rope to shoot yourself in the foot."

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:57    [W:0.127 / U:7.760 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site