MIPS: increase MAX_PHYSMEM_BITS on Loongson 3 only
authorAurelien Jarno <aurelien@aurel32.net>
Fri, 2 Mar 2018 07:52:22 +0000 (07:52 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 2 Mar 2018 07:52:22 +0000 (07:52 +0000)
Commit c4617318 broke Loongson-2 support and maybe even more by increasing
the value of MAX_PHYSMEM_BITS. At it is currently only needed on
Loongson-3, define it conditionally.

Note: this should be replace by upstream fix when available.

Gbp-Pq: Topic features/mips
Gbp-Pq: Name MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch

arch/mips/include/asm/sparsemem.h

index b1071c1e54f53cb22fe59cff721757a1bdcbc3ee..778dca7c69e4b2b2c0a7be7d817bbe4ffbddc89f 100644 (file)
 #else
 # define SECTION_SIZE_BITS     28
 #endif
-#define MAX_PHYSMEM_BITS       48
+
+#if defined(CONFIG_CPU_LOONGSON3)
+# define MAX_PHYSMEM_BITS      48
+#else
+# define MAX_PHYSMEM_BITS      35
+#endif
 
 #endif /* CONFIG_SPARSEMEM */
 #endif /* _MIPS_SPARSEMEM_H */