diff --git a/debian/changelog b/debian/changelog index fd5f07f76..a38865957 100644 --- a/debian/changelog +++ b/debian/changelog @@ -37,6 +37,9 @@ linux (3.16.5-2) UNRELEASED; urgency=medium [ Aurelien Jarno ] * [mips*] Backport a hugetlb fix for Octeon from 3.18. * [mips*] Backport math emulation fix for MIPS32r2 from 3.18. + * [mips*] Only define MAX_PHYSMEM_BITS on Loongson-3, until a better fix + is committed upstream. Fixes Loongson-2 kernel and maybe more. Closes: + #764223. -- Ben Hutchings Sat, 11 Oct 2014 21:41:58 +0100 diff --git a/debian/patches/bugfix/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch b/debian/patches/bugfix/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch new file mode 100644 index 000000000..d8afa1b89 --- /dev/null +++ b/debian/patches/bugfix/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch @@ -0,0 +1,24 @@ +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. + +diff --git a/arch/mips/include/asm/sparsemem.h b/arch/mips/include/asm/sparsemem.h +index b1071c1..778dca7 100644 +--- a/arch/mips/include/asm/sparsemem.h ++++ b/arch/mips/include/asm/sparsemem.h +@@ -11,7 +11,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 */ diff --git a/debian/patches/series b/debian/patches/series index 92c72cc77..796c02ebd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -56,6 +56,7 @@ bugfix/s390/s390-3215-fix-hanging-console-issue.patch bugfix/arm64/arm64-crypto-fix-makefile-rule-for-aes-glue-.o.patch bugfix/mips/MIPS-cp1emu-Fix-ISA-restrictions-for-cop1x_op-instru.patch bugfix/mips/MIPS-tlbex-Properly-fix-HUGE-TLB-Refill-exception-ha.patch +bugfix/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch # Arch features features/mips/MIPS-Support-hard-limit-of-cpu-count-nr_cpu_ids.patch