MIPS: increase MAX_PHYSMEM_BITS on Loongson 3 only
authorAurelien Jarno <aurelien@aurel32.net>
Sun, 7 Oct 2018 20:57:06 +0000 (21:57 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 7 Oct 2018 20:57:06 +0000 (21:57 +0100)
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 b0686ca3d8bfd7aa569597ef171b1ee36a2381ac..6201021de324c8d80c2a94f5bf7a4a518cf1a89c 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 */