]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
MIPS: Add set/clear CP0 macros for PageGrain register
authorSteven J. Hill <Steven.Hill@imgtec.com>
Thu, 19 Feb 2015 16:18:52 +0000 (10:18 -0600)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 20 Feb 2015 11:55:18 +0000 (12:55 +0100)
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>
arch/mips/include/asm/mipsregs.h
arch/mips/kernel/cpu-probe.c
arch/mips/mm/tlb-r4k.c

index 06346001ee4d579628ea5e62ecf4044493987854..235469a23e99a29d6f1157a84c915f3d81bdaff5 100644 (file)
@@ -1897,6 +1897,7 @@ __BUILD_SET_C0(config5)
 __BUILD_SET_C0(intcontrol)
 __BUILD_SET_C0(intctl)
 __BUILD_SET_C0(srsmap)
+__BUILD_SET_C0(pagegrain)
 __BUILD_SET_C0(brcm_config_0)
 __BUILD_SET_C0(brcm_bus_pll)
 __BUILD_SET_C0(brcm_reset)
index 81f0aedbba0f0f06389a503bcaed3036ac67c940..48dfb9de853ddc92ebf4254a95e400b0db5e1789 100644 (file)
@@ -550,7 +550,7 @@ static void decode_configs(struct cpuinfo_mips *c)
 
        if (cpu_has_rixi) {
                /* Enable the RIXI exceptions */
-               write_c0_pagegrain(read_c0_pagegrain() | PG_IEC);
+               set_c0_pagegrain(PG_IEC);
                back_to_back_c0_hazard();
                /* Verify the IEC bit is set */
                if (read_c0_pagegrain() & PG_IEC)
index e90b2e899291620ee8d1b89f8674bf93b5450274..b2afa49beab082116e282f8b043cb2a65e4c06ce 100644 (file)
@@ -485,11 +485,11 @@ static void r4k_tlb_configure(void)
                 * Enable the no read, no exec bits, and enable large virtual
                 * address.
                 */
-               u32 pg = PG_RIE | PG_XIE;
 #ifdef CONFIG_64BIT
-               pg |= PG_ELPA;
+               set_c0_pagegrain(PG_RIE | PG_XIE | PG_ELPA);
+#else
+               set_c0_pagegrain(PG_RIE | PG_XIE);
 #endif
-               write_c0_pagegrain(pg);
        }
 
        temp_tlb_entry = current_cpu_data.tlbsize - 1;