提交 40854670 编写于 作者: W Wu Zhangjin 提交者: Ralf Baechle

MIPS: Loongson: CS5536: Fix ISA support

The function _wrmsr() called by divil_lbar_disable()/enable() should be
called with the offset as the argument.
Signed-off-by: NWu 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: NRalf Baechle <ralf@linux-mips.org>
上级 aa5f858b
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册