]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.16.3/mips-tlbex-fix-a-missing-statement-for-hugetlb.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.16.3 / mips-tlbex-fix-a-missing-statement-for-hugetlb.patch
1 From 8393c524a25609a30129e4a8975cf3b91f6c16a5 Mon Sep 17 00:00:00 2001
2 From: Huacai Chen <chenhc@lemote.com>
3 Date: Tue, 29 Jul 2014 14:54:40 +0800
4 Subject: MIPS: tlbex: Fix a missing statement for HUGETLB
5
6 From: Huacai Chen <chenhc@lemote.com>
7
8 commit 8393c524a25609a30129e4a8975cf3b91f6c16a5 upstream.
9
10 In commit 2c8c53e28f1 (MIPS: Optimize TLB handlers for Octeon CPUs)
11 build_r4000_tlb_refill_handler() is modified. But it doesn't compatible
12 with the original code in HUGETLB case. Because there is a copy & paste
13 error and one line of code is missing. It is very easy to produce a bug
14 with LTP's hugemmap05 test.
15
16 Signed-off-by: Huacai Chen <chenhc@lemote.com>
17 Signed-off-by: Binbin Zhou <zhoubb@lemote.com>
18 Cc: John Crispin <john@phrozen.org>
19 Cc: Steven J. Hill <Steven.Hill@imgtec.com>
20 Cc: linux-mips@linux-mips.org
21 Cc: Fuxin Zhang <zhangfx@lemote.com>
22 Cc: Zhangjin Wu <wuzhangjin@gmail.com>
23 Patchwork: https://patchwork.linux-mips.org/patch/7496/
24 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26
27 ---
28 arch/mips/mm/tlbex.c | 1 +
29 1 file changed, 1 insertion(+)
30
31 --- a/arch/mips/mm/tlbex.c
32 +++ b/arch/mips/mm/tlbex.c
33 @@ -1299,6 +1299,7 @@ static void build_r4000_tlb_refill_handl
34 }
35 #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
36 uasm_l_tlb_huge_update(&l, p);
37 + UASM_i_LW(&p, K0, 0, K1);
38 build_huge_update_entries(&p, htlb_info.huge_pte, K1);
39 build_huge_tlb_write_entry(&p, &l, &r, K0, tlb_random,
40 htlb_info.restore_scratch);