MIPS: Loongson: CS5536: Fix ISA support
authorWu Zhangjin <wuzhangjin@gmail.com>
Wed, 19 May 2010 01:14:18 +0000 (09:14 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 5 Jul 2010 16:17:22 +0000 (17:17 +0100)
The function _wrmsr() called by divil_lbar_disable()/enable() should be
called with the offset as the argument.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Zhang Le <r0bertz@gentoo.org>
Patchwork: http://patchwork.linux-mips.org/patch/1252/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/loongson/common/cs5536/cs5536_isa.c

index f5c0818831b25a30e3c240a653c2cf3280aa4f12..4d9f65abeaffcca0d50ac196594fd7620d2fa290 100644 (file)
@@ -61,7 +61,7 @@ static void divil_lbar_enable(void)
        for (offset = DIVIL_LBAR_SMB; offset <= DIVIL_LBAR_PMS; offset++) {
                _rdmsr(DIVIL_MSR_REG(offset), &hi, &lo);
                hi |= 0x01;
-               _wrmsr(DIVIL_MSR_REG(DIVIL_LBAR_SMB), hi, lo);
+               _wrmsr(DIVIL_MSR_REG(offset), hi, lo);
        }
 }
 
@@ -76,7 +76,7 @@ static void divil_lbar_disable(void)
        for (offset = DIVIL_LBAR_SMB; offset <= DIVIL_LBAR_PMS; offset++) {
                _rdmsr(DIVIL_MSR_REG(offset), &hi, &lo);
                hi &= ~0x01;
-               _wrmsr(DIVIL_MSR_REG(DIVIL_LBAR_SMB), hi, lo);
+               _wrmsr(DIVIL_MSR_REG(offset), hi, lo);
        }
 }