[mips] Fix hugepage support on machines with R4K like TLB.

svn path=/dists/sid/linux/; revision=21655
This commit is contained in:
Aurelien Jarno 2014-07-30 19:15:28 +00:00
parent 94e1a88d9e
commit 64e17ee597
3 changed files with 37 additions and 0 deletions

1
debian/changelog vendored
View File

@ -10,6 +10,7 @@ linux (3.14.13-3) UNRELEASED; urgency=medium
* [mips*/octeon] Fix /proc/cpuinfo issues.
* [mips,mipsel/4kc-malta] Fix bug which can cause incorrect system call
restarts (fix hang on boot).
* [mips] Fix hugepage support on machines with R4K like TLB.
[ Ben Hutchings ]
* [amd64] Reject x32 executables if x32 ABI not supported

View File

@ -0,0 +1,35 @@
From: Huacai Chen <chenhc@lemote.com>
Date: Tue, 29 Jul 2014 14:54:40 +0800
Subject: MIPS: tlbex: fix a missing statement for HUGETLB
Origin: http://www.linux-mips.org/archives/linux-mips/2014-07/msg00797.html
In commit 2c8c53e28f1 (MIPS: Optimize TLB handlers for Octeon CPUs)
build_r4000_tlb_refill_handler() is modified. But it doesn't compatible
with the original code in HUGETLB case. Because there is a copy & paste
error and one line of code is missing. It is very easy to produce a bug
with LTP's hugemmap05 test.
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Binbin Zhou <zhoubb@lemote.com>
Cc: <stable@vger.kernel.org>
Tested-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
---
arch/mips/mm/tlbex.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index e80e10b..343fe0f 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -1299,6 +1299,7 @@ static void build_r4000_tlb_refill_handler(void)
}
#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
uasm_l_tlb_huge_update(&l, p);
+ UASM_i_LW(&p, K0, 0, K1);
build_huge_update_entries(&p, htlb_info.huge_pte, K1);
build_huge_tlb_write_entry(&p, &l, &r, K0, tlb_random,
htlb_info.restore_scratch);
--
1.7.10.4

View File

@ -67,6 +67,7 @@ bugfix/mips/MIPS-Fix-branch-emulation-of-branch-likely-instructi.patch
bugfix/mips/MIPS-ptrace-Avoid-smp_processor_id-in-preemptible-co.patch
bugfix/mips/MIPS-OCTEON-make-get_system_type-thread-safe.patch
bugfix/mips/MIPS-O32-32-bit-Fix-bug-which-can-cause-incorrect-sy.patch
bugfix/mips/MIPS-tlbex-fix-a-missing-statement-for-HUGETLB.patch
bugfix/s390/s390-ptrace-fix-PSW-mask-check.patch
# Miscellaneous bug fixes