aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2016-05-27 17:25:22 -0400
committerRalf Baechle <ralf@linux-mips.org>2016-05-28 06:35:11 -0400
commit6446e6cf440f6ee0f8b64c32968a8434205c1f59 (patch)
tree9590feb6ef941e46c1c78625f0191ab49853b86f /arch
parentf46d92e86d21da7eb3b06e0675272ef57e1b8565 (diff)
MIPS: Add 64-bit HTW fields
Add field definitions for some of the 64-bit specific Hardware page Table Walker (HTW) register fields in PWSize and PWCtl, in preparation for fixing the 64-bit HTW configuration. Also print these fields out along with the others in print_htw_config(). Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13363/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/asm/mipsregs.h8
-rw-r--r--arch/mips/mm/tlbex.c8
2 files changed, 14 insertions, 2 deletions
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 3a062ae933a4..e1ca65c62f6a 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -729,6 +729,8 @@
729#define MIPS_PWFIELD_PTEI_SHIFT 0 729#define MIPS_PWFIELD_PTEI_SHIFT 0
730#define MIPS_PWFIELD_PTEI_MASK 0x0000003f 730#define MIPS_PWFIELD_PTEI_MASK 0x0000003f
731 731
732#define MIPS_PWSIZE_PS_SHIFT 30
733#define MIPS_PWSIZE_PS_MASK 0x40000000
732#define MIPS_PWSIZE_GDW_SHIFT 24 734#define MIPS_PWSIZE_GDW_SHIFT 24
733#define MIPS_PWSIZE_GDW_MASK 0x3f000000 735#define MIPS_PWSIZE_GDW_MASK 0x3f000000
734#define MIPS_PWSIZE_UDW_SHIFT 18 736#define MIPS_PWSIZE_UDW_SHIFT 18
@@ -742,6 +744,12 @@
742 744
743#define MIPS_PWCTL_PWEN_SHIFT 31 745#define MIPS_PWCTL_PWEN_SHIFT 31
744#define MIPS_PWCTL_PWEN_MASK 0x80000000 746#define MIPS_PWCTL_PWEN_MASK 0x80000000
747#define MIPS_PWCTL_XK_SHIFT 28
748#define MIPS_PWCTL_XK_MASK 0x10000000
749#define MIPS_PWCTL_XS_SHIFT 27
750#define MIPS_PWCTL_XS_MASK 0x08000000
751#define MIPS_PWCTL_XU_SHIFT 26
752#define MIPS_PWCTL_XU_MASK 0x04000000
745#define MIPS_PWCTL_DPH_SHIFT 7 753#define MIPS_PWCTL_DPH_SHIFT 7
746#define MIPS_PWCTL_DPH_MASK 0x00000080 754#define MIPS_PWCTL_DPH_MASK 0x00000080
747#define MIPS_PWCTL_HUGEPG_SHIFT 6 755#define MIPS_PWCTL_HUGEPG_SHIFT 6
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 274da90adf0d..c363890368cd 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -2361,8 +2361,9 @@ static void print_htw_config(void)
2361 (config & MIPS_PWFIELD_PTEI_MASK) >> MIPS_PWFIELD_PTEI_SHIFT); 2361 (config & MIPS_PWFIELD_PTEI_MASK) >> MIPS_PWFIELD_PTEI_SHIFT);
2362 2362
2363 config = read_c0_pwsize(); 2363 config = read_c0_pwsize();
2364 pr_debug("PWSize (0x%0*lx): GDW: 0x%02lx UDW: 0x%02lx MDW: 0x%02lx PTW: 0x%02lx PTEW: 0x%02lx\n", 2364 pr_debug("PWSize (0x%0*lx): PS: 0x%lx GDW: 0x%02lx UDW: 0x%02lx MDW: 0x%02lx PTW: 0x%02lx PTEW: 0x%02lx\n",
2365 field, config, 2365 field, config,
2366 (config & MIPS_PWSIZE_PS_MASK) >> MIPS_PWSIZE_PS_SHIFT,
2366 (config & MIPS_PWSIZE_GDW_MASK) >> MIPS_PWSIZE_GDW_SHIFT, 2367 (config & MIPS_PWSIZE_GDW_MASK) >> MIPS_PWSIZE_GDW_SHIFT,
2367 (config & MIPS_PWSIZE_UDW_MASK) >> MIPS_PWSIZE_UDW_SHIFT, 2368 (config & MIPS_PWSIZE_UDW_MASK) >> MIPS_PWSIZE_UDW_SHIFT,
2368 (config & MIPS_PWSIZE_MDW_MASK) >> MIPS_PWSIZE_MDW_SHIFT, 2369 (config & MIPS_PWSIZE_MDW_MASK) >> MIPS_PWSIZE_MDW_SHIFT,
@@ -2370,9 +2371,12 @@ static void print_htw_config(void)
2370 (config & MIPS_PWSIZE_PTEW_MASK) >> MIPS_PWSIZE_PTEW_SHIFT); 2371 (config & MIPS_PWSIZE_PTEW_MASK) >> MIPS_PWSIZE_PTEW_SHIFT);
2371 2372
2372 pwctl = read_c0_pwctl(); 2373 pwctl = read_c0_pwctl();
2373 pr_debug("PWCtl (0x%x): PWEn: 0x%x DPH: 0x%x HugePg: 0x%x Psn: 0x%x\n", 2374 pr_debug("PWCtl (0x%x): PWEn: 0x%x XK: 0x%x XS: 0x%x XU: 0x%x DPH: 0x%x HugePg: 0x%x Psn: 0x%x\n",
2374 pwctl, 2375 pwctl,
2375 (pwctl & MIPS_PWCTL_PWEN_MASK) >> MIPS_PWCTL_PWEN_SHIFT, 2376 (pwctl & MIPS_PWCTL_PWEN_MASK) >> MIPS_PWCTL_PWEN_SHIFT,
2377 (pwctl & MIPS_PWCTL_XK_MASK) >> MIPS_PWCTL_XK_SHIFT,
2378 (pwctl & MIPS_PWCTL_XS_MASK) >> MIPS_PWCTL_XS_SHIFT,
2379 (pwctl & MIPS_PWCTL_XU_MASK) >> MIPS_PWCTL_XU_SHIFT,
2376 (pwctl & MIPS_PWCTL_DPH_MASK) >> MIPS_PWCTL_DPH_SHIFT, 2380 (pwctl & MIPS_PWCTL_DPH_MASK) >> MIPS_PWCTL_DPH_SHIFT,
2377 (pwctl & MIPS_PWCTL_HUGEPG_MASK) >> MIPS_PWCTL_HUGEPG_SHIFT, 2381 (pwctl & MIPS_PWCTL_HUGEPG_MASK) >> MIPS_PWCTL_HUGEPG_SHIFT,
2378 (pwctl & MIPS_PWCTL_PSN_MASK) >> MIPS_PWCTL_PSN_SHIFT); 2382 (pwctl & MIPS_PWCTL_PSN_MASK) >> MIPS_PWCTL_PSN_SHIFT);