Skip to contentSkip to conversation

Cyrix/mtrr fix missing from 2.4.3

PATCH Bob_Tracy 1 participant 1 message Apr 3, 2001

lore
Share & tools
lore

Bob_Tracy

author
#0 lore raw

The following fix was omitted from 2.4.3. It corrects a problem where the mtrr code attempts to set up a region twice as large as the user requested.

The original message appeared in linux-kernel on 14 Mar 2001.

--Bob Tracy

----- Forwarded message from David Wragg -----

Quoted 2 lines

From: David Wragg <[email protected]>
Date: 14 Mar 2001 22:57:21 +0000

Oops, it got broken by the MTRR >32-bit support in 2.4.0-testX. The patch below should fix it.

Joerg, I think this might well fix your Cyrix mtrr problem also.

Let me know how it goes,
Dave Wragg

arch/i386/kernel/mtrr.c +1 -1
diff -uar linux-2.4.2/arch/i386/kernel/mtrr.c linux-2.4.2.cyrix/arch/i386/kernel/mtrr.c
@@ -538,7 +538,7 @@
      * Note: shift==0xf means 4G, this is unsupported.
      */
     if (shift)
-      *size = (reg < 7 ? 0x1UL : 0x40UL) << shift;
+      *size = (reg < 7 ? 0x1UL : 0x40UL) << (shift - 1);
     else
       *size = 0;
 

----- End of forwarded message from David Wragg -----