MIPS: Loongson64: Do not write the read only field LPA of CP0_CONFIG3
authorTiezhu Yang <yangtiezhu@loongson.cn>
Tue, 3 Nov 2020 07:12:00 +0000 (15:12 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 11 Nov 2020 22:51:47 +0000 (23:51 +0100)
The field LPA of CP0_CONFIG3 register is read only for Loongson64, so the
write operations are meaningless, remove them.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/mach-loongson64/kernel-entry-init.h
arch/mips/loongson64/numa.c

index 87a5bfb..e4d77f4 100644 (file)
        .macro  kernel_entry_setup
        .set    push
        .set    mips64
-       /* Set LPA on LOONGSON3 config3 */
-       mfc0    t0, CP0_CONFIG3
-       or      t0, (0x1 << 7)
-       mtc0    t0, CP0_CONFIG3
        /* Set ELPA on LOONGSON3 pagegrain */
        mfc0    t0, CP0_PAGEGRAIN
        or      t0, (0x1 << 29)
        .macro  smp_slave_setup
        .set    push
        .set    mips64
-       /* Set LPA on LOONGSON3 config3 */
-       mfc0    t0, CP0_CONFIG3
-       or      t0, (0x1 << 7)
-       mtc0    t0, CP0_CONFIG3
        /* Set ELPA on LOONGSON3 pagegrain */
        mfc0    t0, CP0_PAGEGRAIN
        or      t0, (0x1 << 29)
index cf9459f..c7e3cce 100644 (file)
@@ -40,9 +40,6 @@ static void enable_lpa(void)
        unsigned long value;
 
        value = __read_32bit_c0_register($16, 3);
-       value |= 0x00000080;
-       __write_32bit_c0_register($16, 3, value);
-       value = __read_32bit_c0_register($16, 3);
        pr_info("CP0_Config3: CP0 16.3 (0x%lx)\n", value);
 
        value = __read_32bit_c0_register($5, 1);