summaryrefslogtreecommitdiffstats
path: root/debian/patches/features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch
blob: 3de14026f141f134b47645ab5224ef007ce0d6a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: Aurelien Jarno <aurelien@aurel32.net>
Subject: MIPS: increase MAX_PHYSMEM_BITS on Loongson 3 only
Bug-Debian: https://bugs.debian.org/764223
Forwarded: no

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.

Index: linux/arch/mips/include/asm/sparsemem.h
===================================================================
--- linux.orig/arch/mips/include/asm/sparsemem.h
+++ linux/arch/mips/include/asm/sparsemem.h
@@ -12,7 +12,12 @@
 #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 */