On Thursday 19 July 2007 09:17, Andres Salomon wrote:
> On Thu, 19 Jul 2007 08:49:05 +0200
>
> Juergen Beisert <[email protected]> wrote:
> > On Thursday 19 July 2007 03:02, Andrew Morton wrote:
> > > On Sun, 15 Jul 2007 21:06:27 +0200
> > >
> > > Juergen Beisert <[email protected]> wrote:
> > > > Replace NSC/Cyrix specific chipset access macros by inlined
> > > > functions. With the macros a line like this fails (and does nothing):
> > > > setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
> > > > With inlined functions this line will work as expected.
> > >
> > > I don't get it. Why would the macros behave differently from inlined
> > > functions?
> >
> > X86 magic. The access order is important. The first access must always be
> > the offset at 0x22. This access enables the next access to 0x23 (data).
> > If you do it in wrong order, it fails. With the macros you get something
> > like 0x22, 0x22, 0x23, 0x23. With the inline functions
> > 0x22,0x23,0x22,0x23.
> >
> > Juergen
>
> Wow, that's a really cool bug; nice work! Don't forget to update
> arch/i386/kernel/cpu/mtrr/state.c, though; it uses setCx86() as well. It
> needs to include processor-cyrix.h.
>
>
> Acked-by: Andres Salomon <[email protected]>
Missing include patch attached. Thanks.
Juergen
Index: arch/i386/kernel/cpu/mtrr/state.c
===================================================================
--- arch/i386/kernel/cpu/mtrr/state.c
+++ arch/i386/kernel/cpu/mtrr/state.c
@@ -3,6 +3,7 @@
#include <asm/io.h>
#include <asm/mtrr.h>
#include <asm/msr.h>
+#include <asm/processor-cyrix.h>
#include "mtrr.h"
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]