From: Rabin Vincent <rabinv(a)axis.com>
PGD_ORDER expects __PGD_ORDER be signed, which it isn't now since
pagesize is unsigned. Without this, loading fails on a dump with a
kernel with 16 KiB pages:
please wait... (gathering module symbol data)
crash: invalid size request: 0 type: "pgd page"
---
mips.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mips.c b/mips.c
index 30e6255..f73dfad 100644
--- a/mips.c
+++ b/mips.c
@@ -28,7 +28,7 @@ typedef ulong pte_t;
#define PGD_T_LOG2 (__builtin_ffs(sizeof(pgd_t)) - 1)
#define PTE_T_LOG2 (__builtin_ffs(sizeof(pte_t)) - 1)
-#define __PGD_ORDER (32 - 3 * PAGESHIFT() + PGD_T_LOG2 + PTE_T_LOG2)
+#define __PGD_ORDER (32 - 3 * (int)PAGESHIFT() + PGD_T_LOG2 + PTE_T_LOG2)
#define PGD_ORDER (__PGD_ORDER >= 0 ? __PGD_ORDER : 0)
#define PGD_SIZE (PAGESIZE() << PGD_ORDER)
--
2.1.4