Skip to contentSkip to conversation

loongson.h: Fix LOONGSON_ADDRWIN_CFG macro

PATCH Applied Arnaud Patard 2 participants 2 messages Apr 29, 2010 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 loongson.h: Fix LOONGSON_ADDRWIN_CFG macro

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)

---

arch/mips/include/asm/mach-loongson/loongson.h +1 -1
Index: 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)
 
Applied
#1 lore raw
Quoted 6 lines · Arnaud Patard

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)

Thanks, applied as well.

Ralf