aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven J. Hill <Steven.Hill@imgtec.com>2015-02-19 11:18:52 -0500
committerRalf Baechle <ralf@linux-mips.org>2015-02-20 06:55:18 -0500
commita5770df09541f88021390375f324b25124675355 (patch)
tree96650246db3738bde279746626a859731df9e9a5
parent05f9883a2899d50ff96f05b7a76b7597009b0680 (diff)
MIPS: Add set/clear CP0 macros for PageGrain register
Build set and clear macros for the PageGrain register. Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/9289/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/include/asm/mipsregs.h1
-rw-r--r--arch/mips/kernel/cpu-probe.c2
-rw-r--r--arch/mips/mm/tlb-r4k.c6
3 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 06346001ee4d..235469a23e99 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -1897,6 +1897,7 @@ __BUILD_SET_C0(config5)
1897__BUILD_SET_C0(intcontrol) 1897__BUILD_SET_C0(intcontrol)
1898__BUILD_SET_C0(intctl) 1898__BUILD_SET_C0(intctl)
1899__BUILD_SET_C0(srsmap) 1899__BUILD_SET_C0(srsmap)
1900__BUILD_SET_C0(pagegrain)
1900__BUILD_SET_C0(brcm_config_0) 1901__BUILD_SET_C0(brcm_config_0)
1901__BUILD_SET_C0(brcm_bus_pll) 1902__BUILD_SET_C0(brcm_bus_pll)
1902__BUILD_SET_C0(brcm_reset) 1903__BUILD_SET_C0(brcm_reset)
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 81f0aedbba0f..48dfb9de853d 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -550,7 +550,7 @@ static void decode_configs(struct cpuinfo_mips *c)
550 550
551 if (cpu_has_rixi) { 551 if (cpu_has_rixi) {
552 /* Enable the RIXI exceptions */ 552 /* Enable the RIXI exceptions */
553 write_c0_pagegrain(read_c0_pagegrain() | PG_IEC); 553 set_c0_pagegrain(PG_IEC);
554 back_to_back_c0_hazard(); 554 back_to_back_c0_hazard();
555 /* Verify the IEC bit is set */ 555 /* Verify the IEC bit is set */
556 if (read_c0_pagegrain() & PG_IEC) 556 if (read_c0_pagegrain() & PG_IEC)
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index e90b2e899291..b2afa49beab0 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -485,11 +485,11 @@ static void r4k_tlb_configure(void)
485 * Enable the no read, no exec bits, and enable large virtual 485 * Enable the no read, no exec bits, and enable large virtual
486 * address. 486 * address.
487 */ 487 */
488 u32 pg = PG_RIE | PG_XIE;
489#ifdef CONFIG_64BIT 488#ifdef CONFIG_64BIT
490 pg |= PG_ELPA; 489 set_c0_pagegrain(PG_RIE | PG_XIE | PG_ELPA);
490#else
491 set_c0_pagegrain(PG_RIE | PG_XIE);
491#endif 492#endif
492 write_c0_pagegrain(pg);
493 } 493 }
494 494
495 temp_tlb_entry = current_cpu_data.tlbsize - 1; 495 temp_tlb_entry = current_cpu_data.tlbsize - 1;