aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/tlbex.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2011-08-02 17:52:48 -0400
committerRalf Baechle <ralf@linux-mips.org>2011-09-21 11:53:07 -0400
commitd954ffe34a606d4ec34cd3c2b0b5974779759f25 (patch)
treefcf273c3a924ab816a2263d959abe2aa4bf17c5c /arch/mips/mm/tlbex.c
parent870168a031b3c5b78191d719d375221f01e98e11 (diff)
MIPS: tlbex: Fix build error in R3000 code.
Only some GCC versions such as gcc 4.2 notice that the variable wr in build_r3000_tlb_modify_handler is used uninitialized. When using one of those GCCs the build will fail due to -Werror. GCC 4.6 does not warn about the uninitialized use of wr. This issue was introduced by 7211f4d7a3dcbe57c5d396c334dca525315dceb2 [MIPS: Close races in TLB modify handlers.] Reported-by: Ganesan Ramalingam <ganesan18@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm/tlbex.c')
-rw-r--r--arch/mips/mm/tlbex.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index b6e1cff50667..46f33c7c1a09 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -1759,14 +1759,13 @@ static void __cpuinit build_r3000_tlb_modify_handler(void)
1759 u32 *p = handle_tlbm; 1759 u32 *p = handle_tlbm;
1760 struct uasm_label *l = labels; 1760 struct uasm_label *l = labels;
1761 struct uasm_reloc *r = relocs; 1761 struct uasm_reloc *r = relocs;
1762 struct work_registers wr;
1763 1762
1764 memset(handle_tlbm, 0, sizeof(handle_tlbm)); 1763 memset(handle_tlbm, 0, sizeof(handle_tlbm));
1765 memset(labels, 0, sizeof(labels)); 1764 memset(labels, 0, sizeof(labels));
1766 memset(relocs, 0, sizeof(relocs)); 1765 memset(relocs, 0, sizeof(relocs));
1767 1766
1768 build_r3000_tlbchange_handler_head(&p, K0, K1); 1767 build_r3000_tlbchange_handler_head(&p, K0, K1);
1769 build_pte_modifiable(&p, &r, wr.r1, wr.r2, wr.r3, label_nopage_tlbm); 1768 build_pte_modifiable(&p, &r, K0, K1, -1, label_nopage_tlbm);
1770 uasm_i_nop(&p); /* load delay */ 1769 uasm_i_nop(&p); /* load delay */
1771 build_make_write(&p, &r, K0, K1); 1770 build_make_write(&p, &r, K0, K1);
1772 build_r3000_pte_reload_tlbwi(&p, K0, K1); 1771 build_r3000_pte_reload_tlbwi(&p, K0, K1);