Commit 8bb809df6919f927bcb910bbc852d5724eaa1eb9

Authored by Ralf Baechle
1 parent b3f6df9f21

[MIPS] Cleanup TO_PHYS_MASK definition

No point in adding yet another #ifdef for Loongson since all this mask is
being used for is converting an XKPHYS address into a physical address
anyway.  So replace all definitions by one with the highest architectural
possible value.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Showing 1 changed file with 6 additions and 23 deletions Side-by-side Diff

include/asm-mips/addrspace.h
... ... @@ -129,29 +129,12 @@
129 129 #define PHYS_TO_XKPHYS(cm,a) (_CONST64_(0x8000000000000000) | \
130 130 ((cm)<<59) | (a))
131 131  
132   -#if defined (CONFIG_CPU_R4300) \
133   - || defined (CONFIG_CPU_R4X00) \
134   - || defined (CONFIG_CPU_R5000) \
135   - || defined (CONFIG_CPU_RM7000) \
136   - || defined (CONFIG_CPU_RM9000) \
137   - || defined (CONFIG_CPU_NEVADA) \
138   - || defined (CONFIG_CPU_TX49XX) \
139   - || defined (CONFIG_CPU_MIPS64)
140   -#define TO_PHYS_MASK _CONST64_(0x0000000fffffffff) /* 2^^36 - 1 */
141   -#endif
142   -
143   -#if defined (CONFIG_CPU_R8000)
144   -/* We keep KUSIZE consistent with R4000 for now (2^^40) instead of (2^^48) */
145   -#define TO_PHYS_MASK _CONST64_(0x000000ffffffffff) /* 2^^40 - 1 */
146   -#endif
147   -
148   -#if defined (CONFIG_CPU_R10000)
149   -#define TO_PHYS_MASK _CONST64_(0x000000ffffffffff) /* 2^^40 - 1 */
150   -#endif
151   -
152   -#if defined(CONFIG_CPU_SB1) || defined(CONFIG_CPU_SB1A)
153   -#define TO_PHYS_MASK _CONST64_(0x00000fffffffffff) /* 2^^44 - 1 */
154   -#endif
  132 +/*
  133 + * The ultimate limited of the 64-bit MIPS architecture: 2 bits for selecting
  134 + * the region, 3 bits for the CCA mode. This leaves 59 bits of which the
  135 + * R8000 implements most with its 48-bit physical address space.
  136 + */
  137 +#define TO_PHYS_MASK _CONST64_(0x07ffffffffffffff) /* 2^^59 - 1 */
155 138  
156 139 #ifndef CONFIG_CPU_R8000
157 140