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@xxxxxxxxxxxx> ---
Index: linux-2.6/arch/mips/include/asm/mach-loongson/loongson.h =================================================================== --- linux-2.6.orig/arch/mips/include/asm/mach-loongson/loongson.h +++ linux-2.6/arch/mips/include/asm/mach-loongson/loongson.h @@ -307,7 +307,7 @@ extern unsigned long _loongson_addrwincf */ #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)