aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2015-05-29 09:43:52 -0400
committerRalf Baechle <ralf@linux-mips.org>2015-06-09 04:45:05 -0400
commitd7b631419b3d230a4d383a8c5f5f294f3bc564f9 (patch)
tree43438580e90d21d6376f5ef825d700647718d3e9 /arch
parentd4a4f75cd8f29cd9464a5a32e9224a91571d6649 (diff)
MIPS: pgtable-bits: Fix XPA damage to R6 definitions.
Commit be0c37c985ed ("MIPS: Rearrange PTE bits into fixed positions.") rearranged the PTE bits into fixed positions in preparation for the XPA support. However, this patch broke R6 since it only took R2 cores into consideration for the RI/XI bits leading to boot failures. We fix this by adding the missing CONFIG_CPU_MIPSR6 definitions Fixes: be0c37c985ed ("MIPS: Rearrange PTE bits into fixed positions.") Cc: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/10208/ Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/asm/pgtable-bits.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/mips/include/asm/pgtable-bits.h b/arch/mips/include/asm/pgtable-bits.h
index 18ae5ddef118..c28a8499aec7 100644
--- a/arch/mips/include/asm/pgtable-bits.h
+++ b/arch/mips/include/asm/pgtable-bits.h
@@ -113,7 +113,7 @@
113#define _PAGE_PRESENT_SHIFT 0 113#define _PAGE_PRESENT_SHIFT 0
114#define _PAGE_PRESENT (1 << _PAGE_PRESENT_SHIFT) 114#define _PAGE_PRESENT (1 << _PAGE_PRESENT_SHIFT)
115/* R2 or later cores check for RI/XI support to determine _PAGE_READ */ 115/* R2 or later cores check for RI/XI support to determine _PAGE_READ */
116#ifdef CONFIG_CPU_MIPSR2 116#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
117#define _PAGE_WRITE_SHIFT (_PAGE_PRESENT_SHIFT + 1) 117#define _PAGE_WRITE_SHIFT (_PAGE_PRESENT_SHIFT + 1)
118#define _PAGE_WRITE (1 << _PAGE_WRITE_SHIFT) 118#define _PAGE_WRITE (1 << _PAGE_WRITE_SHIFT)
119#else 119#else
@@ -135,16 +135,16 @@
135#define _PAGE_SPLITTING (1 << _PAGE_SPLITTING_SHIFT) 135#define _PAGE_SPLITTING (1 << _PAGE_SPLITTING_SHIFT)
136 136
137/* Only R2 or newer cores have the XI bit */ 137/* Only R2 or newer cores have the XI bit */
138#ifdef CONFIG_CPU_MIPSR2 138#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
139#define _PAGE_NO_EXEC_SHIFT (_PAGE_SPLITTING_SHIFT + 1) 139#define _PAGE_NO_EXEC_SHIFT (_PAGE_SPLITTING_SHIFT + 1)
140#else 140#else
141#define _PAGE_GLOBAL_SHIFT (_PAGE_SPLITTING_SHIFT + 1) 141#define _PAGE_GLOBAL_SHIFT (_PAGE_SPLITTING_SHIFT + 1)
142#define _PAGE_GLOBAL (1 << _PAGE_GLOBAL_SHIFT) 142#define _PAGE_GLOBAL (1 << _PAGE_GLOBAL_SHIFT)
143#endif /* CONFIG_CPU_MIPSR2 */ 143#endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */
144 144
145#endif /* CONFIG_64BIT && CONFIG_MIPS_HUGE_TLB_SUPPORT */ 145#endif /* CONFIG_64BIT && CONFIG_MIPS_HUGE_TLB_SUPPORT */
146 146
147#ifdef CONFIG_CPU_MIPSR2 147#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
148/* XI - page cannot be executed */ 148/* XI - page cannot be executed */
149#ifndef _PAGE_NO_EXEC_SHIFT 149#ifndef _PAGE_NO_EXEC_SHIFT
150#define _PAGE_NO_EXEC_SHIFT (_PAGE_MODIFIED_SHIFT + 1) 150#define _PAGE_NO_EXEC_SHIFT (_PAGE_MODIFIED_SHIFT + 1)
@@ -160,10 +160,10 @@
160#define _PAGE_GLOBAL_SHIFT (_PAGE_NO_READ_SHIFT + 1) 160#define _PAGE_GLOBAL_SHIFT (_PAGE_NO_READ_SHIFT + 1)
161#define _PAGE_GLOBAL (1 << _PAGE_GLOBAL_SHIFT) 161#define _PAGE_GLOBAL (1 << _PAGE_GLOBAL_SHIFT)
162 162
163#else /* !CONFIG_CPU_MIPSR2 */ 163#else /* !CONFIG_CPU_MIPSR2 && !CONFIG_CPU_MIPSR6 */
164#define _PAGE_GLOBAL_SHIFT (_PAGE_MODIFIED_SHIFT + 1) 164#define _PAGE_GLOBAL_SHIFT (_PAGE_MODIFIED_SHIFT + 1)
165#define _PAGE_GLOBAL (1 << _PAGE_GLOBAL_SHIFT) 165#define _PAGE_GLOBAL (1 << _PAGE_GLOBAL_SHIFT)
166#endif /* CONFIG_CPU_MIPSR2 */ 166#endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */
167 167
168#define _PAGE_VALID_SHIFT (_PAGE_GLOBAL_SHIFT + 1) 168#define _PAGE_VALID_SHIFT (_PAGE_GLOBAL_SHIFT + 1)
169#define _PAGE_VALID (1 << _PAGE_VALID_SHIFT) 169#define _PAGE_VALID (1 << _PAGE_VALID_SHIFT)
@@ -205,7 +205,7 @@
205 */ 205 */
206static inline uint64_t pte_to_entrylo(unsigned long pte_val) 206static inline uint64_t pte_to_entrylo(unsigned long pte_val)
207{ 207{
208#ifdef CONFIG_CPU_MIPSR2 208#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
209 if (cpu_has_rixi) { 209 if (cpu_has_rixi) {
210 int sa; 210 int sa;
211#ifdef CONFIG_32BIT 211#ifdef CONFIG_32BIT