MIPS: Loongson: Fix LOONGSON_ADDRWIN_CFG macro.
authorArnaud Patard <apatard@mandriva.com>
Thu, 29 Apr 2010 09:58:51 +0000 (11:58 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 30 Apr 2010 19:52:51 +0000 (20:52 +0100)
There's a typo in the LOONGSON_ADDRWIN_CFG macro. The cpu window mmap
register address should contain the destination parameters not the
source one.  This has not been noticed because the code is only using
source = destination.

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1162/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/mach-loongson/loongson.h

index 1cf7b14..fcdbe3a 100644 (file)
@@ -307,7 +307,7 @@ extern unsigned long _loongson_addrwincfg_base;
  */
 #define LOONGSON_ADDRWIN_CFG(s, d, w, src, dst, size) do {\
        s##_WIN##w##_BASE = (src); \
-       s##_WIN##w##_MMAP = (src) | ADDRWIN_MAP_DST_##d; \
+       s##_WIN##w##_MMAP = (dst) | ADDRWIN_MAP_DST_##d; \
        s##_WIN##w##_MASK = ~(size-1); \
 } while (0)