linux-mips
[Top] [All Lists]

[PATCH] loongson.h: Fix LOONGSON_ADDRWIN_CFG macro

To: linux-mips@linux-mips.org
Subject: [PATCH] loongson.h: Fix LOONGSON_ADDRWIN_CFG macro
From: Arnaud Patard <apatard@mandriva.com>
Date: Thu, 29 Apr 2010 11:58:51 +0200
Organization: Mandriva
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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>
---
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)
 
<Prev in Thread] Current Thread [Next in Thread>