Skip to content

Commit

Permalink
MIPS: Loongson64: Do not write the read only field LPA of CP0_CONFIG3
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
  • Loading branch information
Tiezhu Yang authored and tsbogend committed Nov 11, 2020
1 parent 4abaacc commit 4d1b3ac
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
8 changes: 0 additions & 8 deletions arch/mips/include/asm/mach-loongson64/kernel-entry-init.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
.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)
Expand Down Expand Up @@ -54,10 +50,6 @@
.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)
Expand Down
3 changes: 0 additions & 3 deletions arch/mips/loongson64/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,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);

Expand Down

0 comments on commit 4d1b3ac

Please sign in to comment.